AppD Archive

Jboss 7.1.1 LinkageError

CommunityUser
Splunk Employee
Splunk Employee

Hi,

I'm seeing the LinkageError although I added the -Dappdynamics.bciengine.class.lookahead=!* startup param as described in http://docs.appdynamics.com/display/PRO13S/JBoss+Startup+Settings#JBossStartupSettings-LinkageError :

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)
        ... 26 more

I'm using version JBoss AS 7.1.1.Final, with Postgres 9.2 module jar.

Tnx,

Dejan

0 Karma

Arun_Dasetty
Super Champion

Hi Dejan,

We see this happens due to 2 different class loaders are trying to load "javax/transaction/xa/XAResource" class and it has different instances in both the classloader.

Can you please add following JVM options and provide us the application server logs

-XX:+TraceLoaderConstraints
-verbose:class

Also provide the zipped version of agent logs collected before above changes.

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun,

Please find the requested logs attached.

Dejan

0 Karma

Arun_Dasetty
Super Champion

Hi Dejan,

Can you see if the rt.jar from jdk is loaded multiple times /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar,

Check whether the same jar is part of existing webapp classpath libs which should not required as it is already available by default java classpath?

Make sure the duplicate lib is removed and restart jboss and see how it goes. If the issues still persists can you send the jboss startup scripts we would like to the placement of -D lookahead property as we see earlier using that property should already have fixed here.

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun,

From the logs I sent you earlier, I see that rt.jar is loaded only once, from /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar .

Here are the jboss startup scripts I used most recently, with lookahead property moved to the beginning (still not working).

Dejan

0 Karma

Arun_Dasetty
Super Champion

Hi Dejan,

Can you help us confirm if the libs having the following classes are duplicated in class path ? in reference to error:

PGXAConnection, XAResource,

===========================

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

===========================

if yes, redeploy the app with making sure that any lib is not duplicate in jboss classpath at runtime.

Also let us know if the following is an option here:

- Have fresh instance of JBoss (same version ) with no webapps deployed

- configure agent and check whether jboss starts fine without error, this helps to narrow the issue further

Keep us posted how it goes, if the above suggestion does not help, Can you please raise a ticket at https://help.appdynamics.com/tickets/new Or send email to help@appdynamics.com with issue description so that support team will try to get in call to find resolution quickly?

Regards,

Arun

0 Karma

Arun_Dasetty
Super Champion

Hi Dejan,

We see you have raised a ticket and this ticket might get suspended/will be marked invalid as currently we see you do not have help center access at portal site , can you please raise a separate ticket request help center access , also we request you to get intouch with your sales representative to see if he can grant you help.appdynamics.com account access/permissions to your user id dejan@targettrade.com before you file a ticket, let us know if that information helps.

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Arun,

No, I couldn't raise the ticket (probably because of those access rights), so I just sent an email to your help center. They must have opened it themselves.


Dejan

0 Karma

Arun_Dasetty
Super Champion

Hi Dejan,

I had raised an internal ticket to get Dev inputs on further plan of action in refenrence to help ticket # 19930 you have raised.


Meantime, Can you please let us know if trying the following steps is an option here , we understood that it :
- take a backup of your jboss-transaction-api_1.1_spec-1.0.0.Final.jar and move the lib out of classpath to somewhere in backup directory
- copy the attached the jboss-transaction-api_1.1_spec-1.0.0.Final.jar file in your classpath
- start the jboss with lookahead -D jvm arg placed and see whether you got the LinkageError on same XAResource class or Other?

Please revert the lib if you see any instability with your webapp functionality.

Regards,

Arun

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...