Spring 3.0.5 & JPA2 WAR causes JBoss AS6 deployment trouble
benze Sep 25, 2011 10:30 PMI've got a Tomcat 7 war application that builds and deploys perfectly in Tomcat. I am now required to port the application over to JBoss AS6. The application is a Spring 3.0.5/Hibernate 3/JPA2/Quartz 1.8.5 application.
I have configured by mysql DS in JBoss, and am expecting errors as I go through the process of trying to get it to work, but I've hit an error with no detailed explanation, so have no idea how to determine what/where the problem lies.
Upon my first load, I got the following error message:
{code}
WARN [org.jboss.detailed.classloader.ClassLoaderManager] (RMI TCP Connection(2)-127.0.0.1) Unexpected error during load of:javax.transaction.xa.XAResource: java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) previously initiated loading for a different type with name "javax/transaction/xa/XAResource"
{/code}
Based on some postings I found, they suggested removing any packages providing javax.transaction.* in my war. I have done that, excluding it from the Quartz package as well as marking it as a provided lib elsewhere in my pom.xml.
My new error now, however is:
{code}
2011-09-24 00:58:34,246 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (RMI TCP Connection(2)-127.0.0.1) Error installing to PostClassLoader: name=vfs:///home/eric/.eclipse/workspace3/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1316801763095/deploy/webapp.war state=ClassLoader mode=Manual requiredState=PostClassLoader: org.jboss.deployers.spi.DeploymentException: Deployment error processing fragment for JAR: java-1.0-SNAPSHOT.jar
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]
...
...
...
Caused by: java.lang.IllegalStateException: Unresolved conflict on resource environment reference named: systemConfiguration
at org.jboss.metadata.javaee.spec.ResourceEnvironmentReferencesMetaData.augment(ResourceEnvironmentReferencesMetaData.java:78) [:2.0.0.Alpha24]
at org.jboss.metadata.javaee.spec.RemoteEnvironmentRefsGroupMetaData.augment(RemoteEnvironmentRefsGroupMetaData.java:580) [:2.0.0.Alpha24]
at org.jboss.metadata.javaee.spec.EnvironmentRefsGroupMetaData.augment(EnvironmentRefsGroupMetaData.java:191) [:2.0.0.Alpha24]
at org.jboss.metadata.web.spec.WebCommonMetaData.augment(WebCommonMetaData.java:941) [:2.0.0.CR1]
at org.jboss.web.deployers.MergedJBossWebMetaDataDeployer.deploy(MergedJBossWebMetaDataDeployer.java:390) [:6.0.0.Final]
... 70 more{/code}
Now I know that the java-1.0-SNAPSHOT.jar package is my main app code. In it, I have a spring bean called "systemConfiguration". However, I do not understand what "Unresolved conflict on resource environment reference" means, nor how to even begin to try and solve it.
If anyone can provide some insight into what the error means and/or how I could get additional debug information from JBoss AS6 to understand how to resolve this error? Renaming the bean is not really an option as it is referenced in annotations in several parts of the code.
Thanks!
Eric