Announcement Announcement Module

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
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSP compile - Possible Jasper fragment issue.


    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:
    Any ideas or suggestions why this setup cant compile JSPs ? Not even the sample JSPs ?

  • #2

    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

    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:


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

    Framework is launched.
    id	State       Bundle
    0	ACTIVE      system.bundle_3.2.2.R32x_v20070118
    1	ACTIVE
    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
    7	ACTIVE
    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
    17	ACTIVE      jta_0.0.0
    18	ACTIVE      org.springframework.osgi.commons-el.osgi_1.0.0.SNAPSHOT
    19	ACTIVE
    20	ACTIVE      org.springframework.bundle.spring.orm_2.5.5
    21	ACTIVE      org.springframework.bundle.spring.web_2.5.5
    22	ACTIVE
    23	ACTIVE
    24	RESOLVED    org.springframework.osgi.log4j.config_1.0.0
    25	ACTIVE      org.springframework.bundle.osgi.io_1.1.1
    26	ACTIVE      com.springsource.slf4j.api_1.5.0
    27	ACTIVE
    28	ACTIVE
    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
    32	ACTIVE
    33	ACTIVE
    34	ACTIVE      org.springframework.bundle.osgi.web_1.1.1
    35	ACTIVE
    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
    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
    45	ACTIVE      tudu_core_osgi_1.0.0
    46	ACTIVE
    47	ACTIVE
    48	ACTIVE      org.springframework.bundle.spring.webmvc_2.5.5
    49	ACTIVE
    50	ACTIVE      com.springsource.slf4j.log4j_1.5.0
    51	ACTIVE      org.springframework.bundle.spring.tx_2.5.5
    52	ACTIVE
    Hope it helps you,


    • #3
      Hi Thierry,

      Thanks for the tip.
      Turns out that everything was working ( servlets, MVC,etc) except for the JSPs compilation because the bundle is a FRAGMENT of the higher level ! 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' 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


      • #4
        same problem - no solution


        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


        • #5

          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)
          - (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

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

          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
          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
          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
          13	ACTIVE
          14	RESOLVED
          15	ACTIVE      com.springsource.javax.xml.bind_2.1.7
          16	ACTIVE
          17	ACTIVE      com.springsource.antlr_2.7.7
          18	RESOLVED    org.springframework.osgi.log4j.config_1.0.0
          19	ACTIVE
          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
          24	ACTIVE      org.springframework.bundle.osgi.web_1.1.1
          25	ACTIVE
          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
          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
          36	ACTIVE
          37	ACTIVE      tudu_datasource_osgi_1.0.0
          38	ACTIVE
          39	ACTIVE
          40	ACTIVE      com.springsource.javax.el_2.1.0
          41	ACTIVE
          42	ACTIVE      tudu_core_osgi_1.0.0
          43	ACTIVE
          44	ACTIVE      org.springframework.bundle.spring.aop_2.5.5
          45	ACTIVE
          46	ACTIVE
          47	ACTIVE      org.springframework.bundle.osgi.web.extender_1.1.1
          48	RESOLVED
          49	ACTIVE      com.springsource.javax.xml.soap_1.3.0
          50	ACTIVE      com.springsource.javax.mail_1.4.1
          51	ACTIVE
          52	ACTIVE
          	            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
          56	ACTIVE
          57	ACTIVE      com.springsource.javax.servlet.jsp_2.1.0
          58	ACTIVE
          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
          63	ACTIVE
          64	ACTIVE      org.springframework.bundle.spring.web_2.5.5
          65	ACTIVE
          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

          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?