4 Replies Latest reply on Jun 22, 2012 8:54 AM by kdolan1

    Unable to compile class for JSP - the import cannot be resolved

    kdolan1

      I'm getting the following error:

      15:15:31,800 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/Horizon].[jsp]] Servlet.service() for servlet jsp threw exception: org.apache.jasper.JasperException: Unable to compile class for JSP:

       

      An error occurred at line: 7 in the generated java file

      The import my.company.product.app.event.action cannot be resolved

       

      An error occurred at line: 8 in the generated java file

      The import my.company.product.app.event.action cannot be resolved

       

      Stacktrace:

                at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)

      ...

       

         

      In proc_005define_005rules_jsp.java, I see:

      import my.company.product.app.event.action.ActionEmail;

      import my.company.product.app.event.action.ActionRfc;

       

       

      In proc_define_rules.jsp, I have:

      <%@ page import="my.company.product.app.event.action.ActionEmail" %>

      <%@ page import="my.company.product.app.event.action.ActionRfc" %>

        

       

      Other facts:

      * Both ActionEmail and ActionRfc classes extend an abstract class my.company.product.app.event.Action.

      * The Action class implements java.lang.Comparable

      * The JSP is in a WAR file

      * The Action* classes are in a JAR file

      * Both the WAR and JAR files are in an EAR

      * I have lots of other JSPs in the WAR file that successfully import classes in the JAR file

      * In fact, proc_define_rules.jsp successfully imports other classes located in the JAR file

       

      I tried importing my.company.product.app.event.Action but that didn't help.

       

      I also found a post that might be related (https://community.jboss.org/thread/167049?start=0&tstart=0).  The root cause has to do w/ case.  Seeing that my package name for ActionEmail and ActionRfc is also the name of a class (however uppercase), it may be the same thing.  However,

       

      1. that person was using JBoss 5 and the solution provided was noted not to work/apply in JBoss 6

      2. no solution for JBoss 6 was documented

      3. I can't find a similar post re: JBoss 7

      4. I tried the JBoss 5 solution in JBoss 7 and it didn't work (but I didn't really expect it to)

       

      Any ideas?  I would hate to think I have to rename my class.

       

      Kelly