[jboss-user] [Installation, Configuration & DEPLOYMENT] - EAR With no WAR: java.lang.NoClassDefFoundError

rbuckmqube do-not-reply at jboss.com
Tue Mar 3 07:40:11 EST 2009


I get NoClassDefFoundError when I attempt to start up a JBoss service packaged into an EAR file. There is no WAR file in this application as there is no web interface. I get this error even if I put my JAR file into the server/default/lib directory. Yes, the JAR does indeed contain the .class file JBoss says no definition exists.

I did this:

* created a JBoss service
* I packaged all the Java class files into a JAR file
* I put this JAR file into the EAR file's lib/ directory
* The ear has a manifest Class-Path entry pointing to the jar
* I added a jboss-app.xml file to the EAR file (below)
* I added an application.xml file to the EAR file (below)
* I created a SAR file that contains the same manifest entry
* In the SAR file I added a jboss-service.xml file (below)
* I put the SAR file in the EAR file

jboss-app.xml:

  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
  | <jboss-app>
  |   <loader-repository>verisign.submanager:loader=submanager.ear</loader-repository>
  |   <module>
  |     <service>submanager.sar</service>
  |   </module>
  | </jboss-app>

jboss-service.xml:


  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd">
  | <server>
  |   <loader-repository>verisign.submanager:loader=submanager.sar</loader-repository>
  | ...
  | 

application.xml

  | <?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN"
  |     "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
  | <application>
  |   <display-name>VeriSign Subscriptions Manager</display-name>
  |   <description>VeriSign Subscriptions Manager</description>
  |   <module>
  |     <ejb>submanager.sar</ejb>
  |   </module>
  | </application>
  | 



View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214493#4214493

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214493



More information about the jboss-user mailing list