3 Replies Latest reply: Nov 23, 2010 12:16 PM by ozyman RSS

wierd isolated class loading behaviour Jboss 4.2.3

ozyman Newbie
Hello people,
I'm struck with an isolated class loading problem in Jboss and I can't seem to find a solution. More over I can't seem to understand the behaviour of Jboss(verion 4.2.3), which is making finding a solution all more difficult. I'll be really thankful if anyone can tell what's really going on. Here is my case,
I have a .ear and .war to be deployed into the server. For obvious reasons, we use isolated class loading to avoid the conflicts. I used this guide to follow the isolation: http://community.jboss.org/wiki/ClassLoadingConfiguration
Here are the jboss-app.xml and jboss-web.xml files of my .ear and .war

Hello people,

 

I'm struck with an isolated class loading problem in Jboss and I can't seem to find a solution. More over I can't seem to understand the behaviour of Jboss(verion 4.2.3), which is making finding a solution all more difficult. I'll be really thankful if anyone can tell what's really going on. Here is my case,

 

I have a .ear and .war to be deployed into the server. For obvious reasons, we use isolated class loading to avoid the conflicts. I used this guide to follow the isolation: http://community.jboss.org/wiki/ClassLoadingConfiguration

 

 

Here are the jboss-app.xml and jboss-web.xml files of my .ear and .war

 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<jboss-app>
   <loader-repository>com.xxxx:loader=XXXX-loader</loader-repository>
</jboss-app>

 

 

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
    <context-root>itmWebservices</context-root>
  <loader-repository>com.xxxx:loader=XXXX-loader</loader-repository>
    </jboss-web>

 

 

 

 

Initially we used the <class-loading> tag around <loader-repository> tag in jboss-web.xml file. This used to give errors while deploying. So, after reading the guide, I mentioned above, I removed the <class-loading> tag and it seems to deploy fine. No errors while deploying. But when I try to connect my .war to .ear, I get the following error

 

 


19:06:46,364 ERROR [LogInterceptor] EJBException in method: public abstract com.xxxx.api.ejb.TopicOrganizer com.xxxx.api.ejb.TopicOrganizerHome.create() t
hrows java.rmi.RemoteException,javax.ejb.CreateException:
javax.ejb.EJBException: Invalid invocation, check your deployment packaging, met
hod=public abstract com.xxxx.api.ejb.TopicOrganizer com.xxxx.api.ejb.Topic
OrganizerHome.create() throws java.rmi.RemoteException,javax.ejb.CreateException



        at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invokeHom
e(StatefulSessionContainer.java:525)
        at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityIntercep
tor.java:145)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
keHome(CachedConnectionInterceptor.java:189)
        at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(S
tatefulSessionInstanceInterceptor.java:143)
        at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValida
tionInterceptor.java:56)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
rceptor.java:125)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
torCMT.java:378)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.ja
va:161)
        at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:1
32)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyF
actoryFinderInterceptor.java:107)
        at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.ja
va:637)
        at org.jboss.ejb.Container.invoke(Container.java:981)
        at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:155)
        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
        at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
        at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(Loca
lInvoker.java:169)
        at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)



        at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerIntercepto
r.java:209)
        at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
a:195)
        at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.
java:61)
        at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:7
0)
        at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
        at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
        at $Proxy150.create(Unknown Source)
        at com.xxxx.itm.ws.endpoint.Util.connect(Util.java:180)
        at com.xxxx.itm.ws.endpoint.Util.connect(Util.java:129)
        at com.xxxx.itm.ws.endpoint.ConnectionDOMEndPoint.invokeInternal(Conn
ectionDOMEndPoint.java:49)
        at org.springframework.ws.server.endpoint.AbstractDomPayloadEndpoint.inv
oke(AbstractDomPayloadEndpoint.java:75)
        at org.springframework.ws.server.endpoint.adapter.PayloadEndpointAdapter
.invoke(PayloadEndpointAdapter.java:48)
        at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispa
tcher.java:221)
        at org.springframework.ws.server.MessageDispatcher.receive(MessageDispat
cher.java:168)
        at org.springframework.ws.transport.support.WebServiceMessageReceiverObj
ectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88)
        at org.springframework.ws.transport.http.WebServiceMessageReceiverHandle
rAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:57)
        at org.springframework.ws.transport.http.MessageDispatcherServlet.doServ
ice(MessageDispatcherServlet.java:197)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame
workServlet.java:571)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServ
let.java:511)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
lter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:175)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
yAssociationValve.java:182)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
e.java:84)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
onnectionValve.java:157)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:262)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
6)
        at java.lang.Thread.run(Thread.java:662)
19:06:46,413 ERROR [STDERR] java.rmi.ServerException: EJBException:; nested exce
ption is:
        javax.ejb.EJBException: Invalid invocation, check your deployment packag
ing, method=public abstract com.xxxx.api.ejb.TopicOrganizer com.xxxx.api.e
jb.TopicOrganizerHome.create() throws java.rmi.RemoteException,javax.ejb.CreateE
xception
19:06:46,426 ERROR [STDERR]     at org.jboss.ejb.plugins.LogInterceptor.handleEx
ception(LogInterceptor.java:365)
19:06:46,447 ERROR [STDERR]     at org.jboss.ejb.plugins.LogInterceptor.invokeHo
me(LogInterceptor.java:136)
19:06:46,448 ERROR [STDERR]     at org.jboss.ejb.plugins.ProxyFactoryFinderInter
ceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
19:06:46,449 ERROR [STDERR]     at org.jboss.ejb.SessionContainer.internalInvoke
Home(SessionContainer.java:637)
19:06:46,450 ERROR [STDERR]     at org.jboss.ejb.Container.invoke(Container.java
:981)
19:06:46,451 ERROR [STDERR]     at sun.reflect.GeneratedMethodAccessor111.invoke
(Unknown Source)
19:06:46,452 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invo
ke(DelegatingMethodAccessorImpl.java:25)
19:06:46,453 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:5
97)
19:06:46,454 ERROR [STDERR]     at org.jboss.mx.interceptor.ReflectedDispatcher.
invoke(ReflectedDispatcher.java:155)
19:06:46,456 ERROR [STDERR]     at org.jboss.mx.server.Invocation.dispatch(Invoc
ation.java:94)
19:06:46,456 ERROR [STDERR]     at org.jboss.mx.server.Invocation.invoke(Invocat
ion.java:86)
19:06:46,458 ERROR [STDERR]     at org.jboss.mx.server.AbstractMBeanInvoker.invo
ke(AbstractMBeanInvoker.java:264)
19:06:46,459 ERROR [STDERR]     at org.jboss.mx.server.MBeanServerImpl.invoke(MB
eanServerImpl.java:659)
19:06:46,460 ERROR [STDERR]     at org.jboss.invocation.local.LocalInvoker$MBean
ServerAction.invoke(LocalInvoker.java:169)
19:06:46,461 ERROR [STDERR]     at org.jboss.invocation.local.LocalInvoker.invok
e(LocalInvoker.java:118)
19:06:46,462 ERROR [STDERR]     at org.jboss.invocation.InvokerInterceptor.invok
eLocal(InvokerInterceptor.java:209)
19:06:46,463 ERROR [STDERR]     at org.jboss.invocation.InvokerInterceptor.invok
e(InvokerInterceptor.java:195)
19:06:46,464 ERROR [STDERR]     at org.jboss.proxy.TransactionInterceptor.invoke
(TransactionInterceptor.java:61)
19:06:46,465 ERROR [STDERR]     at org.jboss.proxy.SecurityInterceptor.invoke(Se
curityInterceptor.java:70)
19:06:46,466 ERROR [STDERR]     at org.jboss.proxy.ejb.HomeInterceptor.invoke(Ho
meInterceptor.java:184)
19:06:46,467 ERROR [STDERR]     at org.jboss.proxy.ClientContainer.invoke(Client
Container.java:100)
19:06:46,468 ERROR [STDERR]     at $Proxy150.create(Unknown Source)
19:06:46,469 ERROR [STDERR]     at com.xxxx.itm.ws.endpoint.Util.connect(Util
.java:180)
19:06:46,471 ERROR [STDERR]     at com.xxxx.itm.ws.endpoint.Util.connect(Util
.java:129)
19:06:46,471 ERROR [STDERR]     at com.xxxx.itm.ws.endpoint.ConnectionDOMEndP
oint.invokeInternal(ConnectionDOMEndPoint.java:49)
19:06:46,472 ERROR [STDERR]     at org.springframework.ws.server.endpoint.Abstra
ctDomPayloadEndpoint.invoke(AbstractDomPayloadEndpoint.java:75)
19:06:46,473 ERROR [STDERR]     at org.springframework.ws.server.endpoint.adapte
r.PayloadEndpointAdapter.invoke(PayloadEndpointAdapter.java:48)
19:06:46,474 ERROR [STDERR]     at org.springframework.ws.server.MessageDispatch
er.dispatch(MessageDispatcher.java:221)
19:06:46,475 ERROR [STDERR]     at org.springframework.ws.server.MessageDispatch
er.receive(MessageDispatcher.java:168)
19:06:46,477 ERROR [STDERR]     at org.springframework.ws.transport.support.WebS
erviceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObj
ectSupport.java:88)
19:06:46,478 ERROR [STDERR]     at org.springframework.ws.transport.http.WebServ
iceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.
java:57)
19:06:46,479 ERROR [STDERR]     at org.springframework.ws.transport.http.Message
DispatcherServlet.doService(MessageDispatcherServlet.java:197)
19:06:46,480 ERROR [STDERR]     at org.springframework.web.servlet.FrameworkServ
let.processRequest(FrameworkServlet.java:571)
19:06:46,482 ERROR [STDERR]     at org.springframework.web.servlet.FrameworkServ
let.doPost(FrameworkServlet.java:511)
19:06:46,483 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:710)
19:06:46,484 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:803)
19:06:46,485 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:290)
19:06:46,486 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:206)
19:06:46,487 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilte
r.doFilter(ReplyHeaderFilter.java:96)
19:06:46,488 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:235)
19:06:46,489 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:206)
19:06:46,490 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve
.invoke(StandardWrapperValve.java:230)
19:06:46,491 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve
.invoke(StandardContextValve.java:175)
19:06:46,492 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssocia
tionValve.invoke(SecurityAssociationValve.java:182)
19:06:46,493 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValv
e.invoke(JaccContextValve.java:84)
19:06:46,494 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.in
voke(StandardHostValve.java:127)
19:06:46,495 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.i
nvoke(ErrorReportValve.java:102)
19:06:46,496 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnec
tionValve.invoke(CachedConnectionValve.java:157)
19:06:46,497 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.
invoke(StandardEngineValve.java:109)
19:06:46,499 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.s
ervice(CoyoteAdapter.java:262)
19:06:46,500 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.proc
ess(Http11Processor.java:844)
19:06:46,501 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http1
1ConnectionHandler.process(Http11Protocol.java:583)
19:06:46,502 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker
.run(JIoEndpoint.java:446)
19:06:46,503 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:662)
19:06:46,504 ERROR [STDERR] Caused by: javax.ejb.EJBException: Invalid invocatio
n, check your deployment packaging, method=public abstract com.xxxx.api.ejb.T
opicOrganizer com.xxxx.api.ejb.TopicOrganizerHome.create() throws java.rmi.Re
moteException,javax.ejb.CreateException
19:06:46,506 ERROR [STDERR]     at org.jboss.ejb.StatefulSessionContainer$Contai
nerInterceptor.invokeHome(StatefulSessionContainer.java:525)
19:06:46,506 ERROR [STDERR]     at org.jboss.ejb.plugins.SecurityInterceptor.inv
okeHome(SecurityInterceptor.java:145)
19:06:46,509 ERROR [STDERR]     at org.jboss.resource.connectionmanager.CachedCo
nnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:189)
19:06:46,510 ERROR [STDERR]     at org.jboss.ejb.plugins.StatefulSessionInstance
Interceptor.invokeHome(StatefulSessionInstanceInterceptor.java:143)
19:06:46,511 ERROR [STDERR]     at org.jboss.ejb.plugins.CallValidationIntercept
or.invokeHome(CallValidationInterceptor.java:56)
19:06:46,512 ERROR [STDERR]     at org.jboss.ejb.plugins.AbstractTxInterceptor.i
nvokeNext(AbstractTxInterceptor.java:125)
19:06:46,513 ERROR [STDERR]     at org.jboss.ejb.plugins.TxInterceptorCMT.runWit
hTransactions(TxInterceptorCMT.java:378)
19:06:46,514 ERROR [STDERR]     at org.jboss.ejb.plugins.TxInterceptorCMT.invoke
Home(TxInterceptorCMT.java:161)
19:06:46,516 ERROR [STDERR]     at org.jboss.ejb.plugins.LogInterceptor.invokeHo
me(LogInterceptor.java:132)
19:06:46,516 ERROR [STDERR]     ... 52 more

 

 

 

which means, as far as I understand, that the deployment is not clean or the class isolation is not being done correctly. What could be a possible explanation and a solution?

 

 

I even tried using the global class isolation, by editing the deploy/ear-deployer.xml and setting class isolation and call by value attributes to true. Even they don't seem to do the thing.

 

 

Thanks in advance