java - Issue with XAResource class load in Jboss AS 7.1 -


i'm having annoying issue class being loaded 2 times de ojdbc6 driver in jboss 7.1. have researched through google , haven't found answer.

this problem: have 2 ears being deployed in jboss, 1 of them has in it's jboss-deployment-structure dependency oracle module in jboss, witch depends on javax.api , javax.transaction.api. other ear executes liquibase change control on it's startup using ant task, ant task has classpath jars needed run liquibase (the oracle driver same 1 in jboss modules). in standalone-full.xml have xa:datasources defined needed first ear.

now, problem when server starts , after liquibase change controls executes correctly, connections xa:datasources cannot created because of error:

11:56:00,029 warn  [org.jboss.jca.core.connectionmanager.pool.strategy.poolbysubject] (msc service thread 1-6) ij000604: throwable while attempting new connection: null: javax.resource.resourceexception: not create connection @ org.jboss.jca.adapters.jdbc.xa.xamanagedconnectionfactory.getxamanagedconnection(xamanagedconnectionfactory.java:447) [ironjacamar-jdbc-1.0.9.final.jar:1.0.9.final] @ org.jboss.jca.adapters.jdbc.xa.xamanagedconnectionfactory.createmanagedconnection(xamanagedconnectionfactory.java:385) [ironjacamar-jdbc-1.0.9.final.jar:1.0.9.final] @ org.jboss.jca.core.connectionmanager.pool.mcp.semaphorearraylistmanagedconnectionpool.createconnectioneventlistener(semaphorearraylistmanagedconnectionpool.java:761) @ org.jboss.jca.core.connectionmanager.pool.mcp.semaphorearraylistmanagedconnectionpool.getconnection(semaphorearraylistmanagedconnectionpool.java:343) @ org.jboss.jca.core.connectionmanager.pool.abstractpool.getsimpleconnection(abstractpool.java:397) @ org.jboss.jca.core.connectionmanager.pool.abstractpool.getconnection(abstractpool.java:365) @ org.jboss.jca.core.connectionmanager.abstractconnectionmanager.getmanagedconnection(abstractconnectionmanager.java:329) @ org.jboss.jca.core.connectionmanager.tx.txconnectionmanagerimpl.getmanagedconnection(txconnectionmanagerimpl.java:368) @ org.jboss.jca.core.connectionmanager.abstractconnectionmanager.allocateconnection(abstractconnectionmanager.java:464) @ org.jboss.jca.adapters.jdbc.wrapperdatasource.getconnection(wrapperdatasource.java:129) [ironjacamar-jdbc-1.0.9.final.jar:1.0.9.final] @ org.hibernate.service.jdbc.connections.internal.datasourceconnectionproviderimpl.getconnection(datasourceconnectionproviderimpl.java:141) [hibernate-core-4.0.1.final.jar:4.0.1.final] @ org.hibernate.engine.jdbc.internal.jdbcservicesimpl$connectionproviderjdbcconnectionaccess.obtainconnection(jdbcservicesimpl.java:253) [hibernate-core-4.0.1.final.jar:4.0.1.final] @ org.hibernate.engine.jdbc.internal.jdbcservicesimpl.configure(jdbcservicesimpl.java:119) [hibernate-core-4.0.1.final.jar:4.0.1.final] @ org.hibernate.service.internal.standardserviceregistryimpl.configureservice(standardserviceregistryimpl.java:75) [hibernate-core-4.0.1.final.jar:4.0.1.final] @ org.hibernate.service.internal.abstractserviceregistryimpl.initializeservice(abstractserviceregistryimpl.java:159) [hibernate-core-4.0.1.final.jar:4.0.1.final] @ org.hibernate.service.internal.abstractserviceregistryimpl.getservice(abstractserviceregistryimpl.java:131) [hibernate-core-4.0.1.final.jar:4.0.1.final] @ org.hibernate.cfg.settingsfactory.buildsettings(settingsfactory.java:71) [hibernate-core-4.0.1.final.jar:4.0.1.final] @ org.hibernate.cfg.configuration.buildsettingsinternal(configuration.java:2270) [hibernate-core-4.0.1.final.jar:4.0.1.final] @ org.hibernate.cfg.configuration.buildsettings(configuration.java:2266) [hibernate-core-4.0.1.final.jar:4.0.1.final] @ org.hibernate.cfg.configuration.buildsessionfactory(configuration.java:1735) [hibernate-core-4.0.1.final.jar:4.0.1.final] @ org.hibernate.cfg.configuration.buildsessionfactory(configuration.java:1775) [hibernate-core-4.0.1.final.jar:4.0.1.final] @ saes.util.hibernatedb.init(hibernatedb.java:1047) [session.jar:] @ saes.admin.init.servlet.initservlet.init(initservlet.java:105) [session.jar:] @ saes.admin.init.servlet.reisinitservlet.init(reisinitservlet.java:57) [session.jar:] @ javax.servlet.genericservlet.init(genericservlet.java:242) [jboss-servlet-api_3.0_spec-1.0.0.final.jar:1.0.0.final] @ org.apache.catalina.core.standardwrapper.loadservlet(standardwrapper.java:1202) [jbossweb-7.0.13.final.jar:] @ org.apache.catalina.core.standardwrapper.load(standardwrapper.java:1102) [jbossweb-7.0.13.final.jar:] @ org.apache.catalina.core.standardcontext.loadonstartup(standardcontext.java:3655) [jbossweb-7.0.13.final.jar:] @ org.apache.catalina.core.standardcontext.start(standardcontext.java:3873) [jbossweb-7.0.13.final.jar:] @ org.jboss.as.web.deployment.webdeploymentservice.start(webdeploymentservice.java:90) [jboss-as-web-7.1.1.final.jar:7.1.1.final] @ org.jboss.msc.service.servicecontrollerimpl$starttask.startservice(servicecontrollerimpl.java:1811) @ org.jboss.msc.service.servicecontrollerimpl$starttask.run(servicecontrollerimpl.java:1746) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) [rt.jar:1.7.0_21] @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) [rt.jar:1.7.0_21] @ java.lang.thread.run(thread.java:722) [rt.jar:1.7.0_21] caused by: java.lang.linkageerror: loader constraint violation in interface itable initialization: when resolving method "oracle.jdbc.xa.client.oraclexaconnection.getxaresource()ljavax/transaction/xa/xaresource;" class loader (instance of org/jboss/modules/moduleclassloader) of current class, oracle/jdbc/xa/client/oraclexaconnection, , class loader (instance of <bootloader>) interface javax/sql/xaconnection have different class objects type ransaction/xa/xaresource; used in signature @ oracle.jdbc.xa.client.oraclexadatasource.getpooledconnection(oraclexadatasource.java:469) @ oracle.jdbc.xa.client.oraclexadatasource.getxaconnection(oraclexadatasource.java:156) @ oracle.jdbc.xa.client.oraclexadatasource.getxaconnection(oraclexadatasource.java:130) @ org.jboss.jca.adapters.jdbc.xa.xamanagedconnectionfactory.getxamanagedconnection(xamanagedconnectionfactory.java:430) [ironjacamar-jdbc-1.0.9.final.jar:1.0.9.final] ... 34 more 

after debugging have concluded when liquibase executes jboss loads oracle driver first time , uses (loads) xaresource rt.jar of jre after when other ear tries create connections datasources uses oracle in jboss modules loads xaresource class javax.transaction.api module server throws exception.

is there way use class loader liquibase execution or tell xaresource class must not loaded rt.jar? have encounter issue before or have idea how solve it?

thank can give


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -