Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

WebSphere 8: el-api-1.0.jar (in app) conflicts with javax.j2ee.el.jar (in WebSphere)

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I know there are discussions on the internet about migrating applications from WAS 6.1 to WAS 8, but neither of them mentions explicitly this point:

The whole thing gets stuck when WAS 8 tries to load javax.el.ExpressionFactory from el-api.jar (included in the EAR). At this point, however, it has already loaded it from javax.j2ee.el.jar. (Which didn't exist in WAS 6.1.) If you switch on verbose class loading:

class load: javax.el.ExpressionFactory from: file:/C:/Program Files/IBM/WebSphere/AppServer/plugins/javax.j2ee.el.jar
(BEFORE you would even install the application!)

It seems, since this latter jar is already loaded before one would install the EAR of the application containing el-api.jar, WAS 8 stumbles upon a class loading conflict, regardless of whether you've specified for it to use the PARENT_LAST class loading strategy or not.

I can compile and install the application by using javax.j2ee.el.jar instead of el-api.jar in it, but on the one hand I'm not aware of what long-term consequences this might have, on the other hand the ultimate goal would be to be able to install the original EAR (containing its own JSF libraries etc.) on the WAS 8 server with as few modifications as possible.

Is there a way to tell the WAS 8 server to reload the possibly conflicting classes in the application from el-api.jar or even not to load javax.j2ee.el.jar in the first place? (Like I mentioned, specifying PARENT_CLASS doesn't have any effect on this.)


Thanks,
Agoston




The exception by the way that is thrown when WAS 8 tries to load javax.el.ExpressionFactory from el-api.jar (when starting the installed application):

(Sorry that it's in German, some googling identifies the Eglish version of this error message as:
'java.lang.LinkageError: loading constraint violation: loader "com/ibm/ws/classloader/CompoundClassLoader@1ef123a" previously initiated loading for a different type with name "javax/el/ExpressionFactory" defined by loader org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader@1f75d64"')


java.lang.LinkageError: Übertretung der Ladeeinschränkung: Ladeprogramm "com/ibm/ws/classloader/CompoundClassLoader@1ef123a" hat zuvor das Laden für einen anderen Typ mit dem Namen "javax/el/ExpressionFactory", der durch Ladeprogramm "org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader@1f75d64" definiert ist, eingeleitet.
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:262)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:829)
at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:744)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:585)
at java.lang.ClassLoader.loadClass(ClassLoader.java:627)
at java.lang.Class.getDeclaredFieldsImpl(Native Method)
at java.lang.Class.getDeclaredFields(Class.java:546)
at com.ibm.ffdc.util.formatting.Introspector$1.run(Introspector.java:138)
at com.ibm.ffdc.util.formatting.Introspector$1.run(Introspector.java:136)
at java.security.AccessController.doPrivileged(AccessController.java:254)
at com.ibm.ffdc.util.formatting.Introspector.getDeclaredFields(Introspector.java:135)
at com.ibm.ffdc.util.formatting.Introspector.formatTo(Introspector.java:94)
at com.ibm.ffdc.util.provider.IncidentStream$2.writeTo(IncidentStream.java:194)
at com.ibm.ffdc.util.provider.IncidentStream.write(IncidentStream.java:198)
at com.ibm.ffdc.util.provider.IncidentStream.write(IncidentStream.java:129)
at com.ibm.ffdc.util.formatting.JavaUtilFormatter.formatTo(JavaUtilFormatter.java:56)
at com.ibm.ffdc.util.formatting.JavaUtilFormatter.formatTo(JavaUtilFormatter.java:42)
at com.ibm.ffdc.util.provider.IncidentStream$2.writeTo(IncidentStream.java:194)
at com.ibm.ffdc.util.provider.IncidentStream.write(IncidentStream.java:198)
at com.ibm.ffdc.util.provider.IncidentStream.write(IncidentStream.java:129)
at com.ibm.ffdc.util.formatting.Introspector.formatTo(Introspector.java:109)
at com.ibm.ffdc.util.provider.IncidentStream$2.writeTo(IncidentStream.java:194)
at com.ibm.ffdc.util.provider.IncidentStream.write(IncidentStream.java:198)
at com.ibm.ffdc.util.provider.IncidentStream.write(IncidentStream.java:129)
at com.ibm.ws.ffdc.impl.DMAdapter.formatTo(DMAdapter.java:88)
at com.ibm.ffdc.util.provider.IncidentLogger.writeIncidentTo(IncidentLogger.java:63)
at com.ibm.ws.ffdc.impl.FfdcProvider.logIncident(FfdcProvider.java:205)
at com.ibm.ws.ffdc.impl.FfdcProvider.logIncident(FfdcProvider.java:136)
at com.ibm.ffdc.util.provider.FfdcProvider.log(FfdcProvider.java:251)
at com.ibm.ws.ffdc.impl.FfdcProvider.log(FfdcProvider.java:149)
at com.ibm.ffdc.util.provider.IncidentEntry.log(IncidentEntry.java:105)
at com.ibm.ffdc.util.provider.Ffdc.log(Ffdc.java:94)
at com.ibm.ws.ffdc.FFDCFilter.processException(FFDCFilter.java:114)
at com.ibm.wsspi.webcontainer.util.FFDCWrapper.processException(FFDCWrapper.java:6)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1653)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:410)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:422)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:714)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1160)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1369)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:638)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:967)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:766)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1354)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2150)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:663)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5413)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5539)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:677)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:621)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1335)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1228)
at com.ibm.ws.management.commands.AdminServiceCommands$InvokeCmd.execute(AdminServiceCommands.java:251)
at com.ibm.ws.console.core.mbean.MBeanHelper.invoke(MBeanHelper.java:241)
at com.ibm.ws.console.appdeployment.ApplicationDeploymentCollectionAction.execute(ApplicationDeploymentCollectionAction.java:564)
at org.apache.struts.action.RequestProcessor.processActionPerform(Unknown Source)
at org.apache.struts.action.RequestProcessor.process(Unknown Source)
at org.apache.struts.action.ActionServlet.process(Unknown Source)
at org.apache.struts.action.ActionServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1214)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:125)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:926)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1023)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:1384)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:193)
at org.apache.struts.action.RequestProcessor.doForward(Unknown Source)
at org.apache.struts.tiles.TilesRequestProcessor.doForward(Unknown Source)
at org.apache.struts.action.RequestProcessor.processForwardConfig(Unknown Source)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Unknown Source)
at org.apache.struts.action.RequestProcessor.process(Unknown Source)
at org.apache.struts.action.ActionServlet.process(Unknown Source)
at org.apache.struts.action.ActionServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1214)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:125)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:92)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.setUpCommandAssistance(WSCUrlFilter.java:950)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.continueStoringTaskState(WSCUrlFilter.java:499)
at com.ibm.ws.console.core.servlet.WSCUrlFilter.doFilter(WSCUrlFilter.java:320)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:926)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1023)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:895)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659)
 
Saloon Keeper
Posts: 22289
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WebSphere contains its own copies of the JSF and EL jars within itself. You apparently included some or all of these in your WAR and thus there is a conflict. If possible, remove them from your WAR. If not, you will have to wrestle with some WebSphere settings to make it work, and I sincerely hope you find it easier than I did.

Because this is really a WAS question, I'm moving it to the WebSphere forum.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic