After patching EAP 6.4.9 to 6.4.13 we have a class loading issue
peter_schmid Apr 25, 2017 5:27 AMWe patched our JBoss EAP 6.4.9 to 6.4.13. Our application (.ear) uses the OSLC4J library which is Apache Wink based. Therefore we excluded javaee.api via jboss-deployment-structure.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<ear-subdeployments-isolated>false</ear-subdeployments-isolated>
<deployment>
<exclude-subsystems>
<subsystem name="jaxrs" />
<subsystem name="resteasy" />
<subsystem name="webservices" />
</exclude-subsystems>
<exclusions>
<module name="javaee.api" />
</exclusions>
<dependencies>
<!--
find com.sun.net.httpserver.HttpPrincipal out of jre/lib/rt.jar:
see http://stackoverflow.com/questions/12492717/jboss-7-1-1-add-rt-jar-of-jre-to-classpath
-->
<system export="true">
<paths>
<path name="com/sun/net/httpserver"/>
</paths>
</system>
<module name="com.oracle.ojdbc6" />
</dependencies>
</deployment>
<sub-deployment name="subdeployment.war" >
<exclusions>
<module name="javaee.api" />
</exclusions>
</sub-deployment>
</jboss-deployment-structure>
After the patch we get a runtime exception like this:
java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest from [Module "deployment.eASEE-oslc-proxy-ear-1.0.0.39401.ear:main" from Service Module Loader]
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459)
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408)
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389)
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134)
org.eclipse.lyo.oslc4j.core.OSLC4JUtils.resolveURI(OSLC4JUtils.java:203)
org.eclipse.lyo.oslc4j.provider.json4j.AbstractOslcRdfJsonProvider.writeTo(AbstractOslcRdfJsonProvider.java:127)
org.eclipse.lyo.oslc4j.provider.json4j.OslcRdfJsonArrayProvider.writeTo(OslcRdfJsonArrayProvider.java:85)
org.eclipse.lyo.oslc4j.provider.json4j.OslcRdfJsonArrayProvider.writeTo(OslcRdfJsonArrayProvider.java:38)
org.apache.wink.server.internal.handlers.FlushResultHandler.handleResponse(FlushResultHandler.java:199)
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:38)
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:39)
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.handlers.AbstractHandler.handleResponse(AbstractHandler.java:39)
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.internal.log.Responses.handleResponse(Responses.java:90)
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:26)
org.apache.wink.server.handlers.ResponseHandlersChain.handle(ResponseHandlersChain.java:22)
org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:63)
org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHandlersChain.java:48)
org.apache.wink.server.internal.RequestProcessor.handleRequestWithoutFaultBarrier(RequestProcessor.java:212)
org.apache.wink.server.internal.RequestProcessor.handleRequest(RequestProcessor.java:154)
org.apache.wink.server.internal.servlet.RestServlet.service(RestServlet.java:119)
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
com.bosch.de.cdgsmt.emt4.oslc4j.scm.filter.UAESFilter.doFilter(UAESFilter.java:58)
OSLC4J imports Glassfish servlet libraries for compilation. I suspect at runtime OSLC4J tries to refer to the HttpServletRequest provided by the Glassfish .jar and gets JBoss's own implementation. Maybe I'm completely wrong...
Any help would be highly appreciated. Thank you!