[JCA/JBoss] - Classloaders problem with jca
by xaleyba
Hi
I'm trying to test my application related to a jca resource adapter I did and a webservices that use such ra.
In my web services I did:
|
|
| InitialContext context = new InitialContext(CicsConfigHelper.getJndiProperties());
|
| CdsConnectionFactoryImpl cxFactory = (CdsConnectionFactoryImpl) context
| .lookup("java:/CicsDS");
|
| CdsRecordFactoryImpl recordFactory = (CdsRecordFactoryImpl) cxFactory.getRecordFactory();
| CdsIndexedRecordImpl input = (CdsIndexedRecordImpl) recordFactory.createIndexedRecord(CdsIndexedRecord.INPUT);
| input.add(data.toString());
|
| CdsIndexedRecordImpl output = (CdsIndexedRecordImpl) recordFactory.createIndexedRecord(CdsIndexedRecord.OUTPUT);
|
| CdsConnection connection = (CdsConnection) cxFactory.getConnection();
|
| CdsInteractionSpecImpl ispec = new CdsInteractionSpecImpl(); ispec.setFunctionName(CdsInteractionSpec.CICS_OPERATION_FUNCTION);
|
| CdsInteractionImpl interaction = (CdsInteractionImpl) connection.createInteraction();
|
| if (interaction.execute((InteractionSpec) ispec, (Record)input, (Record)output)) {
|
| message = (String) output.get(CdsIndexedRecord.MESSAGE_FIELD);
|
| } else {
| logger.error("Execute was false");
| }
|
|
But when I call this web services I receive a throwable as follows:
| 13:57:15,159 INFO [STDOUT] java.lang.LinkageError: loader constraint violation:
| when resolving method "com.bs.cds.jca.CdsInteractionImpl.execute(Ljavax/resourc
| e/cci/InteractionSpec;Ljavax/resource/cci/Record;Ljavax/resource/cci/Record;)Z"
| the class loader (instance of org/jboss/web/tomcat/tc5/WebAppClassLoader) of the
| current class, com/bs/cics/ws/CicsWSImpl, and the class loader (instance of org
| /jboss/mx/loading/UnifiedClassLoader3) for resolved class, com/bs/cds/jca/CdsInt
| eractionImpl, have different Class objects for the type javax/resource/cci/Inter
| actionSpec used in the signature
|
My web service is inside an ear that comes with an axis1.3.war.
I've tested placing the jar file with my jca classes inside the rar file and outside, in the server instance lib directory, always with same problem.
The problem occurs when execute method is invoked.
Could some body please tell me how could I solve the problem ?
Thanks in advance
J
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063955#4063955
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063955
19Â years
[JBoss Seam] - seam 1.2.1 on WAS: NoClassDefFoundError: org.jboss.system.Se
by titou09
Running seam 1.2.1 on WebSphere v6.1.0.9, I get this exception:
| java.lang.NoClassDefFoundError: org.jboss.system.ServiceMBeanSupport
| at java.lang.ClassLoader.defineClassImpl(Native Method)
| at java.lang.ClassLoader.defineClass(ClassLoader.java:228)
| at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148)
| at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:526)
| at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:477)
| at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:382)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
| at java.lang.ClassLoader.defineClassImpl(Native Method)
| at java.lang.ClassLoader.defineClass(ClassLoader.java:228)
| at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148)
| at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:526)
| at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:477)
| at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:382)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
| at org.jboss.seam.util.Reflections.classForName(Reflections.java:159)
| at org.jboss.seam.init.Initialization.addSpecialComponents(Initialization.java:774)
| at org.jboss.seam.init.Initialization.init(Initialization.java:502)
| at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
| at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:637)
| at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:295)
| at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:285)
| at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:88)
| at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
| at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:655)
| at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:608)
| at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335)
| at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)
| at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1312)
| at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1129)
| at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)
| at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:814)
| at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:965)
| at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1495)
| at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:3995)
| at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4092)
| at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245)
| at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1500)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| at java.lang.reflect.Method.invoke(Method.java:615)
| at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
| at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| at java.lang.reflect.Method.invoke(Method.java:615)
| at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
| at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1089)
| at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:971)
| at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
| at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
| at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
| at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
| at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1080)
| at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
| at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:973)
| at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:139)
| at com.ibm.ws.management.connector.rmi.RMIConnectorService.invoke(RMIConnectorService.java:179)
| at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie.invoke(_RMIConnectorService_Tie.java:395)
| at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie._invoke(_RMIConnectorService_Tie.java:160)
| at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613)
| at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466)
| at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
| at com.ibm.CORBA.iiop.ORB.process(ORB.java:1553)
| at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2680)
| at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2554)
| at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
| at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
| at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
|
The only place where I see this class ,is in ajar called "lib/jboss-ejb3-all.jar"
I don't want to include this jar on my classpath because:
- I'm running on WebSphere, not Jboss
- I don'T use EJB3 but plain POJOs
The classe I have on my classpath (which is , to me, the minimal set opf jar to run seam + hibernate + POJOs):
| WAR: axis.jar;el-api.jar;el-ri.jar;jboss-cache-jdk50.jar;jboss-seam-ui.jar;jboss-seam.jar;jsf-api.jar;jsf-facelets.jar;jsf-impl.jar
| EAR: commons-logging-1.1.jar;hibernate-validator.jar;dom4j-1.6.1.jar;javassist.jar;hibernate-annotations.jar;hibernate-commons-annotations.jar;commons-collections-3.1.jar;commons-beanutils-1.7.0.jar;commons-codec-1.3.jar;commons-digester-1.6.jar;commons-lang-2.1.jar;log4j-1.2.14.jar;antlr-2.7.6.jar;asm-attrs.jar;asm.jar;cglib-2.1.3.jar;ejb3-persistence.jar;hibernate3.jar;junit-4.3.1.jar
|
It seems that there is a dependency problem here
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063953#4063953
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063953
19Â years