Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-1869

war deployer fails to find seemingly present jsp

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: karaf-webcontainer
    • Labels:
      None
    • Environment:

      3.0.0-SNAPSHOT

      Description

      when I manually deploy war with *.jsp inside, I consistently get "Jsp support is not enabled", although it looks like it is there.

      war in question comes from this zip
      http://www.hazelcast.com/files/hazelcast-2.3.1.zip

      2012-09-25 11:25:25,643 | INFO  | Executor: 1      | HttpServiceFactoryImpl           | 93 - org.ops4j.pax.web.pax-web-runtime - 2.1.0 | Binding bundle: [mancenter [132]] to http service
      2012-09-25 11:25:25,649 | WARN  | Executor: 1      | RegisterWebAppVisitorWC          | 127 - org.ops4j.pax.web.pax-web-extender-war - 2.1.0 | Jsp support is not enabled. Is org.ops4j.pax.web.jsp bundle installed?
      
      andrei2@root()> list -t 0 | grep Web
      [  91] [    Active] [   30] OPS4J Pax Web - API (2.1.0)
      [  92] [    Active] [   30] OPS4J Pax Web - Service SPI (2.1.0)
      [  93] [    Active] [   30] OPS4J Pax Web - Runtime (2.1.0)
      [  94] [    Active] [   30] OPS4J Pax Web - Jetty (2.1.0)
      [  97] [  Resolved] [   30] Apache Karaf :: Web Console :: Branding (3.0.0.SNAPSHOT), Hosts: 98
      [  98] [    Active] [   30] Apache Karaf :: Web Console :: Console (3.0.0.SNAPSHOT), Fragments: 97
      [ 101] [    Active] [   30] Apache Karaf :: Web Console :: Instance Plugin (3.0.0.SNAPSHOT)
      [ 102] [    Active] [   30] Apache Karaf :: Web Console :: Features Plugin (3.0.0.SNAPSHOT)
      [ 103] [    Active] [   30] Apache Karaf :: Web Console :: Gogo Plugin (3.0.0.SNAPSHOT)
      [ 104] [    Active] [   30] Apache Karaf :: Web Console :: HTTP Plugin (3.0.0.SNAPSHOT)
      [ 124] [    Active] [   30] Apache Felix Web Console Event Plugin (1.0.2)
      [ 125] [    Active] [   30] OPS4J Pax Web - Jsp Support (2.1.0)
      [ 126] [    Active] [   30] OPS4J Pax Web - Extender - Whiteboard (2.1.0)
      [ 127] [    Active] [   30] OPS4J Pax Web - Extender - WAR (2.1.0)
      [ 128] [    Active] [   30] OPS4J Pax Web - FileInstall Deployer (2.1.0)
      [ 130] [    Active] [   30] Apache Karaf :: Web :: Core (3.0.0.SNAPSHOT)
      [ 131] [    Active] [   30] Apache Karaf :: Web :: Commands (3.0.0.SNAPSHOT)
      

        Activity

        Hide
        jbonofre Jean-Baptiste Onofré added a comment -

        It should be fixed on Karaf 4.x with new resolver and staged.

        Show
        jbonofre Jean-Baptiste Onofré added a comment - It should be fixed on Karaf 4.x with new resolver and staged.
        Hide
        marcincinik Marcin Cinik added a comment - - edited

        I've just modified the org.apache.karaf.features.cfg and now have the following:
        featuresBoot=config,standard,region,package,kar,ssh,management,http,webconsole,pax-http,pax-jetty,pax-war

        This resolves the problem
        Thanks for you great support !

        Show
        marcincinik Marcin Cinik added a comment - - edited I've just modified the org.apache.karaf.features.cfg and now have the following: featuresBoot=config,standard,region,package,kar,ssh,management,http,webconsole,pax-http,pax-jetty,pax-war This resolves the problem Thanks for you great support !
        Hide
        marcincinik Marcin Cinik added a comment -

        The http features are installed as a result of
        featuresBoot=config,standard,region,package,kar,ssh,management,http,webconsole
        in my org.apache.karaf.features.cfg.

        Then in my xxx-framework-feature I have

        <feature name="xxx-framework-feature" version="1.0.0-SNAPSHOT"
        description="XXX">

        ...

        <feature>pax-war</feature>
        ...

        I've just added

        <feature name="xxx-yyy-plugin" version="1.0.0-SNAPSHOT"
        description="">

        <feature>xxx-framework-feature</feature>
        <!-- required for JSP support -->
        <feature>pax-http</feature>
        <feature>pax-war</feature>
        <feature>pax-jetty</feature>

        to the xxx-yyy-plugin but it did not help.

        Show
        marcincinik Marcin Cinik added a comment - The http features are installed as a result of featuresBoot=config,standard,region,package,kar,ssh,management,http,webconsole in my org.apache.karaf.features.cfg. Then in my xxx-framework-feature I have <feature name="xxx-framework-feature" version="1.0.0-SNAPSHOT" description="XXX"> ... <feature>pax-war</feature> ... I've just added <feature name="xxx-yyy-plugin" version="1.0.0-SNAPSHOT" description=""> <feature>xxx-framework-feature</feature> <!-- required for JSP support --> <feature>pax-http</feature> <feature>pax-war</feature> <feature>pax-jetty</feature> to the xxx-yyy-plugin but it did not help.
        Hide
        achim_nierbeck Achim Nierbeck added a comment -

        Make sure to depend not only on the http feature but on the war feature it'll install jsp in the same instance as the others.
        Cause from the description I got that you only install the Http feature in the beginning. I don't understand why you can't install it right away, you seem to be needing it. Or if you don't want the war-extender just install the whiteboard feature it will also add the jsp providing feature.

        Show
        achim_nierbeck Achim Nierbeck added a comment - Make sure to depend not only on the http feature but on the war feature it'll install jsp in the same instance as the others. Cause from the description I got that you only install the Http feature in the beginning. I don't understand why you can't install it right away, you seem to be needing it. Or if you don't want the war-extender just install the whiteboard feature it will also add the jsp providing feature.
        Hide
        marcincinik Marcin Cinik added a comment -

        After fresh startup and removing $KARAF_INSTALL/data directory

        karaf@root()> bundle:list -t 0 |grep -i pax
        1 | Active | 5 | 2.2.0 | OPS4J Pax Url - aether:
        2 | Active | 5 | 2.2.0 | OPS4J Pax Url - wrap:
        3 | Active | 8 | 1.7.4 | OPS4J Pax Logging - API
        4 | Active | 8 | 1.7.4 | OPS4J Pax Logging - Service
        57 | Active | 30 | 1.7.0 | OPS4J Pax Swissbox :: OSGi Core
        61 | Active | 30 | 3.1.2 | OPS4J Pax Web - API
        62 | Active | 30 | 3.1.2 | OPS4J Pax Web - Service SPI
        63 | Active | 30 | 3.1.2 | OPS4J Pax Web - Runtime
        64 | Active | 30 | 3.1.2 | OPS4J Pax Web - Jetty

        And then installing my own features:

        karaf@root()> feature:install xxx-framework-feature
        Refreshing bundles org.apache.karaf.webconsole.features (71), org.ops4j.pax.web.pax-web-jetty (64), org.eclipse.jetty.aggregate.jetty-all-server (55), org.apache.karaf.webconsole.http (73), org.apache.karaf.webconsole.gogo (72), org.apache.xbean.reflect (59), org.apache.geronimo.specs.geronimo-jaspic_1.0_spec (53), org.apache.karaf.webconsole.instance (70), org.ops4j.pax.web.pax-web-runtime(63)
        Starting to listen for bundle events.

        And installing two more home made features:

        karaf@root()> feature:install xxx-uthentication
        karaf@root()> feature:install xxx-yyy-plugin

        Going to http://localhost:8181/osgi/ and again JSP pages are not processed. I can see '<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>' rendered on the page.

        Now issuing

        karaf@root()> bundle:refresh -f 63

        And the page is rendered correctly now.

        My question is: how to avoid this additional refresh operation ???

        Show
        marcincinik Marcin Cinik added a comment - After fresh startup and removing $KARAF_INSTALL/data directory karaf@root()> bundle:list -t 0 |grep -i pax 1 | Active | 5 | 2.2.0 | OPS4J Pax Url - aether: 2 | Active | 5 | 2.2.0 | OPS4J Pax Url - wrap: 3 | Active | 8 | 1.7.4 | OPS4J Pax Logging - API 4 | Active | 8 | 1.7.4 | OPS4J Pax Logging - Service 57 | Active | 30 | 1.7.0 | OPS4J Pax Swissbox :: OSGi Core 61 | Active | 30 | 3.1.2 | OPS4J Pax Web - API 62 | Active | 30 | 3.1.2 | OPS4J Pax Web - Service SPI 63 | Active | 30 | 3.1.2 | OPS4J Pax Web - Runtime 64 | Active | 30 | 3.1.2 | OPS4J Pax Web - Jetty And then installing my own features: karaf@root()> feature:install xxx-framework-feature Refreshing bundles org.apache.karaf.webconsole.features (71), org.ops4j.pax.web.pax-web-jetty (64), org.eclipse.jetty.aggregate.jetty-all-server (55), org.apache.karaf.webconsole.http (73), org.apache.karaf.webconsole.gogo (72), org.apache.xbean.reflect (59), org.apache.geronimo.specs.geronimo-jaspic_1.0_spec (53), org.apache.karaf.webconsole.instance (70), org.ops4j.pax.web.pax-web-runtime (63) Starting to listen for bundle events. And installing two more home made features: karaf@root()> feature:install xxx-uthentication karaf@root()> feature:install xxx-yyy-plugin Going to http://localhost:8181/osgi/ and again JSP pages are not processed. I can see '<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>' rendered on the page. Now issuing karaf@root()> bundle:refresh -f 63 And the page is rendered correctly now. My question is: how to avoid this additional refresh operation ???
        Hide
        achim_nierbeck Achim Nierbeck added a comment -

        Instead of restarting Karaf a refresh of the Pax Web Runtime Bundles is feasible.
        I'm wondering how you installed the required features. Cause if you install the http Feature first and later on install the other bundles then you might end up with the described scenario, though the feature installer should trigger a refresh on the runtime bundle.

        Show
        achim_nierbeck Achim Nierbeck added a comment - Instead of restarting Karaf a refresh of the Pax Web Runtime Bundles is feasible. I'm wondering how you installed the required features. Cause if you install the http Feature first and later on install the other bundles then you might end up with the described scenario, though the feature installer should trigger a refresh on the runtime bundle.
        Hide
        marcincinik Marcin Cinik added a comment -

        I'm facing the same issue. What is important is that for me it dissappears after restarting Karaf. So the sequence is

        New karaf instance
        1. Deploy my bundles (including web app)
        2. See the " Jsp support is not enabled" in the log file
        3. Go to the http://localhost:8181/osgi/ui and see a JSP tags like '<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>' rendered on the page, which means that the JSP support is not there
        4. Restart Karaf
        5. The " Jsp support is not enabled" is not there anymore.
        6. The web page is rendered correctly.

        Show
        marcincinik Marcin Cinik added a comment - I'm facing the same issue. What is important is that for me it dissappears after restarting Karaf. So the sequence is New karaf instance 1. Deploy my bundles (including web app) 2. See the " Jsp support is not enabled" in the log file 3. Go to the http://localhost:8181/osgi/ui and see a JSP tags like '<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>' rendered on the page, which means that the JSP support is not there 4. Restart Karaf 5. The " Jsp support is not enabled" is not there anymore. 6. The web page is rendered correctly.
        Hide
        andrei.pozolotin Andrei Pozolotin added a comment -

        FYI:

        this is basically trying to re create this
        http://iocanel.blogspot.com/2011/02/hazelcast-on-karaf.html

        with current version of hazelcast

        Show
        andrei.pozolotin Andrei Pozolotin added a comment - FYI: this is basically trying to re create this http://iocanel.blogspot.com/2011/02/hazelcast-on-karaf.html with current version of hazelcast

          People

          • Assignee:
            Unassigned
            Reporter:
            andrei.pozolotin Andrei Pozolotin
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development