You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lekkie <le...@gmail.com> on 2010/02/23 10:42:49 UTC
Could not create JsseListener: java.lang.NullPointerException while
create jetty https
I am trying to expose a REST service over jetty's https and I encountered the
exception shown below:
19:04:14,466 | WARN | tenderThread-106 | jetty |
.service.internal.util.JCLLogger 118 | EXCEPTION
java.lang.NullPointerException
at
org.mortbay.jetty.security.SslSocketConnector.createFactory(SslSocketConnector.java:215)
at
org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:423)
at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.apache.camel.component.jetty.JettyHttpComponent.createServletForConnector(JettyHttpComponent.java:380)
at
org.apache.camel.component.jetty.JettyHttpComponent.connect(JettyHttpComponent.java:171)
at
org.apache.camel.component.http.HttpEndpoint.connect(HttpEndpoint.java:111)
at
org.apache.camel.component.http.HttpConsumer.doStart(HttpConsumer.java:50)
at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:55)
19:04:14,466 | WARN | tenderThread-106 | jetty |
.service.internal.util.JCLLogger 118 | failed
SslSocketConnector@0.0.0.0:9000
java.io.IOException: Could not create JsseListener:
java.lang.NullPointerException
at
org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:462)
at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
Here is my jetty https bean config:
<bean id="jetty"
class="org.apache.camel.component.jetty.JettyHttpComponent">
<property name="sslSocketConnectors">
<map>
<entry key="${rest-request-port}">
<bean class="org.mortbay.jetty.security.SslSocketConnector">
<property name="password" value="" />
<property name="keyPassword" value="" />
<property name="keystore" value="C:\Program
Files\Java\jdk1.6.0_16\jre\lib\security\cacerts" />
<property name="needClientAuth" value="no" />
<property name="truststore" value="C:\Program
Files\Java\jdk1.6.0_16\jre\lib\security\cacerts" />
</bean>
</entry>
</map>
</property>
</bean>
and camel context config
<osgi:camelContext xmlns="http://camel.apache.org/schema/spring">
<endpoint id="restURL"
uri="jetty:https://0.0.0.0:${rest-request-port}/kimonoservice?matchOnUriPrefix=true"/>
<route>
<from ref="restURL" />
<to uri="cxfbean:restFulService"/>
<to uri="log:RESTRequest"/>
<to uri="nmr:ServiceProcessor"/>
</route>
</osgi:camelContext>
--
View this message in context: http://old.nabble.com/Could-not-create-JsseListener%3A-java.lang.NullPointerException-while-create-jetty-https-tp27700758p27700758.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Could not create JsseListener: java.lang.NullPointerException
while create jetty https
Posted by Willem Jiang <wi...@gmail.com>.
Which version of Camel and Jetty are you using?
Can you try to set the host address with "127.0.0.1", and run your test
case again ?
Willem
lekkie wrote:
> I am trying to expose a REST service over jetty's https and I encountered the
> exception shown below:
>
> 19:04:14,466 | WARN | tenderThread-106 | jetty |
> .service.internal.util.JCLLogger 118 | EXCEPTION
> java.lang.NullPointerException
> at
> org.mortbay.jetty.security.SslSocketConnector.createFactory(SslSocketConnector.java:215)
> at
> org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:423)
> at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
> at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
> at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at
> org.apache.camel.component.jetty.JettyHttpComponent.createServletForConnector(JettyHttpComponent.java:380)
> at
> org.apache.camel.component.jetty.JettyHttpComponent.connect(JettyHttpComponent.java:171)
> at
> org.apache.camel.component.http.HttpEndpoint.connect(HttpEndpoint.java:111)
> at
> org.apache.camel.component.http.HttpConsumer.doStart(HttpConsumer.java:50)
> at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:55)
>
> 19:04:14,466 | WARN | tenderThread-106 | jetty |
> .service.internal.util.JCLLogger 118 | failed
> SslSocketConnector@0.0.0.0:9000
> java.io.IOException: Could not create JsseListener:
> java.lang.NullPointerException
> at
> org.mortbay.jetty.security.SslSocketConnector.newServerSocket(SslSocketConnector.java:462)
> at org.mortbay.jetty.bio.SocketConnector.open(SocketConnector.java:73)
> at org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:283)
> at org.mortbay.jetty.bio.SocketConnector.doStart(SocketConnector.java:147)
>
>
>
> Here is my jetty https bean config:
>
> <bean id="jetty"
> class="org.apache.camel.component.jetty.JettyHttpComponent">
> <property name="sslSocketConnectors">
> <map>
> <entry key="${rest-request-port}">
> <bean class="org.mortbay.jetty.security.SslSocketConnector">
> <property name="password" value="" />
> <property name="keyPassword" value="" />
> <property name="keystore" value="C:\Program
> Files\Java\jdk1.6.0_16\jre\lib\security\cacerts" />
> <property name="needClientAuth" value="no" />
> <property name="truststore" value="C:\Program
> Files\Java\jdk1.6.0_16\jre\lib\security\cacerts" />
> </bean>
> </entry>
> </map>
> </property>
> </bean>
>
> and camel context config
> <osgi:camelContext xmlns="http://camel.apache.org/schema/spring">
> <endpoint id="restURL"
> uri="jetty:https://0.0.0.0:${rest-request-port}/kimonoservice?matchOnUriPrefix=true"/>
> <route>
> <from ref="restURL" />
> <to uri="cxfbean:restFulService"/>
> <to uri="log:RESTRequest"/>
> <to uri="nmr:ServiceProcessor"/>
> </route>
> </osgi:camelContext>
>
>