[jboss-user] [Beginners Corner] - Re: HELP: javax.naming.NameNotFoundException: comp not bound
cnbs
do-not-reply at jboss.com
Fri Aug 11 02:23:10 EDT 2006
"ashahashah" wrote : "cnbs" wrote : anonymous wrote : The env-entry-name element contains the name of an enterprise bean's
| | | environment entry. The name is a JNDI name relative to the
| | | java:comp/env context
| | I don't have this "java:comp/env" context to which all my environment resources names (like env-entry) have to be relative.
|
| Did you resolve this issue? Are you using EJB3.0? If you are then using the DTD http://java.sun.com/dtd/ejb-jar_2_0.dtd will do you no good. You have to use the ejb_3_0.xsd. Also, if you want to do a new InitialContext().lookup() for an env-entry from your deployment descriptor using JBoss 4.0.4GA and EJB3, then you have to use java:comp.ejb3/env/... and not just java:comp/env/...
No i didn't resolve it yet.
Yes i'm using EJB3.0 And using ejb_3_0.xsd. But this creates another error which is described here:
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964529#3964529
But i have a question - do i have to deploy with ejb-jar.xml or Jboss should create ENC environment from my metadata annotations?
And about java:comp.ejb3/env/.. i know that i should use it and i did so. And as you can see both of this context are empty:
+- comp (class: javax.naming.Context)
...
+- comp.ejb3 (class: javax.naming.Context)
| NonContext: null
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964533#3964533
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964533
More information about the jboss-user
mailing list