AppD Archive

Can't install java agent on jboss 7.1.1

CommunityUser
Splunk Employee
Splunk Employee

My application deploys well as normal, but as soon as I install the java agent I get the following error:

Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.postgresql.xa.PGXAConnection.getXAResource()Ljavax/transaction/xa/XAResource;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/postgresql/xa/PGXAConnection, and the class loader (instance of <bootloader>) for interface javax/sql/XAConnection have different Class objects for the type on/xa/XAResource; used in the signature
  at org.postgresql.xa.jdbc3.AbstractJdbc3XADataSource.getXAConnection(AbstractJdbc3XADataSource.java:55)
  at org.postgresql.xa.jdbc3.AbstractJdbc3XADataSource.getXAConnection(AbstractJdbc3XADataSource.java:39)
  at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:430)

Any ideas?

CommunityUser
Splunk Employee
Splunk Employee

Hey,

We are getting the same issue with mysql drive and jboss 7.1.1

Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.getXAResource()Ljavax/transaction/xa/XAResource;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, com/mysql/jdbc/jdbc2/optional/MysqlXAConnection, and the class loader (instance of <bootloader>) for interface javax/sql/XAConnection have different Class objects for the type javax/transaction/xa/XAResource; used in the signature
at com.mysql.jdbc.jdbc2.optional.MysqlXADataSource.wrapConnection(MysqlXADataSource.java:76) [mysql-connector-java-5.1.24.jar:]
at com.mysql.jdbc.jdbc2.optional.MysqlXADataSource.getXAConnection(MysqlXADataSource.java:63) [mysql-connector-java-5.1.24.jar:]
at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:430)

Only happens for xa-datasources, 

<xa-datasource jndi-name="java:jboss/datasources/123DataSource" pool-name="123DataSource" enabled="true" use-java-context="true">
<xa-datasource-property name="URL">
jdbc:mysql://server.example.com:3306/database?characterEncoding=UTF-8&amp;useUnicode=true
</xa-datasource-property>
<driver>mysql</driver>
<xa-pool>
<max-pool-size>10</max-pool-size>
</xa-pool>
<security>
<user-name>username</user-name>
<password>password</password>
</security>
<timeout>
<idle-timeout-minutes>2</idle-timeout-minutes>
</timeout>
<statement>
<prepared-statement-cache-size>5</prepared-statement-cache-size>
<share-prepared-statements>true</share-prepared-statements>
</statement>
</xa-datasource>

0 Karma

Arun_Dasetty
Super Champion

Hi,

Can you please provide the startup scripts used to add -javaagent, if restarting jboss server does not help after adding the following jvm arg:

-Dappdynamics.bciengine.class.lookahead=!*

Also can you confirm whether you have added -javaagent arg in both -Xbootclasspath and java_opts, if this is the case, please remvoe javaagent.jar entry -Xbootclasspath args.

Thanks,

Arun

0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...