Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10556

camel-example-twitter-websocket-blueprint - Cannot load static html resources

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.19.0
    • examples, karaf
    • None
    • Unknown

    Description

      This example camel-example-twitter-websocket-blueprint cannot load the static html file when running in karaf

      HTTP ERROR: 500
      
      Problem accessing /index.html. Reason:
      
          java.lang.RuntimeException: java.io.FileNotFoundException: /webapp/index.html (No such file or directory)
      

      Its some classloading issues with camel-websocket and camel-jetty when running in OSGi. As the stacktrace seems to load from file system.

      2016-12-04 14:11:50,879 | WARN  | SocketServer-266 | ServletHandler                   | 83 - org.eclipse.jetty.util - 9.2.19.v20160908 | /
      java.lang.RuntimeException: java.io.FileNotFoundException: /webapp/index.html (No such file or directory)
      	at org.eclipse.jetty.http.HttpContent$ResourceAsHttpContent.getDirectBuffer(HttpContent.java:110)[71:org.eclipse.jetty.http:9.2.19.v20160908]
      	at org.eclipse.jetty.server.HttpOutput.sendContent(HttpOutput.java:665)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.servlet.DefaultServlet.sendData(DefaultServlet.java:931)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:534)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[63:javax.servlet-api:3.1.0]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[63:javax.servlet-api:3.1.0]
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:191)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:72)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:588)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[63:javax.servlet-api:3.1.0]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[63:javax.servlet-api:3.1.0]
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.Server.handle(Server.java:499)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[80:org.eclipse.jetty.server:9.2.19.v20160908]
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[72:org.eclipse.jetty.io:9.2.19.v20160908]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[83:org.eclipse.jetty.util:9.2.19.v20160908]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[83:org.eclipse.jetty.util:9.2.19.v20160908]
      	at java.lang.Thread.run(Thread.java:745)[:1.8.0_31]
      Caused by: java.io.FileNotFoundException: /webapp/index.html (No such file or directory)
      	at java.io.RandomAccessFile.open(Native Method)[:1.8.0_31]
      	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)[:1.8.0_31]
      	at org.eclipse.jetty.util.BufferUtil.readFrom(BufferUtil.java:437)[83:org.eclipse.jetty.util:9.2.19.v20160908]
      	at org.eclipse.jetty.util.BufferUtil.toBuffer(BufferUtil.java:884)[83:org.eclipse.jetty.util:9.2.19.v20160908]
      	at org.eclipse.jetty.http.HttpContent$ResourceAsHttpContent.getDirectBuffer(HttpContent.java:106)[71:org.eclipse.jetty.http:9.2.19.v20160908]
      	... 34 more
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment