Calling EJB in weblogic from service in Jbos
pank545855 Nov 3, 2004 9:44 PMHi
I have a JMS listener service deployed on Jboss. this is the log generated when i start jboss server.
************************
11:56:41,456 INFO [TMServiceMBeanImpl] Initializing eService:service=tmeformjmx... configured with the following information:
11:56:41,456 INFO [TMServiceMBeanImpl] eConf URL: http://localhost:9001/eConf
11:56:41,456 INFO [TMServiceMBeanImpl] componentName: eComs
11:56:41,456 INFO [TMServiceMBeanImpl] targetClass: au.gov.ipaustralia.tmeformj
mx.TMeFormService
11:56:41,456 INFO [TMServiceMBeanImpl] Is this service logging via the eLogger?
: false
11:56:43,392 INFO [TMServiceMBeanImpl] JMS Listener successfully initialised fo
r eService:service=tmeformjmx11:56:43,970 INFO [EClient] Deployment descriptor for EClient is:
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="htt
p://xml.apache.org/axis/wsdd/providers/java">
<typeMapping qname="ns:javax.activation.DataHandler" xmlns:ns="http://www.ipau
stralia.gov.au/soap/cmf"
languageSpecificType="java:javax.activation.DataHandler"
serializer="au.gov.ipaustralia.cmf.axis.ser.JAFDataHandlerSerializerFactory
"
deserializer="au.gov.ipaustralia.cmf.axis.ser.JAFDataHandlerDeserializerFac
tory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
11:56:44,095 INFO [TMServiceMBeanImpl] Starting eService:service=tmeformjmx
11:56:44,798 INFO [TMServiceMBeanImpl] JMS Listener successfully started for eS
ervice:service=tmeformjmx
********************************************
This service is listening messages from other application. As soon as this service receives a message it calls a ejb which is deployed as EAR in weblogic server instance. I have a service locator class which is getting the reference of home interface of the EJB.
I am not able to get this thing working.The error I am getting is.
{http://xml.apache.org/axis/}stackTrace: java.lang.reflect.InvocationTar
getException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
Caused by: java.lang.NoClassDefFoundError: No ClassLoaders found for: au.gov.ipa
ustralia.tmeform.trademark.TradeMarkHome
at au.gov.ipaustralia.tmeformjmx.ServiceLocatorMBean.class$(ServiceLocat
orMBean.java:27) at au.gov.ipaustralia.tmeformjmx.ServiceLocatorMBean.getTradeMarkHome(Se
rviceLocatorMBean.java:80)
at au.gov.ipaustralia.tmeformjmx.TMeFormService.handleIncomingCorrespond
ence(TMeFormService.java:156)
at au.gov.ipaustralia.cmf.common.correspondence.CorrespondenceService.pr
ocessCorrespondence(CorrespondenceService.java:90)
... 30 more
As far as understood it. the problem is due to class between different class loaders.I am confident about this as I tried doing this in my class.
logger.debug("this.getClass"+this.getClass().getClassLoader());
and response i got is:
org.jboss.mx.loading.UnifiedClassLoader3@1a6a1a7{ url=file:/D:/jboss-3.2.5/server/default/tmp/deploy/tmp23532tmeformjmx.sar ,addedOrder=9}
AND when i tried this.
logger.debug("o.getclass"+o.getClass().getClassLoader());
i got this response..
weblogic.utils.classloaders.GenericClassLoader@1c3fd59 finder: ServletClassFinder(http://10.0.3.141:9001/bea_wls_internal/classes/_appsdir_TMEFORM_ear%40/)
Please suggest a solution for this problem.
--Pankaj
U can mail me at pankaj.srivastava@ipaustralia.gov.au