Spring Roo
  1. Spring Roo
  2. ROO-996

Appengine does not process .jspx files

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.0.M1
    • Fix Version/s: 1.1.0.M2
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      I created a very simple application, and in this case opted not to go for GWT but instead wanted to have a regular spring-mvc setup.


      project nl.enhance.gaejspx
      persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE
      entity --class ~.domain.Book
      field string name
      controller all --package ~.web
      quit


      After that, I corrected appengine-web.xml to contain the correct project name to match my gaejspx.appspot.com and deployed the application by using mvn gae:deploy

      When visiting the homepage, I can see that appengine is not processing the .jspx files, e.g. it returns output that looks like this:

      <html
      xmlns:jsp="http://java.sun.com/JSP/Page"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:tiles="http://tiles.apache.org/tags-tiles"
      xmlns:form="http://www.springframework.org/tags/form"
      xmlns:spring="http://www.springframework.org/tags"
      xmlns:util="urn:jsptagdir:/WEB-INF/tags/util" >

      <jsp:directive.page contentType="text/html;charset=UTF-8" />


      Etc etc... None of the taglibs are processed. Appengine

      A sidenote: without adding <jsp:directive.page isELIgnored="false"/> to the main layout, JSTL will not be evaluated by appengine. This is a known issue in the GAE-java community. It is not required to deploy jstl.jar, I think it is provided at runtime by default.

      Sidenote #2: the resource servlet approach may need to be different on appengine as well as Appengine is very picky about how static files are served. See http://code.google.com/appengine/docs/java/config/appconfig.html#Static_Files_and_Resource_Files

      1. output.txt
        65 kB
        Hans Westerbeek

        Issue Links

          Activity

          Hide
          Hans Westerbeek added a comment -

          BTW this may well be an appengine issue but I've created the issue here since it may also be caused by Roo's web.xml and the libs it ships to appengine

          Show
          Hans Westerbeek added a comment - BTW this may well be an appengine issue but I've created the issue here since it may also be caused by Roo's web.xml and the libs it ships to appengine
          Hide
          Stefan Schmidt added a comment -

          Hans,

          Thanks for reporting this. Can you please try to include an empty dummy.jsp file into your WEB-INF/views folder? As far as I remember GAE uses the Jasper JSP engine and they have currently only .jsp enabled as trigger to get Jasper started. If you include an empty .jsp file it should get things going. The GAE team is aware of this.

          If this trick resolves the issue I'll contact them again to find out if they can enable .jspx triggering as well. I can also have the MVC addon temporarily include the empty jsp file into the user project until GAE is fixed.

          -Stefan

          Show
          Stefan Schmidt added a comment - Hans, Thanks for reporting this. Can you please try to include an empty dummy.jsp file into your WEB-INF/views folder? As far as I remember GAE uses the Jasper JSP engine and they have currently only .jsp enabled as trigger to get Jasper started. If you include an empty .jsp file it should get things going. The GAE team is aware of this. If this trick resolves the issue I'll contact them again to find out if they can enable .jspx triggering as well. I can also have the MVC addon temporarily include the empty jsp file into the user project until GAE is fixed. -Stefan
          Hide
          Hans Westerbeek added a comment -

          Hmm, tried this and it provokes an Exception in the "compiling jsp's" phase of deployment. See output.txt which I will attach in a minute.

          I think this is the most relevant part of the output, it seems like the datanucleus enhancer is kicking in when compiling jsp's and not liking what it finds


          work dir=/var/folders/jC/jCBcvXSYEw4xU+MV-w8cR++++TI/Tmp/appcfg1428978599717840658.tmp/WEB-INF/classes
          extension dir=/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext
          srcDir=/var/folders/jC/jCBcvXSYEw4xU+MV-w8cR++++TI/Tmp/appcfg1428978599717840658.tmp/WEB-INF/classes
          compiler=extJavac
          include=org/apache/jsp/tag/web/form/page_tagx.java

          2010-06-15 10:24:58,148 [main] ERROR org.apache.jasper.compiler.Compiler - Error compiling file: /var/folders/jC/jCBcvXSYEw4xU+MV-w8cR++++TI/Tmp/appcfg1428978599717840658.tmp/WEB-INF/classes//org/apache/jsp/tag/web/form/page_tagx.java [javac] Compiling 1 source file
          [javac] error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider org.datanucleus.enhancer.EnhancerProcessor could not be instantiated: org.datanucleus.exceptions.NucleusException: Error reading manifest file "jar:file:/var/folders/jC/jCBcvXSYEw4xU+MV-w8cR++++TI/-Tmp-/appcfg1428978599717840658.tmp/WEB-INF/lib/datanucleus-appengine-1.0.7.final.jar!/plugin.xml"

          Exception in thread "main" org.apache.jasper.JasperException: Unable to compile class for JSP

          Generated servlet error:
          [javac] error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider org.datanucleus.enhancer.EnhancerProcessor could not be instantiated: org.datanucleus.exceptions.NucleusException: Error reading manifest file "jar:file:/var/folders/jC/jCBcvXSYEw4xU+MV-w8cR++++TI/-Tmp-/appcfg1428978599717840658.tmp/WEB-INF/lib/datanucleus-appengine-1.0.7.final.jar!/plugin.xml"

          Show
          Hans Westerbeek added a comment - Hmm, tried this and it provokes an Exception in the "compiling jsp's" phase of deployment. See output.txt which I will attach in a minute. I think this is the most relevant part of the output, it seems like the datanucleus enhancer is kicking in when compiling jsp's and not liking what it finds work dir=/var/folders/jC/jCBcvXSYEw4xU+MV-w8cR++++TI/ Tmp /appcfg1428978599717840658.tmp/WEB-INF/classes extension dir=/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext srcDir=/var/folders/jC/jCBcvXSYEw4xU+MV-w8cR++++TI/ Tmp /appcfg1428978599717840658.tmp/WEB-INF/classes compiler=extJavac include=org/apache/jsp/tag/web/form/page_tagx.java 2010-06-15 10:24:58,148 [main] ERROR org.apache.jasper.compiler.Compiler - Error compiling file: /var/folders/jC/jCBcvXSYEw4xU+MV-w8cR++++TI/ Tmp /appcfg1428978599717840658.tmp/WEB-INF/classes//org/apache/jsp/tag/web/form/page_tagx.java [javac] Compiling 1 source file [javac] error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider org.datanucleus.enhancer.EnhancerProcessor could not be instantiated: org.datanucleus.exceptions.NucleusException: Error reading manifest file "jar: file:/var/folders/jC/jCBcvXSYEw4xU+MV-w8cR++++TI/-Tmp-/appcfg1428978599717840658.tmp/WEB-INF/lib/datanucleus-appengine-1.0.7.final.jar!/plugin.xml " Exception in thread "main" org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: [javac] error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider org.datanucleus.enhancer.EnhancerProcessor could not be instantiated: org.datanucleus.exceptions.NucleusException: Error reading manifest file "jar: file:/var/folders/jC/jCBcvXSYEw4xU+MV-w8cR++++TI/-Tmp-/appcfg1428978599717840658.tmp/WEB-INF/lib/datanucleus-appengine-1.0.7.final.jar!/plugin.xml "
          Hide
          Hans Westerbeek added a comment -

          BTW, where did you find out about this dummy.jsp trick?

          Show
          Hans Westerbeek added a comment - BTW, where did you find out about this dummy.jsp trick?
          Hide
          Hans Westerbeek added a comment -

          In a different project (that does not use Roo), I have verified that placing a dummy.jsp file into WEB-INF/views indeed tricks GAE into compiling .jspx files.

          Show
          Hans Westerbeek added a comment - In a different project (that does not use Roo), I have verified that placing a dummy.jsp file into WEB-INF/views indeed tricks GAE into compiling .jspx files.
          Hide
          Stefan Schmidt added a comment -

          Thanks Hans for the details provided. I'll take a closer look at your logs tomorrow.

          Re the dummy.jsp trick, this was actually recommended by a Google engineer to us as a temp workaround. So they are definitely aware of the issue. I'll ping them again about it.

          Show
          Stefan Schmidt added a comment - Thanks Hans for the details provided. I'll take a closer look at your logs tomorrow. Re the dummy.jsp trick, this was actually recommended by a Google engineer to us as a temp workaround. So they are definitely aware of the issue. I'll ping them again about it.
          Hide
          Stefan Schmidt added a comment -

          Hans,

          I am closing this issue as complete given the original problem described here 'Appengine does not process .jspx files' has been resolved with the dummy.jsp workaround. I have contacted the GAE team to find out if and when they will include jspx to be triggered directly in GAE.

          The other issue you raised here is the compilation problem of the Roo generated jspx files in a GAE environment. The problem is the use of jasper-runtime-5.0.28.jar in the current version of GAE alongside geronimo-jsp_2.1_spec-1.0.1.jar. This means that GAE have an API which allows JSP 2.1 and an implementation of Jasper which only supports JSP 2.0. Spring Roo generated MVC apps use a number of JSP 2.1 features (mostly EL related) which are supported by all current Web containers but not GAE. (see http://code.google.com/p/googleappengine/issues/detail?id=1506)

          As such GAE deployments are currently not supported by Roo generated Spring MVC applications. However, we are in contact with Google to resolve this issue as soon as possible. As a workaround Roo could ship a custom tag library (potentially with reduced functionality) to support JSP 2.0 EL.

          Another issue which needs to be resolved is the full support of the default GAE data store. This will require changes outlined in ROO-611 to fully support references between domain objects.

          I have raised ROO-1006 to track the work on this.

          Show
          Stefan Schmidt added a comment - Hans, I am closing this issue as complete given the original problem described here 'Appengine does not process .jspx files' has been resolved with the dummy.jsp workaround. I have contacted the GAE team to find out if and when they will include jspx to be triggered directly in GAE. The other issue you raised here is the compilation problem of the Roo generated jspx files in a GAE environment. The problem is the use of jasper-runtime-5.0.28.jar in the current version of GAE alongside geronimo-jsp_2.1_spec-1.0.1.jar. This means that GAE have an API which allows JSP 2.1 and an implementation of Jasper which only supports JSP 2.0. Spring Roo generated MVC apps use a number of JSP 2.1 features (mostly EL related) which are supported by all current Web containers but not GAE. (see http://code.google.com/p/googleappengine/issues/detail?id=1506 ) As such GAE deployments are currently not supported by Roo generated Spring MVC applications. However, we are in contact with Google to resolve this issue as soon as possible. As a workaround Roo could ship a custom tag library (potentially with reduced functionality) to support JSP 2.0 EL. Another issue which needs to be resolved is the full support of the default GAE data store. This will require changes outlined in ROO-611 to fully support references between domain objects. I have raised ROO-1006 to track the work on this.

            People

            • Assignee:
              Stefan Schmidt
              Reporter:
              Hans Westerbeek
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: