glassfish
  1. glassfish
  2. GLASSFISH-11208

JSP compiler Erro whit OSGI imported class

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: V3
    • Fix Version/s: not determined
    • Component/s: OSGi-JavaEE
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      have 2 bundle:
      Bundla A --> a WAB bundle with a JSP pages
      and
      Bundle B --> that export class with static fields

      The JSP pages (in Bundle A) use the exported class (in Bundle B)
      When I want to see my page, i have compilation
      error "org.apache.jasper.JasperException: PWC6033: Error in Javac compilation
      for JSP"

      Current GlassFish JSP compiler can't
      see classes imported from another WAB. This is because it expects all
      the dependencies to be specified in a classpath which it can pass onto
      the javac. I have always felt, JSP compiler should use a classloader
      backed JavaFileManager.

      Forum Thread
      http://forums.java.net/jive/thread.jspa?messageID=373634

        Activity

        sebglon created issue -
        Hide
        sebglon added a comment -
            • Issue 11208 has been confirmed by votes. ***
        Show
        sebglon added a comment - Issue 11208 has been confirmed by votes. ***
        Hide
        kumara added a comment -

        This is an extensive change and too risky for the v3 release targeted for next week. It will be addressed in
        the next release.

        Show
        kumara added a comment - This is an extensive change and too risky for the v3 release targeted for next week. It will be addressed in the next release.
        Hide
        Sanjeeb Sahoo added a comment -

        Unfortunately, because of time constraints, we have to exclude this from 3.1 rel.

        Show
        Sanjeeb Sahoo added a comment - Unfortunately, because of time constraints, we have to exclude this from 3.1 rel.
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 11208 42812
        Hide
        ruans added a comment - - edited

        Is there any fix for this in 3.* I've tried 3.1.2 build 26-01-2012 and the problem persists. I am forced to run my sites in karaf with pax and jetty at the moment. Much rather be using glassfish.

        org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

        PWC6199: Generated servlet error:
        string:///index_jsp.java:9: package com.net1.core.commons.web does not exist

        PWC6199: Generated servlet error:
        string:///index_jsp.java:10: package com.net1.core.commons.web.tag does not exist

        PWC6199: Generated servlet error:
        string:///index_jsp.java:11: package com.net1.core.commons.web.util does not exist

        at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129)
        at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:299)
        at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:392)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
        at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)

        Show
        ruans added a comment - - edited Is there any fix for this in 3.* I've tried 3.1.2 build 26-01-2012 and the problem persists. I am forced to run my sites in karaf with pax and jetty at the moment. Much rather be using glassfish. org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6199: Generated servlet error: string:///index_jsp.java:9: package com.net1.core.commons.web does not exist PWC6199: Generated servlet error: string:///index_jsp.java:10: package com.net1.core.commons.web.tag does not exist PWC6199: Generated servlet error: string:///index_jsp.java:11: package com.net1.core.commons.web.util does not exist at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:299) at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:392) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
        Hide
        Tom Mueller added a comment -

        Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

        Show
        Tom Mueller added a comment - Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.
        Tom Mueller made changes -
        Fix Version/s not determined [ 11149 ]
        Fix Version/s 3.1 [ 10968 ]
        Hide
        Sanjeeb Sahoo added a comment -

        This issue is difficult to fix until JSP compiler allows us to use class loaders to be used for searching classes. So deferring it for now. Recommended work around is to use offline JSP compiler to precompile JSPs and package them in the WAB.

        Show
        Sanjeeb Sahoo added a comment - This issue is difficult to fix until JSP compiler allows us to use class loaders to be used for searching classes. So deferring it for now. Recommended work around is to use offline JSP compiler to precompile JSPs and package them in the WAB.
        Hide
        ejroberts added a comment - - edited

        One workaround is to push the use of the OSGi provided classes out of the JSP pages and into a local class available from within the WAB.

        I have found that this manages to defer the class loading until such a point where it is then the compiled Servlet class that loads the OSGi provided classes.

        Show
        ejroberts added a comment - - edited One workaround is to push the use of the OSGi provided classes out of the JSP pages and into a local class available from within the WAB. I have found that this manages to defer the class loading until such a point where it is then the compiled Servlet class that loads the OSGi provided classes.
        Hide
        PashaTurok added a comment -

        The same I have in GlassFish 4.1. Five years have passed since this bug was fired. Can you say if you are going to fix it?

        Show
        PashaTurok added a comment - The same I have in GlassFish 4.1. Five years have passed since this bug was fired. Can you say if you are going to fix it?
        Hide
        PashaTurok added a comment -

        Please, anyone, answer my question. It's impossible to use jsp with this bug as it makes duplicate code and all soft architecture becomes a nightmare.

        Show
        PashaTurok added a comment - Please, anyone, answer my question. It's impossible to use jsp with this bug as it makes duplicate code and all soft architecture becomes a nightmare.

          People

          • Assignee:
            Sanjeeb Sahoo
            Reporter:
            sebglon
          • Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated: