[jboss-user] [EJB 3.0] - Re: Can't get a stateless session bean to work - JNDI can't

sbucknor do-not-reply at jboss.com
Fri Nov 17 05:36:16 EST 2006


Hi all, I have a similar issue too. I am experimenting with EJB3 deployed on JBoss 4.0.5 (the jar installer version). The deployed jar file (called SimpleSession.ejb3) has 2 classes:- SimpleSession.class (remote interface) and SimpleSessionBean.class (the bean). This deploys with no issues but from a JSP client calling the EJB with the following code

           String theString = null;
           InitialContext ctx = new InitialContext();     simpleSession=(SimpleSession)ctx.lookup(SimpleSession.class.getName());
	  theString = simpleSession.sayHello(); 

I get the following error message:

10:52:55,968 ERROR [STDERR] javax.naming.NameNotFoundException: beans.SimpleSession not bound
10:52:55,968 ERROR [STDERR]     at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
10:52:55,968 ERROR [STDERR]     at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
10:52:55,968 ERROR [STDERR]     at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
10:52:55,968 ERROR [STDERR]     at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
10:52:55,968 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:52:55,968 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
10:52:55,968 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Etc....

I also noted that the bean was registered with JBoss from the service=JNDIView parameter on the jmx-comsole.
Does anyone have an idea of what could be wrong here. Any Help will be much apreciated. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986787#3986787

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986787



More information about the jboss-user mailing list