Wednesday, November 20, 2013

JBoss7.x JBoss eap 6- NoClassDefFoundError ClassNotFoundException JBoss dependency

Removed

JBoss eap 6 comes with implicit and explicit dependencies loading. The implicit dependencies loaded by Jboss as 7 or Jboss eap 6 are listed in this link.
Once your application uses other dependencies, you should explicitly declare them in order to be loaded by JBoss.
You can also explicitely tell JBoss that you will exclude the loading of implicit jars. This is done in the jboss-deployment-structure.xml. An example of an exclusion of JBoss Logger module is explained here.

When we forget to declare a dependency, we will have  NoClassDefFoundError or ClassNotFoundException. Thus you should declare your dependencies in the META-INF/Manifest.MF or WEB-INF/jboss-deployment-structure.xml.




In my application, I use javax.servlet.api and org.jboss.ironjacamar.jdbcadapters. These names should be copied from the module.xml which is located in the specific jboss module.










1 comment :

  1. This comment has been removed by a blog administrator.

    ReplyDelete

Articles les plus consultés