You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Amit <am...@gmail.com> on 2015/05/05 16:20:20 UTC

websocket with jetty 9

I am trying to run websocket component with jetty 9 and i am getting
java.lang.ClassNotFoundException:
org.eclipse.jetty.http.ssl.SslContextFactory. When i look at the dependency
jetty 9 does not have   org.eclipse.jetty.http.ssl.SslContextFactory class.
Does the Apache camel component run with the jetty 9. We are building java
container framework and we are depend on the jetty 9. moving the jetty 9 to
jetty 8 is 
not option for us. 



--
View this message in context: http://camel.465427.n5.nabble.com/websocket-with-jetty-9-tp5766712.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: websocket with jetty 9

Posted by Amit <am...@gmail.com>.
I did try websocket component with jetty 9 and Apache Camel 2.15.2 and i got
same exception due to  SslContextFactory  class 
moved in jetty 9 to  org.eclipse.jetty.util.ssl.folder and Apache  websocket
reference to  org.eclipse.jetty.http.ssl.SslContextFactory  that is only
exit in Jetty 8 and below version. 


java.lang.ClassNotFoundException 
> org.eclipse.jetty.http.ssl.SslContextFactory



--
View this message in context: http://camel.465427.n5.nabble.com/websocket-with-jetty-9-tp5766712p5767115.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: websocket with jetty 9

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Could you log a JIRA ticket about this?
http://camel.apache.org/support

The camel-websocket needs somehow to be able to pick the correct one
for jetty8 vs 9

On Mon, May 18, 2015 at 4:53 PM, Amit <am...@gmail.com> wrote:
> I did try websocket component with jetty 9 and Apache Camel 2.15.2 and i got
> same exception due to  SslContextFactory  class
> moved in jetty 9 to  org.eclipse.jetty.util.ssl.folder and Apache  websocket
> reference to  org.eclipse.jetty.http.ssl.SslContextFactory  that is only
> exist in Jetty 8 and below version.
>
>
> java.lang.ClassNotFoundException
>> org.eclipse.jetty.http.ssl.SslContextFactory
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/websocket-with-jetty-9-tp5766712p5767217.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: websocket with jetty 9

Posted by Amit <am...@gmail.com>.
I did try websocket component with jetty 9 and Apache Camel 2.15.2 and i got
same exception due to  SslContextFactory  class 
moved in jetty 9 to  org.eclipse.jetty.util.ssl.folder and Apache  websocket
reference to  org.eclipse.jetty.http.ssl.SslContextFactory  that is only
exist in Jetty 8 and below version. 


java.lang.ClassNotFoundException 
> org.eclipse.jetty.http.ssl.SslContextFactory



--
View this message in context: http://camel.465427.n5.nabble.com/websocket-with-jetty-9-tp5766712p5767217.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: websocket with jetty 9

Posted by Amit <am...@gmail.com>.
I did try websocket component with jetty 9 and Apache Camel 2.15.2 and i got
same exception due to  SslContextFactory  class 
moved in jetty 9 to  org.eclipse.jetty.util.ssl.folder and Apache  websocket
reference to  org.eclipse.jetty.http.ssl.SslContextFactory  that is only
exist in Jetty 8 and below version. 


java.lang.ClassNotFoundException 
> org.eclipse.jetty.http.ssl.SslContextFactory



--
View this message in context: http://camel.465427.n5.nabble.com/websocket-with-jetty-9-tp5766712p5767216.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: websocket with jetty 9

Posted by Amit <am...@gmail.com>.
I did try websocket component with jetty 9 and Apache Camel 2.15.2 and i got
same exception due to  SslContextFactory  class 
moved in jetty 9 to  org.eclipse.jetty.util.ssl.folder and Apache  websocket
reference to  org.eclipse.jetty.http.ssl.SslContextFactory  that is only
exit in Jetty 8 and below version. 


java.lang.ClassNotFoundException 
> org.eclipse.jetty.http.ssl.SslContextFactory



--
View this message in context: http://camel.465427.n5.nabble.com/websocket-with-jetty-9-tp5766712p5767118.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: websocket with jetty 9

Posted by Amit <am...@gmail.com>.
I did try websocket component with jetty 2.15.2 and i got same exception due
to  SslContextFactory  class
moved in jetty 9 to  org.eclipse.jetty.util.ssl.folder and Apache  websocket
reference to  org.eclipse.jetty.http.ssl.SslContextFactory  that is only
exit in Jetty 8 and below version.


java.lang.ClassNotFoundException
> org.eclipse.jetty.http.ssl.SslContextFactory 



--
View this message in context: http://camel.465427.n5.nabble.com/websocket-with-jetty-9-tp5766712p5767114.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: websocket with jetty 9

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You need Camel 2.15.x for Jetty 9 support.

On Wed, May 6, 2015 at 6:19 PM, Amit <am...@gmail.com> wrote:
> We are currently using Apache Camel 2.11.4, but we can migrate to 2.15.x
>
> route
> ======
> <route xmlns="http://camel.apache.org/schema/spring" trace="true">
>     <from uri="websocket://invokeService2/v1/helloWebsocket" />
>
>     <transform>
>                <groovy> Message received from WebSocket Client:${body}
> </groovy>
>     </transform>
>
> </route>
>
>
> Exception
> ==============
> 12:04:28.303 [com.att.ajsc.runner.Runner.main()] ERROR ajsc.ComputeService -
> NMBS-COMPUTESVC-0042: addRoute for invokeService2:websocket:v1 failed  -
> EXCEPTION: Failed to create route invokeService2:websocket:v1:
> Route(invokeService2:websocket:v1)[[From[websocket://invokeS... because of
> Failed to resolve endpoint: websocket://invokeService2/v1/helloWebsocket due
> to: Cannot auto create component: websocket
> CAUSED BY: java.lang.ClassNotFoundException:
> org.eclipse.jetty.http.ssl.SslContextFactory
> STACKTRACE: at org.apache.camel.model.RouteDefinition(addRoutes:181)
> at org.apache.camel.impl.DefaultCamelContext(startRoute:756)
> at org.apache.camel.impl.DefaultCamelContext(startRouteDefinitions:1850)
> at org.apache.camel.impl.DefaultCamelContext(addRouteDefinitions:693)
> at org.apache.camel.model.ModelCamelContext$addRouteDefinitions(call:-1)
> at ajsc.ComputeService(addRoute:778)
> at ajsc.ComputeService$_init_closure15(doCall:876)
> at ajsc.ComputeService(init:876)
> at ajsc.ComputeService$init(call:-1)
> at ajsc.RouteMgmtService(init:120)
> at ajsc.RouteMgmtService$init(call:-1)
> at ajsc.ContextMgr(onApplicationEvent:16)
> at
> org.springframework.context.event.SimpleApplicationEventMulticaster(multicastEvent:97)
> at
> org.springframework.context.support.AbstractApplicationContext(publishEvent:327)
> at
> org.springframework.context.support.AbstractApplicationContext(finishRefresh:941)
> at
> org.springframework.context.support.AbstractApplicationContext(refresh:475)
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/websocket-with-jetty-9-tp5766712p5766780.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: websocket with jetty 9

Posted by Amit <am...@gmail.com>.
We are currently using Apache Camel 2.11.4, but we can migrate to 2.15.x

route
======
<route xmlns="http://camel.apache.org/schema/spring" trace="true">
    <from uri="websocket://invokeService2/v1/helloWebsocket" />
        
    <transform>
     	       <groovy> Message received from WebSocket Client:${body} 
</groovy>
    </transform>
    
</route>


Exception 
==============
12:04:28.303 [com.att.ajsc.runner.Runner.main()] ERROR ajsc.ComputeService -
NMBS-COMPUTESVC-0042: addRoute for invokeService2:websocket:v1 failed  -
EXCEPTION: Failed to create route invokeService2:websocket:v1:
Route(invokeService2:websocket:v1)[[From[websocket://invokeS... because of
Failed to resolve endpoint: websocket://invokeService2/v1/helloWebsocket due
to: Cannot auto create component: websocket
CAUSED BY: java.lang.ClassNotFoundException:
org.eclipse.jetty.http.ssl.SslContextFactory  
STACKTRACE: at org.apache.camel.model.RouteDefinition(addRoutes:181)
at org.apache.camel.impl.DefaultCamelContext(startRoute:756)
at org.apache.camel.impl.DefaultCamelContext(startRouteDefinitions:1850)
at org.apache.camel.impl.DefaultCamelContext(addRouteDefinitions:693)
at org.apache.camel.model.ModelCamelContext$addRouteDefinitions(call:-1)
at ajsc.ComputeService(addRoute:778)
at ajsc.ComputeService$_init_closure15(doCall:876)
at ajsc.ComputeService(init:876)
at ajsc.ComputeService$init(call:-1)
at ajsc.RouteMgmtService(init:120)
at ajsc.RouteMgmtService$init(call:-1)
at ajsc.ContextMgr(onApplicationEvent:16)
at
org.springframework.context.event.SimpleApplicationEventMulticaster(multicastEvent:97)
at
org.springframework.context.support.AbstractApplicationContext(publishEvent:327)
at
org.springframework.context.support.AbstractApplicationContext(finishRefresh:941)
at
org.springframework.context.support.AbstractApplicationContext(refresh:475)




--
View this message in context: http://camel.465427.n5.nabble.com/websocket-with-jetty-9-tp5766712p5766780.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: websocket with jetty 9

Posted by Amit <am...@gmail.com>.
route
======
<route xmlns="http://camel.apache.org/schema/spring" trace="true">
    <from uri="websocket://invokeService2/v1/helloWebsocket" />
        
    <transform>
     	       <groovy> Message received from WebSocket Client:${body} 
</groovy>
    </transform>
    
</route>


Exception 
==============
12:04:28.303 [com.att.ajsc.runner.Runner.main()] ERROR ajsc.ComputeService -
NMBS-COMPUTESVC-0042: addRoute for invokeService2:websocket:v1 failed  -
EXCEPTION: Failed to create route invokeService2:websocket:v1:
Route(invokeService2:websocket:v1)[[From[websocket://invokeS... because of
Failed to resolve endpoint: websocket://invokeService2/v1/helloWebsocket due
to: Cannot auto create component: websocket
CAUSED BY: java.lang.ClassNotFoundException:
org.eclipse.jetty.http.ssl.SslContextFactory  
STACKTRACE: at org.apache.camel.model.RouteDefinition(addRoutes:181)
at org.apache.camel.impl.DefaultCamelContext(startRoute:756)
at org.apache.camel.impl.DefaultCamelContext(startRouteDefinitions:1850)
at org.apache.camel.impl.DefaultCamelContext(addRouteDefinitions:693)
at org.apache.camel.model.ModelCamelContext$addRouteDefinitions(call:-1)
at ajsc.ComputeService(addRoute:778)
at ajsc.ComputeService$_init_closure15(doCall:876)
at ajsc.ComputeService(init:876)
at ajsc.ComputeService$init(call:-1)
at ajsc.RouteMgmtService(init:120)
at ajsc.RouteMgmtService$init(call:-1)
at ajsc.ContextMgr(onApplicationEvent:16)
at
org.springframework.context.event.SimpleApplicationEventMulticaster(multicastEvent:97)
at
org.springframework.context.support.AbstractApplicationContext(publishEvent:327)
at
org.springframework.context.support.AbstractApplicationContext(finishRefresh:941)
at
org.springframework.context.support.AbstractApplicationContext(refresh:475)




--
View this message in context: http://camel.465427.n5.nabble.com/websocket-with-jetty-9-tp5766712p5766779.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: websocket with jetty 9

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

What version of Camel. And you can post a bit more information about
how you run it? Maybe some code from your routes and how you
configured them.

On Tue, May 5, 2015 at 4:20 PM, Amit <am...@gmail.com> wrote:
> I am trying to run websocket component with jetty 9 and i am getting
> java.lang.ClassNotFoundException:
> org.eclipse.jetty.http.ssl.SslContextFactory. When i look at the dependency
> jetty 9 does not have   org.eclipse.jetty.http.ssl.SslContextFactory class.
> Does the Apache camel component run with the jetty 9. We are building java
> container framework and we are depend on the jetty 9. moving the jetty 9 to
> jetty 8 is
> not option for us.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/websocket-with-jetty-9-tp5766712.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/