-
1. Re: NotContextException when I deploy ejb3 and ejb2 in the s
robertocarlos1 Jan 23, 2008 4:00 PM (in response to robertocarlos1)somebody knows why the NamingServer class can get an instance Of org.jnp.interfaces.MarshalledValuePair instead when i pass the jndiname of my session bean ("MySessionBeanName/remote"). That's is the problem, because this class is not an instance of Reference and in the lookup method of NamingServer class throw an NotContextException when the object obtained is not an instance of Reference class.
Somebody have an idea about it?
Thanks -
2. Re: NotContextException when I deploy ejb3 and ejb2 in the s
robertocarlos1 Jan 23, 2008 4:02 PM (in response to robertocarlos1)"robertocarlos@gmail.com" wrote:
somebody knows why the NamingServer class can get an instance Of org.jnp.interfaces.MarshalledValuePair instead an instance of class Reference, when i pass the jndiname of my session bean ("MySessionBeanName/remote"). That's is the problem, because this class is not an instance of Reference and in the lookup method of NamingServer class throw an NotContextException when the object obtained is not an instance of Reference class.
Somebody have an idea about it?
Thanks
Corrected :) -
3. Re: NotContextException when I deploy ejb3 and ejb2 in the s
jaikiran Jan 24, 2008 5:24 AM (in response to robertocarlos1)Please post the entire exception stacktrace and the code where you are doing the lookup. Also, post the output of the JNDI tree by following the steps below:
- Go to http://< server>:< port>/jmx-console (Ex: http://localhost:8080/jmx-console)
- Search for service=JNDIView on the jmx-console page
- Click on that link
- On the page that comes up click on the Invoke button beside the list() method
- The page that comes up will show the contents of the JNDI tree.
Post it here. -
4. Re: NotContextException when I deploy ejb3 and ejb2 in the s
robertocarlos1 Jan 24, 2008 5:17 PM (in response to robertocarlos1)Thanks Yakiran, i found the problem.
i have put the same JNDIName to EJB3 of the entity and EJB2 version.
are there some way to especify a diferent jndi context? something like "ejb3/" and when the container deploy the component create the binding in that context instead of default. For now i have to change the JNDIName to something like that "EJB3MySessionFacadeBean" for give a diferent name.
Thanks a lot for your help. -
5. Re: NotContextException when I deploy ejb3 and ejb2 in the s
robertocarlos1 Jan 24, 2008 5:29 PM (in response to robertocarlos1)"robertocarlos@gmail.com" wrote:
Thanks Yakiran, i found the problem.
i was putting the same JNDIName to EJB3 of the entity and EJB2 version.
are there some way to especify a diferent jndi context? something like "ejb3/" and when the container deploy the component create the binding in that context instead of default. For now i have to change the JNDIName to something like that "EJB3MySessionFacadeBean" for give a diferent name.
Thanks a lot for your help.
Corrected :) -
6. Re: NotContextException when I deploy ejb3 and ejb2 in the s
jaikiran Jan 25, 2008 2:41 AM (in response to robertocarlos1)It wont be done by default. You can however specify the jndi-name of your choice (maybe with the ejb3/ prefix) either through annotations or through the jboss.xml file.
-
7. Re: NotContextException when I deploy ejb3 and ejb2 in the s
robertocarlos1 Jan 25, 2008 10:41 AM (in response to robertocarlos1)is something like that?
....... import ..... @Stateless(name="ejb3/MySessionBean") ....
or is there other way to specify through annotations?
How can i get any help about annotations? -
8. Re: NotContextException when I deploy ejb3 and ejb2 in the s
jaikiran Jan 25, 2008 10:52 AM (in response to robertocarlos1)For specifying the jndi-name for the remote interface of your EJB3, use the @RemoteBinding annotation (for local interface use @LocalBinding)
@RemoteBinding (jndiBinding="ejb3/MySessionBean")
See the http://trailblazer.demo.jboss.com/EJB3Trail/ for more details.
Here's the link for StatelessSessionBeans http://trailblazer.demo.jboss.com/EJB3Trail/serviceobjects/slsb/index.html -
9. Re: NotContextException when I deploy ejb3 and ejb2 in the s
robertocarlos1 Jan 25, 2008 11:19 AM (in response to robertocarlos1)Thanks a lot for your help. Good work! :)