We are migrating from JBoss 5.1 (Java 6) to JBoss 6.1 (Java 7). What we are migration is a web application with WS clients etc., After resolving the initial compilation, and runtime class cast exceptions, we are at a point where the application loads up the initial authentication page. For authentication, we are dependent on an external component, packaged in a jar file. We are seeing a runtime error of LinkageError. I have to add that before migration we have a ds.xml (data source xml file) in the 5.1 server deploy folder. We had to port it to peristence.xml as we were getting could not find "null" resource. I am not sure what is causing this issue. I searched but could not understand the issue.
Below is the error code please shed some light, if possible.
Login failure: javax.security.auth.login.LoginException: java.lang.LinkageError: loader constraint violation: when resolving interface method "org.hibernate.engine.SessionFactoryImplementor.getTransactionManager()Ljavax/transaction/TransactionManager;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, org/springframework/orm/hibernate3/SessionFactoryUtils, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, org/hibernate/engine/SessionFactoryImplementor, have different Class objects for the type ager()Ljavax/transaction/TransactionManager; used in the signature at org.springframework.orm.hibernate3.SessionFactoryUtils.getJtaTransactionManager(SessionFactoryUtils.java:172)
<?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd" > <persistence-unit name="aDataSource"> <jta-data-source>java:/A-DataSource</jta-data-source> </persistence-unit> <persistence-unit name="bDataSource"> <jta-data-source>java:/CDS</jta-data-source> </persistence-unit> </persistence>