[jboss-user] [Beginners Corner] - TravelAgentBean not bound?
denisputnam
do-not-reply at jboss.com
Mon Nov 3 12:40:18 EST 2008
Hi,
I am getting a NameNotFoundException from the Client main method. I am running MyEclipse6.5, jdk5.0, and jboss-4.2.3.GA.
<persistence-unit name="TitanCruisesPU" transaction-type="JTA">
<jta-data-source>java:MySqlDS</jta-data-source>
</persistence-unit>
Here is the code:
public static Context getInitialContext() throws javax.naming.NamingException
{
Properties p = new Properties();
// Specify the JNDI properties specific to JBOSS
p.put( Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory" );
p.put( Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" );
p.put( Context.PROVIDER_URL, "jnp://localhost:1099" );
InitialContext initContext = new InitialContext(p);
return initContext;
}
Here is the error:
javax.naming.NameNotFoundException: TravelAgentBean not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
...
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.titan.clients.Client.main(Client.java:30)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4186450#4186450
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4186450
More information about the jboss-user
mailing list