3 Replies Latest reply on Feb 12, 2008 4:57 AM by avihaimar

    How to - sar depend on jars in the ear?

      Hey,

      I use maven2 for build.
      i package my application as an ear with the following structure:
      lib - with third parties jars.
      Server.jar
      Server-inf.jar
      Persistence.jar
      Server-startup.sar

      As you see I use sar in order to startup task when the application is loaded (I put dependency on the MBean in order to load after all ejb were loadeded )

      The server-startup use classes in server and server-inf.
      The sar is loaded after all ejb were loaded , but I get ClassNotFound when I try in server-startup code to load classes from server.jar

      Any solution will be more than welcome.

      Thank you

        • 1. Re: How to - sar depend on jars in the ear?
          jaikiran

          Have you made the Server.jar and Server-inf.jar available in the classpath by either adding them as a module in application.xml or through a classpath entry in Manifest.MF? What are the contents of your application.xml?

          • 2. Re: How to - sar depend on jars in the ear?

             

            <application>
             <display-name>server-ear</display-name>
             <module>
             <java>persistence-1.0.jar</java>
             </module>
             <module>
             <connector>server-startup-1.0.sar</connector>
             </module>
             <module>
             <ejb>model-integration-1.0-tests.jar</ejb>
             </module>
             <module>
             <ejb>server-infrastructure-1.0.jar</ejb>
             </module>
             <module>
             <ejb>server-infrastructure-integration-1.0-tests.jar</ejb>
             </module>
             <module>
             <ejb>server-integration-1.0.jar</ejb>
             </module>
             <module>
             <ejb>server-1.0-tests.jar</ejb>
             </module>
             <module>
             <ejb>server-1.0.jar</ejb>
             </module>
             <module>
             <ejb>model-1.0.jar</ejb>
             </module>
             <module>
             <ejb>server-integration-1.0-tests.jar</ejb>
             </module>
             <module>
             <ejb>server-dcl-1.0.jar</ejb>
             </module>
            </application>


            I also change from to and it still didnt work.

            • 3. Re: How to - sar depend on jars in the ear?

              My mistake the problem was stupid mistake.