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

WebContainer NullPointerException on deploying Spring Boot WAR sample application

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.3.6
    • None
    • karaf
    • None

    Description

      I am following the steps on https://karaf.apache.org/manual/latest/webcontainer to deploy a simple Spring Booot WAR.

      I download the Spring Booot sample from https://start.spring.io/ and mvn install it.

      Then I execute:

      bundle:install -s "webbundle:mvn:org.example.osgi/spring.boot.demo.three/0.0.1-SNAPSHOT/war?Bundle-SymbolicName=demo-three&Web-ContextPath=/three"
      

      I get this error:

      10:31:34.124 INFO  [paxweb-extender-1-thread-1] will add org.apache.jasper.servlet.JasperInitializer to ServletContainerInitializers                                                         
      10:31:34.124 INFO  [paxweb-extender-1-thread-1] Skipt org.apache.jasper.servlet.JasperInitializer, because specialized handler will be present
      10:31:34.124 INFO  [paxweb-extender-1-thread-1] will add org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer to ServletContainerInitializers
      10:31:34.125 INFO  [paxweb-extender-1-thread-1] added ServletContainerInitializer: org.eclipse.jetty.websocket.server.NativeWebSocketServletContainerInitializer
      10:31:34.125 INFO  [paxweb-extender-1-thread-1] will add org.eclipse.jetty.websocket.jsr356.server.deploy.WebSocketServerContainerInitializer to ServletContainerInitializers
      10:31:34.267 ERROR [paxweb-extender-1-thread-1] Exception starting HttpContext registration
      java.lang.NullPointerException
      10:31:34.267 ERROR [paxweb-extender-1-thread-1] Error deploying web application
      java.lang.NullPointerExceptio
      

      There is no hint on what is causing this NullPointerException. I tried to log:set TRACE but it still gives no further information.

      My ultimate goal is to deploy several Spring Boot apps as WARs to let Karaf's Jetty route calls to these apps based on their context-path.

      Attachments

        1. spring.boot.demo.three.zip
          65 kB
          Mariano Eloy Fernández

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            eloy_iv Mariano Eloy Fernández
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: