[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-862) EJB 3.0 dependencies injection accross EARs

Roland R?z (JIRA) jira-events at jboss.com
Fri Feb 2 05:05:19 EST 2007


EJB 3.0 dependencies injection accross EARs
-------------------------------------------

                 Key: EJBTHREE-862
                 URL: http://jira.jboss.com/jira/browse/EJBTHREE-862
             Project: EJB 3.0
          Issue Type: Bug
          Components: EJB3 Extensions
    Affects Versions: EJB 3.0 RC9 - Patch 1
         Environment: Windows, JDK 1.5.0_06-b05, JBoss 4.0.5 GA, EJB-3.0_RC9 Patch 1
            Reporter: Roland R?z


We have a deployment schema similar to the example from EJB 3.0 specification (chapter 19.6 Example):
ear1:
       FirstReferencer.jar Class-Path:FirstReferencer-client.jar SecondReferencer-client.jar
       FirstReferencer-client.jar
       SecondReferencer-client.jar
ear2:
      SecondReferencer.jar Class-Path:SecondReferencer-client.jar
      SecondReferencer-client.jar
                  deployment descriptor contains:
                  <ejb-client-jar>SecondReferencer-client.jar</ejb-client-jar>

There are two session beans  FirstReferencer and SecondReferencer. FirstReferencer references SecondReferencer over the dependency injection. After deployment if we call the business method on the FirstReferencer, which in turn calls SecondReferencer we get exception like this:

16:22:12,155 ERROR [STDERR] java.lang.RuntimeException: Non matching type for inject of field: SecondReferencer FirstReferencerEjb.secondReferencer for type: $Proxy79 of jndiName env/FirstReferencerEjb/secondReferencer
intfs: , SecondReferencer, org.jboss.ejb3.JBossProxy, javax.ejb.EJBObject
16:22:12,155 ERROR [STDERR] 	at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:135)
16:22:12,155 ERROR [STDERR] 	at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:104)
16:22:12,155 ERROR [STDERR] 	at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:61)
16:22:12,155 ERROR [STDERR] 	at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:92)
16:22:12,155 ERROR [STDERR] 	at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:48)
16:22:12,165 ERROR [STDERR] 	at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:209)
16:22:12,165 ERROR [STDERR] 	at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:303)
16:22:12,165 ERROR [STDERR] 	at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
16:22:12,165 ERROR [STDERR] 	at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
16:22:12,175 ERROR [STDERR] 	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
16:22:12,175 ERROR [STDERR] 	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
16:22:12,175 ERROR [STDERR] 	at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
16:22:12,175 ERROR [STDERR] 	at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
16:22:12,175 ERROR [STDERR] 	at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
16:22:12,185 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException
16:22:12,185 ERROR [STDERR] 	at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
16:22:12,185 ERROR [STDERR] 	at java.lang.reflect.Field.set(Field.java:656)
16:22:12,185 ERROR [STDERR] 	at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:119)
16:22:12,185 ERROR [STDERR] 	... 13 more

On debuging and from the stacktrace of the exception we can see that the lookup for refernced EJB works fine but the assigning over reflaction fails. It seems to be a ClassLoading issue there.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list