ClassNotFoundException from jboss module to application class.
Issue
- In a web application, the commons-lang for cloning using SerializationUtils.clone(Object) is used.
- In jboss-deployment-structure.xml, added the below in dependencies.
<module name="org.apache.commons.lang"/>
- When trying to invoke SerializationUtils.clone for one of the classes which is present in a jar inside WEB-INF/lib, getting the following below Exception.
java.lang.ClassNotFoundException: from [Module "org.apache.commons.lang:main" from local module loader @18acf07 (finder: local module finder @1de2b1 (roots: $JBOSS_HOME\modules\system\layers\base))].
- While going through the list of jsf modules, it is found that, the jsf impl module is itself is private.
<module xmlns="urn:jboss:module:1.1" name="com.sun.jsf-impl">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<dependencies>
<module name="javax.faces.api"/>
<module name="javaee.api"/>
<module name="javax.servlet.jstl.api"/>
<module name="org.apache.xerces" services="import"/>
<module name="org.apache.xalan" services="import"/>
</dependencies>
<resources>
<resource-root path="jsf-impl-2.1.19-redhat-1.jar"/>
<!-- Insert resources here -->
</resources>
</module>
Environment
- Redhat JBoss Enterprise Application Platform (EAP)
- 6.1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.