1 Reply Latest reply on May 24, 2005 4:28 PM by Java Developer

    JBoss-4.0.2: JAR Classes resolve to a package instead of a C

    Java Developer Newbie

      When deploying an app to JBoss-4.0.2, I see the following errors which do not show up when deploying the exact same app to JBoss-4.0.1sp1:

      org.apache.jasper.JasperException: Unable to compile class for JSP

      Generated servlet error:
      Only a type can be imported. oracle.jdbc.pool.OracleDataSource resolves to a package

      Generated servlet error:
      Only a type can be imported. oracle.jdbc.OracleCallableStatement resolves to a package

      Generated servlet error:
      Only a type can be imported. oracle.jdbc.OracleTypes resolves to a package

      An error occurred at line: 11 in the jsp file:
      /test/DB/testSPs/testdb_searchresults.jsp
      Generated servlet error:
      OracleCallableStatement cannot be resolved or is not a type

      An error occurred at line: 11 in the jsp file:
      /test/DB/testSPs/testdb_searchresults.jsp
      Generated servlet error:
      OracleDataSource cannot be resolved or is not a type

      An error occurred at line: 11 in the jsp file:
      /test/DB/testSPs/testdb_searchresults.jsp
      Generated servlet error:
      OracleDataSource cannot be resolved or is not a type

      An error occurred at line: 11 in the jsp file:
      /test/DB/testSPs/testdb_searchresults.jsp
      Generated servlet error:
      OracleCallableStatement cannot be resolved or is not a type

      An error occurred at line: 11 in the jsp file:
      /test/DB/testSPs/testdb_searchresults.jsp
      Generated servlet error:
      OracleTypes.INTEGER cannot be resolved or is not a type

      org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
      org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
      org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      com.stepup.servlet.SecurityFilter.doFilter(SecurityFilter.java:389)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


      I have tried this using both 4.0.1sp1 and 4.0.2 on both Windows and Linux Fedora Core 2 platforms, and I always see the same results: The app is deployed properly on 4.0.1sp1 and does not work on 4.0.2!

      Any assistance would be greatly appreciated!

        • 1. Re: JBoss-4.0.2: JAR Classes resolve to a package instead of
          Java Developer Newbie

          I'm answering my own question here, for the benefit of others:

          It turns out that my ClassPath for the working instance (4.0.1) was including the Oracle "instantclient10_1" classes at the front of the JBOSS_CLASSPATH. This ended up included the following two JARs at the head of the ClassPath:
          - classes12.jar
          - ojdbc14.jar

          The fix to this problem, is to remove the altered JBOSS_CLASSPATH from the run.bat (or run.sh) file, and add these 2 JARs to your .../WEB-INF/lib/ folder (or the server's lib folder if you prefer).

          Now the 4.0.2 server works just great! :-)