4 Replies Latest reply on Jun 14, 2003 4:01 AM by mayankmishra

    Class Loading Issue with JBOSS 3.2 and Tomcat

    jcorbin4607

      Hello,

      I have an ear file that contains a ejb and web module as well as a project utility jar.

      When I deploy the application under JBOSS 3.2RC2/Tomcat, the web application has no problem finding the classes from the project utiltity jar (reference in the manifest).

      When I deploy on JBOSS 3.2.1/Tomcat any time the web application classes attempt to reference a class that lives in the project utility jar, I get a class not found error.

      I know this is a class loading issue, but not sure what changed from the release candidate and the final release of 3.2 that would cause this...

      Any suggestions/ideas would greatly be appreciated.

      Thanks,
      J.D.

        • 1. Re: Class Loading Issue with JBOSS 3.2 and Tomcat
          bkbonner
          • 2. Re: Class Loading Issue with JBOSS 3.2 and Tomcat
            mayankmishra

            Hi EveryOne,

            I am making a simple startup application.
            It is having , 1 JSP file and 1 ejb .
            I have packed EJB in JAR file and made a WAR file using web.xml and jboss-web .xml .

            finall, put war and jar in a ear folder ,

            hence the structure is :

            Sample.ear
            +
            +--- META-INF (containing application.xml)
            +----Sample.jar
            +----Sample.war
            +
            +-------index.jsp
            +-------WEB-INF(containing jboss-web , web XML's)

            My JSP is calling home.create and then calling the bean functions via the remote interface.

            Application get's deployed , with no error,but at browser it show's error in finding home nad remote classes.


            web.xml looks like this:

            <?xml version="1.0" encoding="ISO-8859-1"?>

            <!DOCTYPE web-app
            PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
            "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

            <web-app>
            <ejb-ref>
            <ejb-ref-name>ejb/Sample</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            SampleHome
            Sample
            <ejb-link>../Sample.jar#ejb/Sample</ejb-link>
            </ejb-ref>
            </web-app>


            Please Help me out.
            Cheers.

            • 3. Re: Class Loading Issue with JBOSS 3.2 and Tomcat
              raja05

              <ejb-link>../Sample.jar#ejb/Sample</ejb-link>

              should be just
              <ejb-link>Name of Sample EJB in Ejb-jar.xml</ejb-link>

              • 4. Re: Class Loading Issue with JBOSS 3.2 and Tomcat
                mayankmishra

                yeah dear , i tried that too just now
                <ejb-link>EJB Name</ejb-link>

                but still it is not wroking , giving error like :

                An error occurred at line: -1 in the jsp file: null

                Generated servlet error:
                [javac] Compiling 1 source file
                [javac] C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__calculator\in
                dex_jsp.java:8: '.' expected
                [javac] import Calculator;
                [javac] ^
                [javac] C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__calculator\in
                dex_jsp.java:9: '.' expected
                [javac] import CalculatorHome;
                [javac] ^
                [javac] C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__calculator\in
                dex_jsp.java:19: cannot resolve symbol
                [javac] symbol : class Calculator
                [javac] location: class org.apache.jsp.index_jsp
                [javac] private Calculator cal = null;
                [javac] ^

                Actually ,it is not finding my home and remote interfaces there in C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\Jetty_0_0_0_0_8080__calculator\
                folder.

                Please help me out.

                Thanking you,

                Cheers,
                -Mayank.

                Please help me out.