[jboss-user] [JNDI/Naming/Network] - @Resource and SeamTest on JBoss 4.2.2
Merziger
do-not-reply at jboss.com
Wed Jul 16 03:22:36 EDT 2008
Hi!
I used the Resource annotation to inject a SessionContext like this:
@Resource javax.ejb.SessionContext sessionContext
The Bean (and a rollback using the context) is working fine. But when I call a method of the StatefulBean via SeamTest, the Bean isn't instanciated. The following Exception occurs:
Caused by: java.lang.RuntimeException: Unable to inject jndi dependency: env/de.dzbank.ebp.rwb.session.process.musterprodukt.impl.MusterproduktConversationBean/sessionContext into property de.dzbank.ebp.rwb.session.process.musterprodukt.impl.MusterproduktConversationBean.sessionContext: EJBContext not bound
at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:77)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:89)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:84)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.java:56)
at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:100)
at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:56)
at org.jboss.ejb3.pool.ThreadlocalPool.create(ThreadlocalPool.java:58)
at org.jboss.ejb3.pool.ThreadlocalPool.get(ThreadlocalPool.java:113)
at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:351)
... 81 more
Caused by: javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: EJBContext not bound]
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1254)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:760)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.java:70)
... 89 more
Caused by: javax.naming.NameNotFoundException: EJBContext not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:542)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:550)
at org.jnp.server.NamingServer.getObject(NamingServer.java:556)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:669)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:776)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1248)
Seems to me, that the SessionContext isn't correctly bound to the JNDI.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164663#4164663
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164663
More information about the jboss-user
mailing list