1 Reply Latest reply on Apr 9, 2012 2:32 AM by sachin goyal

    NoClassDefFoundError while deploying my wfc.ear in "AS 7.1.1.Final" st

    sachin goyal Newbie

      I 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/How+do+I+migrate+my+application+from+AS5+or+AS6+to+AS7#HowdoImigratemyapplicationfromAS5orAS6toAS7-FilesYouMayNeedtoChange

      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>

                        .....