1 2 3 Previous Next 34 Replies Latest reply on Jun 18, 2012 8:08 AM by suikast42 Go to original post
      • 30. Re: Classloading in JBOSS AS 7.1.0.Final
        bajrang_asthana

        application.xml

        <application>

          <display-name>Pro</display-name>

         

          <module>

            <web>

              <web-uri>app.war</web-uri>

              <context-root>/pro</context-root>

            </web>

          </module>

         

          <module>

            <ejb>app.jar</ejb>

          </module>

          <module>

            <ejb>test.jar</ejb>

          </module>

         

          <module>

            <java>jboss-seam.jar</java>

          </module>

         

          <module>

            <java>quartz-1.5.2.jar</java>

          </module>

             

        </application>

        jboss-deployment-struture.xml

         

        <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">

            <deployment>

                <dependencies>

                    <module name="javax.faces.api" slot="1.2" export="true" />

                    <module name="com.sun.jsf-impl" slot="1.2" export="true" />

                </dependencies>

            </deployment>

          

            <sub-deployment name="app.war">

                <exclusions>

                    <module name="javax.faces.api" slot="main" />

                    <module name="com.sun.jsf-impl" slot="main" />

                </exclusions>

                <dependencies>

                    <module name="javax.faces.api" slot="1.2" />

                    <module name="com.sun.jsf-impl" slot="1.2" />

                </dependencies>

            </sub-deployment>

        </jboss-deployment-structure>

        • 31. Re: Classloading in JBOSS AS 7.1.0.Final
          suikast42

          Try to add  <library-directory>.</library-directory> in your application.xml

          • 32. Re: Classloading in JBOSS AS 7.1.0.Final
            bajrang_asthana

            I have added <library-directory>.</library-directory> in application.xml. It supressed the error java.lang.ClassNotFoundException: no.messageman.sbo.erpadapter.JMSQueueListener. But still there is one error related to PayEx java.lang.NoClassDefFoundError: no/messageman/payex/exception/PayexException.

             

            Let me give you more information about this- The class definition of PayEx is part of payEXGateway.jar. I have put this jar in lib folder(WEB_INF/lib) of app.war.

             

            And there are some session beans which are using the services of this payEXGateway.jar.

            • 33. Re: Classloading in JBOSS AS 7.1.0.Final
              sfcoy

              Hi there,

               

              In the future you will get an improved response if you start your own discussion thread, perhaps referencing a similar thread such as this one.

               

              In any event:

               

              1. You have a number of <java>...</java> modules in your application.xml. These must be removed as their only purpose is to define standalone EJB client applications. The jars that you are referencing should be placed in the EAR/lib directory. From what I recall, the jboss-seam.jar was actually an EJB module in some versions of Seam. You should double check that.
              2. As you have session beans referencing classes from payEXGateway.jar, this must also be placed in the EAR/lib directory. EJBs and jars in the EAR/lib directory cannot access classes in WEB-INF/lib or WEB-INF/classes directories of WAR files.
              • 34. Re: Classloading in JBOSS AS 7.1.0.Final
                suikast42

                Stephen is right. Your WAR have a seperated classloader. So your classes in your war see the classes of your ejbs but your war classes are hiddeen for your ejb classes. So pack your payEXGateway.jar in your lib folder of your ear. In your case is it the root folder of your ear.

                1 2 3 Previous Next