Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
JSP compile - Possible Jasper fragment issue. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSP compile - Possible Jasper fragment issue.

    Hi,

    I bumped into some trouble running/executing JSP's in an embedded WAR. It also seems the sample application (simple-web-app) has the same trouble compiling JSPs, I always get the following when attempting to access a JSP:

    19:23:15.837 [http-8080-Processor4] INFO o.a.c.c.C.[.[.[.[jsp] - Servlet jsp is currently unavailable

    Servlets works fine, in fact, even the resource servlet reflects the two JSP's source code ( http://localhost:8080/simple-web-app...osgi-world.jsp )...but when I try to access the JSP directly the logs show the 'currently unavailable' so I've definitely narrowed it down to compiling JSP issue.

    I've tried both Eclipse Equinox and Felix 1.0.4/1.2, with the latest Spring-DM 1.2...with the following bundles for Tomcat:
    Code:
    catalina.osgi-5.5.23-SNAPSHOT.jar                  com.springsource.org.apache.jasper-6.0.16.jar
    catalina.start.osgi-1.0-20080425.161832-4.jar      com.springsource.org.apache.jasper.org.eclipse.jdt-6.0.16.jar
    com.springsource.javax.el-2.1.0.jar                
    com.springsource.org.apache.juli.extras-6.0.16.jar
    com.springsource.javax.servlet.jsp-2.1.0.jar       com.springsource.org.apache.taglibs.standard-1.1.2.jar
    com.springsource.javax.servlet.jsp.jstl-1.1.2.jar  
    servlet-api.osgi-2.5-SNAPSHOT.jar
    com.springsource.org.apache.el-6.0.16.jar
    Any ideas or suggestions why this setup cant compile JSPs ? Not even the sample JSPs ?

  • #2
    Hello,

    I haven't tried Spring DM 1.2 yet but I believe that you need to have a consistent list of bundles for Tomcat. All related bundles need to be related to the same version of the tool, in your case 5.5.23 or 6.0.16. I see that you use the version 5.5.23 for the server and 6.0.16 for jasper, jsp and jstl...

    I had the same problem as you and the cause was a non consistent list of bundles (see the following thread http://forum.springframework.org/showthread.php?t=59889).

    If you want to use the version 5.5.23, you need to find the related bundle for jasper:
    org.springframework.osgi.jasper.osgi_5.5.23.SNAPSH OT

    It is not present in the OSGi bundle repository but can be get using maven using the following dependency:

    <dependency>
    <groupId>org.springframework.osgi</groupId>
    <artifactId>jasper.osgi</artifactId>
    <version>5.5.23-SNAPSHOT</version>
    </dependency>

    Here is the list of bundles I use for my target platform in Eclipse:

    Code:
    ss
    
    Framework is launched.
    
    id	State       Bundle
    0	ACTIVE      system.bundle_3.2.2.R32x_v20070118
    1	ACTIVE      com.springsource.org.apache.commons.beanutils_1.7.0
    2	ACTIVE      org.springframework.bundle.spring.core_2.5.5
    3	ACTIVE      com.springsource.javax.servlet.jsp_2.1.0
    4	ACTIVE      com.springsource.javax.servlet.jsp.jstl_1.1.2
    5	ACTIVE      com.springsource.javax.servlet_2.5.0
    6	ACTIVE      com.springsource.org.aopalliance_1.0.0
    7	ACTIVE      com.springsource.org.apache.commons.collections_3.2.0
    8	ACTIVE      org.springframework.bundle.spring.beans_2.5.5
    9	ACTIVE      org.springframework.osgi.jasper.osgi_5.5.23.SNAPSHOT
    10	ACTIVE      org.springframework.bundle.spring.context_2.5.5
    11	ACTIVE      com.springsource.javax.el_2.1.0
    12	ACTIVE      org.springframework.bundle.osgi.web.extender_1.1.1
    13	ACTIVE      org.springframework.osgi.catalina.osgi_5.5.23.SNAPSHOT
    14	ACTIVE      org.springframework.bundle.osgi.extensions.annotations_1.1.1
    15	ACTIVE      tudu.war_1.0.0
    16	ACTIVE      com.springsource.org.aspectj.weaver_1.6.1
    17	ACTIVE      jta_0.0.0
    18	ACTIVE      org.springframework.osgi.commons-el.osgi_1.0.0.SNAPSHOT
    19	ACTIVE      com.springsource.org.objectweb.asm.tree.attrs_1.5.3
    20	ACTIVE      org.springframework.bundle.spring.orm_2.5.5
    21	ACTIVE      org.springframework.bundle.spring.web_2.5.5
    22	ACTIVE      com.springsource.slf4j.org.apache.commons.logging_1.5.0
    23	ACTIVE      com.springsource.javassist_3.3.0.ga
    24	RESOLVED    org.springframework.osgi.log4j.config_1.0.0
    	            Master=31
    25	ACTIVE      org.springframework.bundle.osgi.io_1.1.1
    26	ACTIVE      com.springsource.slf4j.api_1.5.0
    27	ACTIVE      com.springsource.net.sf.cglib_2.1.3
    28	ACTIVE      com.springsource.com.mchange.v2.c3p0_0.9.1.2
    	            Fragments=44
    29	ACTIVE      com.springsource.antlr_2.7.7
    30	ACTIVE      com.springsource.javax.xml.stream_1.0.1
    31	ACTIVE      org.springframework.osgi.log4j.osgi_1.2.15.SNAPSHOT
    	            Fragments=24
    32	ACTIVE      com.springsource.org.hibernate_3.2.6.ga
    33	ACTIVE      com.springsource.org.hsqldb_1.8.0.9
    34	ACTIVE      org.springframework.bundle.osgi.web_1.1.1
    35	ACTIVE      com.springsource.org.objectweb.asm_2.2.3
    36	ACTIVE      org.springframework.bundle.spring.jdbc_2.5.5
    37	ACTIVE      org.springframework.bundle.osgi.extender_1.1.1
    38	ACTIVE      org.springframework.osgi.catalina.start.osgi_1.0.0.SNAPSHOT
    39	ACTIVE      org.springframework.bundle.osgi.core_1.1.1
    40	ACTIVE      com.springsource.org.dom4j_1.6.1
    41	ACTIVE      org.springframework.bundle.spring.aop_2.5.5
    42	ACTIVE      tudu_datasource_osgi_1.0.0
    43	ACTIVE      org.springframework.bundle.spring.context.support_2.5.5
    44	RESOLVED    com.springsource.com.mchange.v2.c3p0.config_1.0.0
    	            Master=28
    45	ACTIVE      tudu_core_osgi_1.0.0
    46	ACTIVE      com.springsource.org.apache.commons.digester_1.8.0
    47	ACTIVE      com.springsource.org.objectweb.asm_1.5.3
    48	ACTIVE      org.springframework.bundle.spring.webmvc_2.5.5
    49	ACTIVE      com.springsource.org.apache.taglibs.standard_1.1.2
    50	ACTIVE      com.springsource.slf4j.log4j_1.5.0
    51	ACTIVE      org.springframework.bundle.spring.tx_2.5.5
    52	ACTIVE      com.springsource.org.aspectj.runtime_1.6.1
    Hope it helps you,
    Thierry

    Comment


    • #3
      Hi Thierry,

      Thanks for the tip.
      Turns out that everything was working ( servlets, MVC,etc) except for the JSPs compilation because the bundle com.springsource.org.apache.jasper-6.0.16.jar is a FRAGMENT of the higher level com.springsource.org.apache.catalina-6.0.16.jar ! So when the Jasper classes ( which compile the JSP ) are attempted to be loaded it just 'fails silently' since it cant attach them to catalina 6.0.16 ( since I was using 5.5.23 snapshot)...that's the only 'hard' dependency or if you will 'obscure' of mixing and matching versions.

      On another note, I attempted to upgrade everything to the OSGi'fied Catalina 6.0.16 and even Catalina 6.0.18, but for some reason JSP compilation also fails. There are a lot more dependencies of course,. but even trying the simple-web-app included in the Spring-DM distro fails on Catalina 6.0.16 and Calatina 6.0.18 ...with a 'resource not found' ...it looks as though the OSGi'fied Catalina 6.0.16 and 6.0.18 versions are missing some 'enforcement' on using certain the bundles, because the same app running on 5.5.23 snapshot does not run on Catalina 6.0.16 & 6.0.18

      Anyone else had trouble running apps compiling JSPs on Catalina 6.0.16 and 6.0.18 ? And if so could you share the bundles you are loading ? I've tried loading a lot of additional ones beside the 'required dependencies' ranging from commons, sf.cglib, and even a catalina-stripes ( which I have no idea what it does but it marked catalina 6.0.16 and 6.0.18 ) but I still can't get simple-web-app in Spring-DM to compile JSPs in Equinox

      Comment


      • #4
        same problem - no solution

        Hi,

        for a projet we're currently using the artifacts from the Spring OSGi repository and wanted to migrate to those from the Springsource Enterprise Bundle Repository. Catalina starts up but it's not possible to access JSPs - not even an error message to be seen. Any help would be very appreciated ;-)

        Kind regards

        Dirk Mahler

        Comment


        • #5
          Hello,

          You're right! You need to use the jasper bundle with same version of the catalina version in order to make it work...

          With the following bundles related to web, I can make catalina 5.5.23 work correctly:

          - catalina.osgi (5.5.23-SNAPSHOT)
          - jasper.osgi (5.5.23-SNAPSHOT)
          - com.springsource.javax.el-2.1.0.jar
          - com.springsource.javax.servlet.jsp.jstl (1.1.2)
          - com.springsource.javax.servlet.jsp (2.1.0)
          - com.springsource.javax.servlet (2.5.0)
          - com.springsource.org.apache.taglibs.standard (1.1.2)

          The only thing to do in the web app bundle is to specify the following bundles as Requred-Bundle:
          - com.springsource.javax.servlet.jsp.jstl
          - com.springsource.org.apache.taglibs.standard

          At the moment, I have problems to make the things work with catalina 6.0.16 with these bundles:

          Code:
          ss
          
          Framework is launched.
          
          id	State       Bundle
          0	ACTIVE      system.bundle_3.2.2.R32x_v20070118
          1	ACTIVE      org.springframework.bundle.osgi.extensions.annotations_1.1.1
          2	ACTIVE      org.springframework.bundle.osgi.io_1.1.1
          3	ACTIVE      com.springsource.org.apache.juli.extras_6.0.16
          4	ACTIVE      com.springsource.javax.annotation_1.0.0
          5	ACTIVE      com.springsource.slf4j.api_1.5.0
          6	ACTIVE      tudu.war_1.0.0
          7	ACTIVE      com.springsource.org.dom4j_1.6.1
          8	ACTIVE      com.springsource.javax.servlet_2.5.0
          9	ACTIVE      org.springframework.osgi.catalina.start.osgi_1.0.0.SNAPSHOT
          10	ACTIVE      org.springframework.bundle.spring.core_2.5.5
          11	ACTIVE      com.springsource.javax.xml.ws_2.1.1
          12	ACTIVE      com.springsource.javassist_3.3.0.ga
          13	ACTIVE      com.springsource.org.apache.taglibs.standard_1.1.2
          14	RESOLVED    com.springsource.org.apache.jasper_6.0.16
          	            Master=52
          15	ACTIVE      com.springsource.javax.xml.bind_2.1.7
          16	ACTIVE      com.springsource.org.hsqldb_1.8.0.9
          17	ACTIVE      com.springsource.antlr_2.7.7
          18	RESOLVED    org.springframework.osgi.log4j.config_1.0.0
          	            Master=23
          19	ACTIVE      com.springsource.org.apache.tools.ant_1.7.0
          20	ACTIVE      org.springframework.bundle.spring.context.support_2.5.5
          21	ACTIVE      org.springframework.bundle.osgi.extender_1.1.1
          22	ACTIVE      com.springsource.javax.ejb_3.0.0
          23	ACTIVE      org.springframework.osgi.log4j.osgi_1.2.15.SNAPSHOT
          	            Fragments=18
          24	ACTIVE      org.springframework.bundle.osgi.web_1.1.1
          25	ACTIVE      com.springsource.org.apache.commons.digester_1.8.0
          26	ACTIVE      com.springsource.javax.servlet.jsp.jstl_1.1.2
          27	ACTIVE      com.springsource.javax.activation_1.1.1
          28	ACTIVE      org.springframework.bundle.osgi.core_1.1.1
          29	ACTIVE      org.springframework.bundle.spring.jdbc_2.5.5
          30	ACTIVE      com.springsource.org.apache.el_6.0.16
          31	ACTIVE      org.springframework.bundle.spring.context_2.5.5
          32	ACTIVE      com.springsource.javax.persistence_1.0.0
          33	ACTIVE      org.springframework.bundle.spring.beans_2.5.5
          34	ACTIVE      org.springframework.bundle.spring.tx_2.5.5
          35	ACTIVE      com.springsource.org.objectweb.asm_2.2.3
          36	ACTIVE      com.springsource.org.aopalliance_1.0.0
          37	ACTIVE      tudu_datasource_osgi_1.0.0
          38	ACTIVE      com.springsource.org.apache.commons.beanutils_1.7.0
          39	ACTIVE      com.springsource.org.aspectj.weaver_1.6.1
          40	ACTIVE      com.springsource.javax.el_2.1.0
          41	ACTIVE      com.springsource.com.mchange.v2.c3p0_0.9.1.2
          	            Fragments=48
          42	ACTIVE      tudu_core_osgi_1.0.0
          43	ACTIVE      com.springsource.org.apache.commons.logging_1.1.1
          44	ACTIVE      org.springframework.bundle.spring.aop_2.5.5
          45	ACTIVE      com.springsource.slf4j.org.apache.commons.logging_1.5.0
          46	ACTIVE      com.springsource.org.hibernate_3.2.6.ga
          47	ACTIVE      org.springframework.bundle.osgi.web.extender_1.1.1
          48	RESOLVED    com.springsource.com.mchange.v2.c3p0.config_1.0.0
          	            Master=41
          49	ACTIVE      com.springsource.javax.xml.soap_1.3.0
          50	ACTIVE      com.springsource.javax.mail_1.4.1
          51	ACTIVE      com.springsource.org.objectweb.asm.tree.attrs_1.5.3
          52	ACTIVE      com.springsource.org.apache.catalina_6.0.16
          	            Fragments=14, 55
          53	ACTIVE      org.springframework.bundle.spring.orm_2.5.5
          54	ACTIVE      com.springsource.javax.xml.rpc_1.1.0
          55	RESOLVED    com.springsource.org.apache.coyote_6.0.16
          	            Master=52
          56	ACTIVE      com.springsource.org.apache.commons.collections_3.2.0
          57	ACTIVE      com.springsource.javax.servlet.jsp_2.1.0
          58	ACTIVE      com.springsource.org.apache.tools.ant.launch_1.7.0
          59	ACTIVE      org.springframework.bundle.spring.webmvc_2.5.5
          60	ACTIVE      jta_0.0.0
          61	ACTIVE      com.springsource.slf4j.log4j_1.5.0
          62	ACTIVE      com.springsource.org.objectweb.asm_1.5.3
          63	ACTIVE      com.springsource.net.sf.cglib_2.1.3
          64	ACTIVE      org.springframework.bundle.spring.web_2.5.5
          65	ACTIVE      com.springsource.org.aspectj.runtime_1.6.1
          66	ACTIVE      com.springsource.javax.xml.stream_1.0.1
          I have the following error when trying to call my Spring MVC controller / JSP:

          javax.servlet.ServletException: Could not get RequestDispatcher for [/WEB-INF/jsp/todolist.jsp]: check that this file exists within your WAR

          Code:
          org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:221)
          	org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:258)
          	org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1174)
          	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:901)
          	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
          	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
          	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
          	javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
          	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          Initialy, I had the same error with catalina 5.5.23 because of a non coherent list of bundles...
          I can't go to the JSP compilation... Can you give the list of the bundles you used for catalina 6.0.16?

          Thierry

          Comment

          Working...
          X