NoClassDefFoundError while deploying my wfc.ear in "AS 7.1.1.Final" st
sachin.goyal.kronos.com Apr 8, 2012 2:44 AMI am trying to deploy my application ear(wfc.ear) in "Jboss AS 7.1.1.Final" (i.e. Brontes) in STANDALONE MODE, but getting lots of exception in server.log, and most of them seems due to below mentioned exception---
java.lang.NoClassDefFoundError: Could not initialize class com.kronos.wfc.platform.properties.framework.KronosProperties
KronosProperties is our own class kept in platform_properties_framework.jar, and this jar is kept inside ./WEB-INF/lib folder which is correct as per J2EE standard, and
in AS5, we don't get any such error with same folder-structure/jar/class...
I already gone through following URLs and understand new classloading concept of AS7.1.
https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7
https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments
I am not understanding when all my application jars are kept inside ./WEB-INF/lib folder (i.e. under jboss\standalone\deployments\wfc.ear\wfc.war\WEB-INF\lib folder) then all these jars, (classes in these jars) should be available, and NoClassDefFoundError: Could not initialize class com.kronos.wfc.platform.properties.framework.KronosProperties error should not occur as
KronosProperties class is inside platform_properties_framework.jar located in ./WEB-INF/lib folder.
In server.log, NoClassDefFoundError for KronosPropertie class(our application class) is occurring while instantiating our filters defined in web.xml.
My wfc.ear has just one application wfc.war inside it. Following is simple structure of wfc.ear
[wfc.ear]
[META-INF]
<application.xml>
[wfc.war]
<web.xml>
[lib]
<various jar files>
.....
-
WFPFilter.java.zip 3.0 KB
-
boot.log.zip 2.2 KB
-
web.xml 112.9 KB
-
standalone.xml 14.1 KB
-
server.log.doc 247.5 KB