0 Replies Latest reply on Jul 18, 2011 9:35 AM by Alexandre GUYOT

    how to add jetty-WebSocket to the integrate fuseESB's jetty?

    Alexandre GUYOT Newbie

      I want to create a monitoring interface accessible from the web browser. The chosen solution is the use of WebSockets a good idea because it works perfectly with the jetty WebSockets.

       

      However the commend line : "features:info jetty" return :

      -


      Description of jetty 7.4.1.v20110513 feature

      -


      Feature has no configuration

      Feature has no configuration files

      Feature has no dependencies.

      Feature contains followed bundles:

        mvn:org.apache.geronimo.specs/geronimo-activation_1.1_spec/1.1

        mvn:org.apache.geronimo.specs/geronimo-servlet_2.5_spec/1.1.2

        mvn:javax.mail/mail/1.4.3

        mvn:javax.mail/mail/1.4.3

        mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1

        mvn:org.eclipse.jetty/jetty-util/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-io/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-http/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-client/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-continuation/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-jmx/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-server/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-security/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-servlet/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-servlets/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-xml/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-webapp/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-jndi/7.4.1.v20110513

        mvn:org.eclipse.jetty/jetty-plus/7.4.1.v20110513

      -


       

      So the majority of packages is here but not one that interests me, namely jetty-WebSocket so I installed the command line "install mvn:mvn:org.eclipse.jetty/jetty-websocket/7.4.1.v20110513"

      The install work perfectly but I can't use websocket it always return the same error :

      -


      WARN  : log             >>> /ihm/ws/

      java.lang.NullPointerException

              at org.eclipse.jetty.websocket.WebSocketFactory.upgrade(WebSocketFactory.java:106)[254:mvn_com.com.test.monitor_0.0.1_war:0]

              at org.eclipse.jetty.websocket.WebSocketServlet.service(WebSocketServlet.java:77)[254:mvn_com.test.monitor_0.0.1_war:0]

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)[169:org.apache.geronimo.specs.geronimo-servlet_3.0_spec:1.0]

              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538)[110:org.eclipse.jetty.servlet:7.4.1.v20110513]

              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:478)[110:org.eclipse.jetty.servlet:7.4.1.v20110513]

              at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[162:org.ops4j.pax.web.pax-web-jetty:1.0.3]

              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)[109:org.eclipse.jetty.server:7.4.1.v20110513]

              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517)[112:org.eclipse.jetty.security:7.4.1.v20110513]

              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)[109:org.eclipse.jetty.server:7.4.1.v20110513]

              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937)[109:org.eclipse.jetty.server:7.4.1.v20110513]

              at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:116)[162:org.ops4j.pax.web.pax-web-jetty:1.0.3]

              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)[110:org.eclipse.jetty.servlet:7.4.1.v20110513]

              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)[109:org.eclipse.jetty.server:7.4.1.v20110513]

              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871)[109:org.eclipse.jetty.server:7.4.1.v20110513]

              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[109:org.eclipse.jetty.server:7.4.1.v20110513]

              at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)[162:org.ops4j.pax.web.pax-web-jetty:1.0.3]

              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[109:org.eclipse.jetty.server:7.4.1.v20110513]

              at org.eclipse.jetty.server.Server.handle(Server.java:346)[109:org.eclipse.jetty.server:7.4.1.v20110513]

              at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589)[109:org.eclipse.jetty.server:7.4.1.v20110513]

              at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048)[109:org.eclipse.jetty.server:7.4.1.v20110513]

              at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601)[107:org.eclipse.jetty.http:7.4.1.v20110513]

              at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214)[107:org.eclipse.jetty.http:7.4.1.v20110513]

              at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411)[109:org.eclipse.jetty.server:7.4.1.v20110513]

              at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:531)[111:org.eclipse.jetty.io:7.4.1.v20110513]

              at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40)[111:org.eclipse.jetty.io:7.4.1.v20110513]

              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529)[114:org.eclipse.jetty.util:7.4.1.v20110513]

              at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]

      -


       

      But when I try my war directly into jetty (outside FuseESB, it works perfectly). So I think the package jetty-WebSocket I installed is not working because there is no feature built into the original jetty.

       

      If someone has an idea on how to solve my problem?

      Thanks a lot

       

      Maulex

       

      -


      Edited by: maulex on Jul 18, 2011 1:29 PM

      -


      I finally managed to package integrated jetty-WebSocket in the jetty feature. However I still get the same error, how to specify in the jetty's configuration to load at startup WebSockets support! Where is the file in FuseESB (a start.ini like in jetty)?