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

Alexander Sack (JIRA) jira-events at lists.jboss.org
Fri Mar 23 12:36:35 EDT 2007


    [ http://jira.jboss.com/jira/browse/EJBTHREE-862?page=comments#action_12357165 ] 
            
Alexander Sack commented on EJBTHREE-862:
-----------------------------------------

I believe I'm running into a similar problem on 4.0.4GA (not sure EJB3 patch level).  Here is my issue (EAR isolation is turned on from install):

my.ear1
--- my.jar1

my.ear2
-- my.jar2 

my.common.jar

my.common.jar contains interfaces both EARs share.  The my.ear2/my.jar2 looks up via JNDI a bean contained in my.ear1/my.jar1 through an interface file defined in the my.common.jar.  The interface calls my.ear1/my.jar1 SLSB correctly but that bean uses another SLSB within my.jar1 (DAO bean) to implement some database calls.  The interface for the local SLSB is defined in my.jar1.  This fails miserably with a runtime JNDI lookup exception.

I was going to file a new bug but I think its very similar to the issue above.  The JMX console also shows that the DAO interface of the bean inside my.jar1 has NO CLASSLOADERS defined.  This SHOULD not be the case no matter what and certainly shouldn't prevent injection (classical JNDI context lookups work properly).

> 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
>
> Note that this issue occurs only if the EARDeployer's attribute Isolated in ear-deployer.xml is set to true.
> 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