1 Reply Latest reply on May 14, 2002 6:11 AM by Carlos

    the zen of creating an ear archive that works

    frank starsinic Newbie

      jboss2.4.1, jdk1.3.1 win2k

      i just tried something simple and it still does not give me the results i expect.
      if you have any ideas, i'd appreciate it.

      here goes..


      i have an ear file "sut.ear"

      META-INF/
      META-INF/MANIFEST.MF <---(no Class-Path in here)
      sut.jar
      sut.war
      META-INF/application.xml

      the application.xml looks like this (there are no ejbs)

      <display-name>SUT</display-name>


      <web-uri>sut.war</web-uri>
      <context-root>/sut</context-root>





      here's my sut.war
      META-INF/
      META-INF/MANIFEST.MF
      WEB-INF/
      WEB-INF/lib/
      index.html
      test.jsp
      WEB-INF/web.xml

      and the manifest.mf for that file looks like...
      Manifest-Version: 1.0
      Class-Path: sut.jar <---- and this points to the root dir of the ear file where sut.jar is!


      when i deploy the ear archive, good things seem to be happening like this...
      INFO org.jboss.deployment.J2eeDeployer [Auto deploy] (Installer.java:157) - Create application sut.ear
      INFO org.jboss.deployment.J2eeDeployer [Auto deploy] (Installer.java:275) - inflate and install WEB module sut.war
      DEBUG org.jboss.deployment.J2eeDeployer [Auto deploy] (Installer.java:450) - resolveLibraries: sut.jar
      DEBUG org.jboss.deployment.J2eeDeployer [Auto deploy] (Installer.java:460) - added jar:file:C:\packages\JBoss-2.4.1\jboss\t
      mp\deploy\Default\copy1014.zip!/sut.jar to common classpath

      by the way, what is "common classpath"

      now, if i try to execute test.jsp it finds the classes in the sut.jar no problem.
      (assuming from the tomcat classLoader i guess)

      if a client tries to access the classes in the jar (no web access) i get this...

      ERROR gov.ca.boe.sut.SUTConfigUtils [Thread-32] (?:?) - gov.ca.boe.sut.ElfMessageHandler
      java.lang.ClassNotFoundException: gov.ca.boe.sut.ElfMessageHandler
      at javax.management.loading.MLet.findClass(MLet.java:800)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:120)
      at gov.ca.boe.entirex.MessageHandlerFactory.createInstance(MessageHandlerFactory.j ava)
      at gov.ca.boe.ejb.mbean.BOEEntireXServer.doNonConversation(BOEEntireXServer.java)
      at gov.ca.boe.ejb.mbean.BOEEntireXServer.run(BOEEntireXServer.java)
      at java.lang.Thread.run(Thread.java:484)
      ERROR gov.ca.boe.sut.SUTConfigUtils [Thread-32] (?:?) - IMessageHandlerFactory cannot create instance
      ERROR gov.ca.boe.sut.SUTConfigUtils [Thread-32] (?:?) - Cannot Create Instance


      can you deploy an ear archive with no ejb or is that causing the issue?

      and it all seemed like it was going so well.



      frank