[jboss-user] [Beginners Corner] - Re: HELP: javax.naming.NameNotFoundException: comp not bound
I just resolve it. :) Not the "comp not bound" but the "@Resource and @TimerService not working" problem. I always tried to work with TimerService or SessionContex in a constructor and got the NPE. All i had to do is to try this in a method not in the constructor :) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964594#3964594 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964594 ___ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Beginners Corner] - Re: HELP: javax.naming.NameNotFoundException: comp not bound
"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 cansee 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 ___ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Beginners Corner] - Re: HELP: javax.naming.NameNotFoundException: comp not bound
"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/... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964525#3964525 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964525 ___ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Beginners Corner] - Re: HELP: javax.naming.NameNotFoundException: comp not bound
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. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963546#3963546 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963546 ___ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Beginners Corner] - Re: HELP: javax.naming.NameNotFoundException: comp not bound
"jaikiran" wrote : If thats what you want to have, then you will have to specify an env-entry for your bean. Have a look at the dtd of ejb-jar.xml at: | http://java.sun.com/dtd/ejb-jar_2_0.dtd | | Here's an extract: | | Thank you.. but I need an ejb ENC context, from where i want to get EJBContex, TimerService.. I want to know, is this ENC context is created by JBoss automatically during deployment, or i must somehow set it by myself? And annotations like @Resource, @EJB, @TimerService are not working to. I just can't do anything. And, do i need ejb-jar.xml or jboss.xml? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963545#3963545 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963545 ___ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Beginners Corner] - Re: HELP: javax.naming.NameNotFoundException: comp not bound
If thats what you want to have, then you will have to specify an env-entry for your bean. Have a look at the dtd of ejb-jar.xml at: http://java.sun.com/dtd/ejb-jar_2_0.dtd Here's an extract: anonymous wrote : | | | | | | | | | | | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963539#3963539 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963539 ___ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Beginners Corner] - Re: HELP: javax.naming.NameNotFoundException: comp not bound
I just need something like this: | | Ejb Module: MyAppEJB.jar | | | java:comp namespace of the MyBean bean | : | +- env (class: org.jnp.interfaces.NamingContext) | | | java: Namespace | +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory) | +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource) | +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory) | +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter) | +- comp (class: javax.naming.Context) | +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl) | +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory) | +- jaas (class: javax.naming.Context) | | | help please.. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963475#3963475 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963475 ___ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Beginners Corner] - Re: HELP: javax.naming.NameNotFoundException: comp not bound
"PeterJ" wrote : Use ctx.lookup("myApp-ear/MyFirstBean/remote");
Thank you PeterJ..
I forgot to say that i need an TimerService or EJBContext or SessionContext..
How to get a remote i know :)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963389#3963389
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963389
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Beginners Corner] - Re: HELP: javax.naming.NameNotFoundException: comp not bound
Use ctx.lookup("myApp-ear/MyFirstBean/remote");
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963209#3963209
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963209
___
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user
