2 Replies Latest reply on Oct 22, 2011 6:42 AM by Karstem Strunk

    Migrating from AS5 to AS7 results in ClassNotFoundException

    Karstem Strunk Newbie

      Hello,

       

      I'm trying to migrate our application from AS5 to AS7, but I don't get it work. My ear file looks like this:

       

        application.ear

        |

        |--- ejb.jar

        |

        |--- web.war

        |

        |--- jdom.jar

        |

        |--- xml-apis.jar

       

      My ejb.jar uses jdom to parse some config files. So I defined in the MANIFEST.MF of ejb.jar the following classpath:

       

           Class-Path: jdom.jar xml-apis.jar

       

      But when I start my application, JDom is found, but not the class SAXException which is part of xml-apis.jar.

       

      Here's the error message I got:

       

      java.lang.ClassNotFoundException: org.xml.sax.SAXException from [Module "deployment.application.ear.jdom.jar:main" from Service Module Loader]

       

      So it seems that jdom.jar has no dependecies defined to xml-apis.jar. If I update the MANIFEST.MF of jdom.jar and add a class-path-entry for xml-apis.jar it works. But it makes absolutely no sense to me. Why do I have to alter external jar files to work with JBoss? Isn't there a way to setup JBoss properly?

       

      Best regards

      Karsten