Why JBoss EAP 6 is unable to load some of the JDK provided classes

Solution Verified - Updated -

Issue

  • We have observed that EAP6 is unable to load some of the JDK provided classes.

  • I have a static module used that requires classes found in JAR files that are included in the BOOTCLASSPATH but not in the rt.jar file. How can I make the module see them?

  • We are getting the following exception when an application deployed on JBoss EAP6 tries to load the "sun.net.www.protocol.http.HttpURLConnection" class:

ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/SimpleBindDemo].[jsp]] (http-localhost/127.0.0.1:8080-1) Servlet.service() for servlet jsp threw exception: java.lang.ClassNotFoundException: sun.net.www.protocol.http.HttpURLConnection from [Module "deployment.SimpleBindDemo.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
    at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131) [jbossweb-7.0.16.Final-redhat-1.jar:]
    at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:67) [jbossweb-7.0.16.Final-redhat-1.jar:]
    at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_32]
    at java.lang.Class.forName(Class.java:169) [rt.jar:1.6.0_32]
    at org.apache.jsp.index_jsp._jspService(index_jsp.java:56)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) [jbossweb-7.0.16.Final-redhat-1.jar:]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-1.jar:1.0.1.Final-redhat-1]

AND

Unable to load security provider: 
java.lang.ClassNotFoundException: com.sun.net.ssl.internal.ssl.Provider from [Module "deployment.SecureApp.ear:main" from Service Module Loader]
       at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
       at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
       at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
       at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
       at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:186)

AND

ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ABC]] (ServerService Thread Pool -- 49) JBWEB000289: Servlet MyServlet threw load() exception: java.lang.NoClassDefFoundError: sun/security/action/GetPropertyAction
  • NoClassDefFoundError using resteasy
Servlet.service() for servlet any-servlet threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.NoClassDefFoundError: com/sun/org/apache/xml/internal/resolver/CatalogManager
  • Deployment failure while loading rt.jar
  • On deploying application war on the Jboss 6.3.2 EAP we are getting error message in server logs. It seems like Jboss is not able to load classes from rt.jar which is a Java library.
  • We have configured the modules in Jboss configuration as required, the module.xml file in {JBOSS_HOME}\modules\system\layers\base\sun\jdk\main folder has been updated with the entries for com.sun.jndi.toolkit.url package.
Caused by: java.lang.ClassNotFoundException: com.sun.jndi.toolkit.url.Uri from [Module "deployment.Apps.war:main" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.4.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.4.Final-redhat-1]
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.4.Final-redhat-1]
....
  • I get "ClassNotFoundException: sun.security.validator.ValidatorException" during process instance deserialization in BPMS
10:20:53,679 ERROR [stderr] (pool-23-thread-1) java.lang.IllegalArgumentException: IOException while loading process instance: Error deserializing process instance.
10:20:53,679 ERROR [stderr] (pool-23-thread-1)  at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:192)
10:20:53,680 ERROR [stderr] (pool-23-thread-1)  at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:165)
10:20:53,680 ERROR [stderr] (pool-23-thread-1)  at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstance(JPAProcessInstanceManager.java:139)
10:20:53,680 ERROR [stderr] (pool-23-thread-1)  at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstance(ProcessRuntimeImpl.java:286)
10:20:53,680 ERROR [stderr] (pool-23-thread-1)  at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstance(ProcessRuntimeImpl.java:282)
10:20:53,680 ERROR [stderr] (pool-23-thread-1)  at org.drools.core.impl.StatefulKnowledgeSessionImpl.getProcessInstance(StatefulKnowledgeSessionImpl.java:1810)
10:20:53,681 ERROR [stderr] (pool-23-thread-1)  at org.jbpm.process.instance.timer.TimerManager$ProcessJob.execute(TimerManager.java:316)
10:20:53,681 ERROR [stderr] (pool-23-thread-1)  at org.drools.core.time.SelfRemovalJob.execute(SelfRemovalJob.java:34)
10:20:53,681 ERROR [stderr] (pool-23-thread-1)  at org.drools.core.time.impl.DefaultTimerJobInstance.call(DefaultTimerJobInstance.java:69)
...
10:20:53,685 ERROR [stderr] (pool-23-thread-1) Caused by: java.io.IOException: Error deserializing process instance.
10:20:53,685 ERROR [stderr] (pool-23-thread-1)  at org.jbpm.marshalling.impl.AbstractProtobufProcessInstanceMarshaller.readProcessInstance(AbstractProtobufProcessInstanceMarshaller.java:477)
10:20:53,686 ERROR [stderr] (pool-23-thread-1)  at org.jbpm.persistence.processinstance.ProcessInstanceInfo.getProcessInstance(ProcessInstanceInfo.java:184)
10:20:53,686 ERROR [stderr] (pool-23-thread-1)  ... 28 more
10:20:53,686 ERROR [stderr] (pool-23-thread-1) Caused by: java.lang.ClassNotFoundException: sun.security.validator.ValidatorException
10:20:53,686 ERROR [stderr] (pool-23-thread-1)  at org.drools.core.common.ProjectClassLoader.tryDefineType(ProjectClassLoader.java:187)
10:20:53,686 ERROR [stderr] (pool-23-thread-1)  at org.drools.core.common.ProjectClassLoader.loadType(ProjectClassLoader.java:177)
10:20:53,687 ERROR [stderr] (pool-23-thread-1)  at org.drools.core.common.ProjectClassLoader.loadClass(ProjectClassLoader.java:143)
10:20:53,687 ERROR [stderr] (pool-23-thread-1)  at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
10:20:53,687 ERROR [stderr] (pool-23-thread-1)  at java.lang.Class.forName0(Native Method)
10:20:53,687 ERROR [stderr] (pool-23-thread-1)  at java.lang.Class.forName(Class.java:270)
10:20:53,688 ERROR [stderr] (pool-23-thread-1)  at org.drools.core.util.ClassUtils.getClassFromName(ClassUtils.java:755)
10:20:53,688 ERROR [stderr] (pool-23-thread-1)  at org.drools.core.common.DroolsObjectInputStream.resolveClass(DroolsObjectInputStream.java:57)
10:20:53,688 ERROR [stderr] (pool-23-thread-1)  at org.drools.core.common.DroolsObjectInputStream.resolveClass(DroolsObjectInputStream.java:62)
10:20:53,688 ERROR [stderr] (pool-23-thread-1)  at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
10:20:53,688 ERROR [stderr] (pool-23-thread-1)  at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
10:20:53,688 ERROR [stderr] (pool-23-thread-1)  at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
10:20:53,689 ERROR [stderr] (pool-23-thread-1)  at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
10:20:53,689 ERROR [stderr] (pool-23-thread-1)  at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
10:20:53,689 ERROR [stderr] (pool-23-thread-1)  at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:500)
10:20:53,689 ERROR [stderr] (pool-23-thread-1)  at java.lang.Throwable.readObject(Throwable.java:914)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
  • Red Hat JBoss BPM Suite (BPMS)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.