1 Reply Latest reply: Jun 12, 2012 6:06 AM by Xuetao Niu RSS

el-api-2.2.1-b04.jar and jstl-1.0.6.jar within app conflicting with jboss as 5.1.2

Xuetao Niu Newbie

Hello,

 

My ear file contains a war that has el-api-2.2.1-b04.jar and jstl-1.0.6.jar under the lib folder of the war. I also put jboss-classloading.xml file under the META-INF folder of the ear to let it load fisrt from ear instead of jboss system. The content is below:

 

<classloading xmlns="urn:jboss:classloading:1.0"

domain="myappdomain"

export-all="NON_EMPTY"

import-all="true"

parent-first="false">

</classloading>

 

But with or without the  jboss-classloading.xml file, I get the same error (which looks like incompatible class being loaded) as below while deploying the ear:

 

java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.addELContextListener(Ljavax/el/ELContextListener;)V" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, org/apache/myfaces/webapp/Jsp21FacesInitializer, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ELContextListener used in the signature

          at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:64)

          at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:140)

          at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:111)

          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4389)

          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:313)

          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:145)

          at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

          at org.jboss.web.deployers.WebModule.startModule(WebModule.java:122)

          at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

          at $Proxy38.start(Unknown Source)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)

          at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

          at org.jboss.system.ServiceController.start(ServiceController.java:460)

          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55)

          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1172)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1193)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1225)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1113)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:826)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:556)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:789)

          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:699)

          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:409)

          at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:294)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

          at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)

          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:662)

 

Removing these 2 jars from the war makes it deployable on jboss, but I do need to have these jars stay under the war because running on weblogic and websphere need these jars.

 

Please help me working out how to let the ear work in jboss 5.1.2.

 

Thanks a lot!

 

Xuetao Niu