Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.1.20
    • Fix Version/s: 8.0.0.M1
    • Component/s: JSP
    • Labels:
      None
    • Number of attachments :
      1

      Description

      >> Jeff Smith wrote:
      >>> All,
      >>>
      >>> I have a jsp .tag file that invokes another tag that in turn invokes
      >>> the first tag. I know its complicated We do this to handle the
      >>> building of a tree structure. Anyway the jsp compilation fails in
      >>> Jetty for this case with something like the following:
      >>> java.io.FileNotFoundException: no such file:
      >>>
      >>> /Users/jsmith/projects/my-webapp/target/work/jsp/org/apache/jsp/tag/web/nodes_tag.class
      >>>

        Activity

        Hide
        Jan Bartel added a comment -

        Jeff,

        What version of glassfish did you test? If you can tell me the version then I can check if we can easily upgrade to the corresponding version of glassfish jasper.

        regards
        Jan

        Show
        Jan Bartel added a comment - Jeff, What version of glassfish did you test? If you can tell me the version then I can check if we can easily upgrade to the corresponding version of glassfish jasper. regards Jan
        Hide
        Jeff Smith added a comment -

        I tested this issue on Glassfish 2.1-b60e.

        Thanks,

        jeff

        Show
        Jeff Smith added a comment - I tested this issue on Glassfish 2.1-b60e. Thanks, jeff
        Hide
        Jan Bartel added a comment -

        Jeff,

        We are using a more recent jsp version than Glassfish-2.1-b60e.

        You can try dropping in the exact same jars that that version of Glassfish is using. Go to the maven repository and download the jsp jars with the version number "9.1.1.B60.25.p1".

        So you want to get:

        http://repo2.maven.org/maven2/org/mortbay/jetty/jsp-2.1-glassfish/9.1.1.B60.25.p1/jsp-2.1-glassfish-9.1.1.B60.25.p1.jar
        http://repo2.maven.org/maven2/org/mortbay/jetty/jsp-api-2.1-glassfish/9.1.1.B60.25.p1/jsp-api-2.1-glassfish-9.1.1.B60.25.p1.jar

        and replace the jars of similar name in $JETTY_HOME/lib/jsp-2.1.

        Let me know if that works for you. If so, one of us should raise a bug over on the Glassfish issue tracker that the newer version has introduced a circular compile problem.

        cheers
        Jan

        Show
        Jan Bartel added a comment - Jeff, We are using a more recent jsp version than Glassfish-2.1-b60e. You can try dropping in the exact same jars that that version of Glassfish is using. Go to the maven repository and download the jsp jars with the version number "9.1.1.B60.25.p1". So you want to get: http://repo2.maven.org/maven2/org/mortbay/jetty/jsp-2.1-glassfish/9.1.1.B60.25.p1/jsp-2.1-glassfish-9.1.1.B60.25.p1.jar http://repo2.maven.org/maven2/org/mortbay/jetty/jsp-api-2.1-glassfish/9.1.1.B60.25.p1/jsp-api-2.1-glassfish-9.1.1.B60.25.p1.jar and replace the jars of similar name in $JETTY_HOME/lib/jsp-2.1. Let me know if that works for you. If so, one of us should raise a bug over on the Glassfish issue tracker that the newer version has introduced a circular compile problem. cheers Jan
        Hide
        Jeff Smith added a comment -

        Interesting doing this causes 404's on both the default context as well as the test webapp.

        -jeff

        Show
        Jeff Smith added a comment - Interesting doing this causes 404's on both the default context as well as the test webapp. -jeff
        Hide
        Jan Bartel added a comment -

        Doesn't sound like the context started properly. Did you delete any work directories with the compiled jsps in them, and then stop and restart jetty?

        Jan

        Show
        Jan Bartel added a comment - Doesn't sound like the context started properly. Did you delete any work directories with the compiled jsps in them, and then stop and restart jetty? Jan
        Hide
        Jeff Smith added a comment -

        That's what I thought too, I tried this multiple times. All I did was replace the jars in a clean install of jetty. Copy my .war into the webapps directory and start jetty.

        Show
        Jeff Smith added a comment - That's what I thought too, I tried this multiple times. All I did was replace the jars in a clean install of jetty. Copy my .war into the webapps directory and start jetty.
        Hide
        Jan Bartel added a comment -

        Jeff,

        There's an even more recent release of glassfish jsp jars that you can try:

        jetty-jsp-2.1.v20091210

        Let me know how you get on so we can either move this issue on or close it.

        cheers
        Jan

        Show
        Jan Bartel added a comment - Jeff, There's an even more recent release of glassfish jsp jars that you can try: jetty-jsp-2.1.v20091210 Let me know how you get on so we can either move this issue on or close it. cheers Jan
        Hide
        Jan Bartel added a comment -

        Jeff,

        Actually don't bother retesting. I already retested the sample webapp you attached with jetty-6.1.22 and the issue no longer exists.
        I'll close this issue.

        cheers
        Jan

        Show
        Jan Bartel added a comment - Jeff, Actually don't bother retesting. I already retested the sample webapp you attached with jetty-6.1.22 and the issue no longer exists. I'll close this issue. cheers Jan
        Hide
        Trond Marius Øvstetun added a comment -

        I am having this same problem running Jetty on my Mac. I have tried jetty versions 6.1.22, 6.1.25 and 7 (hightide - cannot remember the exact version number).

        I just transferred from a Win7-based development machine where everything worked fine, but as soon as I transferred to my Mac, this problem arises. I have the FileNotFoundException both when using a direct recursive tag, and when I introduce a circular tagfile.

        Any tips to anything I should do to fix the issue?

        Show
        Trond Marius Øvstetun added a comment - I am having this same problem running Jetty on my Mac. I have tried jetty versions 6.1.22, 6.1.25 and 7 (hightide - cannot remember the exact version number). I just transferred from a Win7-based development machine where everything worked fine, but as soon as I transferred to my Mac, this problem arises. I have the FileNotFoundException both when using a direct recursive tag, and when I introduce a circular tagfile. Any tips to anything I should do to fix the issue?
        Hide
        Jan Bartel added a comment -

        Marius,

        If you can cut down your webapp to a very simple war that reproduces the problem,
        it would be ideal to raise it with the glassfish project at glassfish.dev.java.net
        as we use glassfish's (reference impl) jsp engine.

        cheers
        Jan

        Show
        Jan Bartel added a comment - Marius, If you can cut down your webapp to a very simple war that reproduces the problem, it would be ideal to raise it with the glassfish project at glassfish.dev.java.net as we use glassfish's (reference impl) jsp engine. cheers Jan
        Hide
        Trond Marius Øvstetun added a comment -

        Jan,
        I just tested deploying my application to a Glassfish server instance. I used version 2.1.1 (that is our production target platform). Everything worked as it should, including the recursive use of tagfiles.

        Is there a way for me to find out which version of the jsp-compiler is used in this glassfish instance, and some way to force the same version for use with Jetty?

        thanks, Trond Marius

        Show
        Trond Marius Øvstetun added a comment - Jan, I just tested deploying my application to a Glassfish server instance. I used version 2.1.1 (that is our production target platform). Everything worked as it should, including the recursive use of tagfiles. Is there a way for me to find out which version of the jsp-compiler is used in this glassfish instance, and some way to force the same version for use with Jetty? thanks, Trond Marius
        Hide
        Jan Bartel added a comment -

        Trond Marius
        jetty-6.1.25 is using jsp built from the glassfish tag SJSAS-2_1_1-B31G-19_Oct_2009, which seems to be the last tag that I can find for the 2.1.1 release (although please double-check at http://glassfish.dev.java.net), so I assume our jsp code is the same.

        Can you please produce a very small webapp that demonstrates the problem and attach to this issue. I am curious if this is an OS specific problem or not: in other words, does the demo webapp work on windows and linux but not mac?

        thanks
        Jan

        Show
        Jan Bartel added a comment - Trond Marius jetty-6.1.25 is using jsp built from the glassfish tag SJSAS-2_1_1-B31G-19_Oct_2009, which seems to be the last tag that I can find for the 2.1.1 release (although please double-check at http://glassfish.dev.java.net ), so I assume our jsp code is the same. Can you please produce a very small webapp that demonstrates the problem and attach to this issue. I am curious if this is an OS specific problem or not: in other words, does the demo webapp work on windows and linux but not mac? thanks Jan
        Hide
        Trond Marius Øvstetun added a comment -

        Hi.

        I created a very small webapp on github: http://github.com/ovstetun/recursivetag
        I will also attach a zip of the current state.

        Hope this helps, I have never seen this issue running on windows.

        Thanks,
        Trond Marius

        Show
        Trond Marius Øvstetun added a comment - Hi. I created a very small webapp on github: http://github.com/ovstetun/recursivetag I will also attach a zip of the current state. Hope this helps, I have never seen this issue running on windows. Thanks, Trond Marius
        Hide
        Trond Marius Øvstetun added a comment -

        Seeems I cannont attach a file to this issue. Could you try to download from github? There is a tag "reproduced" there that shows the problem.

        Show
        Trond Marius Øvstetun added a comment - Seeems I cannont attach a file to this issue. Could you try to download from github? There is a tag "reproduced" there that shows the problem.
        Hide
        Jan Bartel added a comment -

        After lots of head-scratching and trying various combinations of jsp version and container, the results are this:

        Trond's webapp works on:
        + Glassfish v2.1.1
        + Jetty-8

        It does not work on:
        + Tomcat 6.0.29
        + Jetty-6/7

        The original webapp attached to this issue works on:
        + Jetty-6/7 standalone, but only after a reload with the respective jetty plugins
        + Jetty-8
        (Glassfish and tomcat not re-tested).

        The reason Trond's webapp and the original webapp work on Glassfish is that whilst Jetty-6/7 and Glassfish share a common codebase, at runtime Glassfish uses the JSR199JavaCompiler in-memory compilation class, whereas Jetty uses the JDTJavaCompiler class (which uses eclipse ecj to compile). There is obviously something about the in-memory compilation of JSR199JavaCompiler that works better with these types of recursive tags. Jetty-8 not only uses the same binaries as Glassfish, but also uses the same JSR199JavaCompiler class and hence works just fine with both webapps.

        Interestingly, there must be also some difference introduced by the maven classloader that is used for the jetty-plugin that is interacting with the JDTJavaCompiler class. The original webapp throws the same kind of error as Trond's with the first hit, but on subsequent hits it works just fine. With jetty standalone, the first hit succeeds, but throws a FileNotFound warning for the .java source associated with the tag being compiled.

        So, the short answer is if you have these kind of recursive tags, if doing a shift-reload is too annoying or not working for you, then use jetty-8 (plugin or standalone) instead, as that uses the JSR199JavaCompiler class that seems to work with recursive tags.

        cheers
        Jan

        Show
        Jan Bartel added a comment - After lots of head-scratching and trying various combinations of jsp version and container, the results are this: Trond's webapp works on: + Glassfish v2.1.1 + Jetty-8 It does not work on: + Tomcat 6.0.29 + Jetty-6/7 The original webapp attached to this issue works on: + Jetty-6/7 standalone, but only after a reload with the respective jetty plugins + Jetty-8 (Glassfish and tomcat not re-tested). The reason Trond's webapp and the original webapp work on Glassfish is that whilst Jetty-6/7 and Glassfish share a common codebase, at runtime Glassfish uses the JSR199JavaCompiler in-memory compilation class, whereas Jetty uses the JDTJavaCompiler class (which uses eclipse ecj to compile). There is obviously something about the in-memory compilation of JSR199JavaCompiler that works better with these types of recursive tags. Jetty-8 not only uses the same binaries as Glassfish, but also uses the same JSR199JavaCompiler class and hence works just fine with both webapps. Interestingly, there must be also some difference introduced by the maven classloader that is used for the jetty-plugin that is interacting with the JDTJavaCompiler class. The original webapp throws the same kind of error as Trond's with the first hit, but on subsequent hits it works just fine. With jetty standalone, the first hit succeeds, but throws a FileNotFound warning for the .java source associated with the tag being compiled. So, the short answer is if you have these kind of recursive tags, if doing a shift-reload is too annoying or not working for you, then use jetty-8 (plugin or standalone) instead, as that uses the JSR199JavaCompiler class that seems to work with recursive tags. cheers Jan
        Hide
        Jan Bartel added a comment -

        Adjusting the closed status of this issue to record that recursive tags do work with the version of jsp used in jetty-8, to help other folks experiencing same problem in the future.

        Show
        Jan Bartel added a comment - Adjusting the closed status of this issue to record that recursive tags do work with the version of jsp used in jetty-8, to help other folks experiencing same problem in the future.
        Hide
        Trond Marius Øvstetun added a comment -

        How can I test this issue using version 8.0.0.M1? When I use the M1-version for the jetty-maven-plugin I am missing the following dependencies:

        • javax.servlet.jsp.jstl:jstl-api:jar:1.2
        • org.glassfish.web:jstl-impl:jar:1.2

        Version 8.0.0.M0 the recursive tag results in a stack overflow error.

        Show
        Trond Marius Øvstetun added a comment - How can I test this issue using version 8.0.0.M1? When I use the M1-version for the jetty-maven-plugin I am missing the following dependencies: javax.servlet.jsp.jstl:jstl-api:jar:1.2 org.glassfish.web:jstl-impl:jar:1.2 Version 8.0.0.M0 the recursive tag results in a stack overflow error.
        Hide
        Jan Bartel added a comment -

        Trond,

        Try 8.0.0.M2-SNAPSHOT, thats actually the version I tried. You may need to add the jstl jars as plugin dependencies - I'll double check that for future releases that they're automatically on the plugin classpath.

        Jan

        Show
        Jan Bartel added a comment - Trond, Try 8.0.0.M2-SNAPSHOT, thats actually the version I tried. You may need to add the jstl jars as plugin dependencies - I'll double check that for future releases that they're automatically on the plugin classpath. Jan
        Hide
        Jan Bartel added a comment -

        Actually, the jstl jars are on the plugin path for 8.0.0.M2-SNAPSHOT so you should be ok.

        cheers
        Jan

        Show
        Jan Bartel added a comment - Actually, the jstl jars are on the plugin path for 8.0.0.M2-SNAPSHOT so you should be ok. cheers Jan
        Hide
        Trond Marius Øvstetun added a comment -

        And where are the SNAPSHOT-releases published? I can't find a repository containing these, and the documentation doesn't point me any helpful direction either...

        Show
        Trond Marius Øvstetun added a comment - And where are the SNAPSHOT-releases published? I can't find a repository containing these, and the documentation doesn't point me any helpful direction either...
        Hide
        Jan Bartel added a comment -

        See:
        http://wiki.eclipse.org/Jetty/Starting/Downloads

        There is a link to the repos near the bottom of the page.
        For your convenience, it is here:
        http://oss.sonatype.org/content/groups/jetty/

        Show
        Jan Bartel added a comment - See: http://wiki.eclipse.org/Jetty/Starting/Downloads There is a link to the repos near the bottom of the page. For your convenience, it is here: http://oss.sonatype.org/content/groups/jetty/

          People

          • Assignee:
            Jan Bartel
            Reporter:
            Greg Wilkins
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: