2 Replies Latest reply on Feb 27, 2012 7:35 AM by daxxy

    Cannot resolve class issues on kitchensink quickstart

    daxxy

      I thought I understood AS 7 classloading. Apparently not because I can't make these errors go away.  When I deploy the jboss-as-kitchensink example on 7.1.0.Final I get a whole bunch of class not found errors.   I have tried a variety of things to make sure my app can see org.slf4j-api, but nothing has worked.

       

      I'm appending the server log.   Would love some help with understanding this problem.

       

      TDR

        • 1. Re: Cannot resolve class issues on kitchensink quickstart
          wdfink

          What you have tried and how is your deployment structure?

          If you download the kitchensink example it should be deployable.

          • 2. Re: Cannot resolve class issues on kitchensink quickstart
            daxxy

            Danke schoen, Wolf-Deiter for responding. Sorry for the lack of details. I did finally figure it out.

             

            For the record....

             

            What I had tried:

             

            adding org.slf4j to Classpath in MANIFEST.MF

            added org.slf4j to WEB-INF/lib

            did 1 & 2 at the same time

            added jboss-deployment-structure.xml with org.slf4j to dependencies

             

            Finally I looked very carefully at the stack trace and the problem was that org.jboss.logging could not find it. It also could not find org.apache.log4j.  Sometime yesterday evening while doing something mundane it occured to me that the org.jboss.logging was the module that had these dependencies, NOT my app.  When I added them as dependencies to org/jboss/logging/main/module.xml, the thing deployed without a hitch.

             

            Here is the module.xml file for 7.1.0.Final/modules/org/jboss/logging/main that worked

             

            <module xmlns="urn:jboss:module:1.1" name="org.jboss.logging">
                <resources>
                    <resource-root path="jboss-logging-3.1.0.GA.jar"/>
                    <!-- Insert resources here -->
                </resources>

                <dependencies>
                    <module name="org.jboss.logmanager"/>
                    <module name="org.slf4j" />
                    <module name="org.apache.log4j" />
                </dependencies>
            </module>

            Turns out I understand it after all!

             

            TDR