[ 
https://issues.apache.org/jira/browse/CAMEL-6433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13676829#comment-13676829
 ] 

Charles Moulliard commented on CAMEL-6433:
------------------------------------------

Error occurs when keystore load the password

{code}
        if (this.resource == null) {
            ks.load(null, ksPassword);
        } else {
            InputStream is = 
this.resolveResource(this.parsePropertyValue(this.resource));
            ks.load(is, ksPassword); // ERROR OCCURS HERE
        }
{code}
                
> Invalid KeyStore format error is generated using camel websocket secure on 
> osgi platform
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-6433
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6433
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-websocket
>            Reporter: Charles Moulliard
>         Attachments: Screen Shot 2013-06-06 at 08.49.09.png
>
>
> When the following camel websocket secure route is deployed on karaf, we get 
> this error 
> {code}
> Caused by: java.io.IOException: Invalid keystore format
>       at 
> sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:633)[:1.6.0_45]
>       at 
> sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)[:1.6.0_45]
>       at java.security.KeyStore.load(KeyStore.java:1185)[:1.6.0_45]
>       at 
> org.apache.camel.util.jsse.KeyStoreParameters.createKeyStore(KeyStoreParameters.java:175)[130:org.apache.camel.camel-core:2.10.0.redhat-60024]
>       at 
> org.apache.camel.util.jsse.KeyManagersParameters.createKeyManagers(KeyManagersParameters.java:108)[130:org.apache.camel.camel-core:2.10.0.redhat-60024]
>       at 
> org.apache.camel.util.jsse.SSLContextParameters.createSSLContext(SSLContextParameters.java:236)[130:org.apache.camel.camel-core:2.10.0.redhat-60024]
> {code}
> {code}
> <beans xmlns="http://www.springframework.org/schema/beans";
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>        xmlns:camel="http://camel.apache.org/schema/spring";
>        xsi:schemaLocation="
>        http://www.springframework.org/schema/beans
>           http://www.springframework.org/schema/beans/spring-beans.xsd
>        http://camel.apache.org/schema/spring
>           http://camel.apache.org/schema/spring/camel-spring.xsd";>
>     <bean id="activemq" 
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>         <property name="brokerURL" value="tcp://localhost:61616"/>
>     </bean>
>   <camel:sslContextParameters
>       id="sslContextParameters">
>     <camel:keyManagers
>         keyPassword="changeit">
>       <camel:keyStore
>           resource="jsse/websocket.jks"
>           password="changeit"/>
>     </camel:keyManagers>
>     <camel:trustManagers>
>       <camel:keyStore
>           resource="jsse/websocket.jks"
>           password="changeit"/>
>     </camel:trustManagers>
>   </camel:sslContextParameters>
>   <camelContext xmlns="http://camel.apache.org/schema/spring";>
>     <packageScan>
>       <package>com.fusesource.examples.camel.websocket.secure</package>
>     </packageScan>
>   </camelContext>
> ...
>            
> from("activemq:topic:newsTopic").routeId("fromJMStoWebSocketSecureNews")
>              .log(LoggingLevel.DEBUG, ">> News info received : ${body}")
>              .delay(5000)
>              .to("websocket://0.0.0.0:8443/newsTopic?sendToAll=true" +
>                      
> "&sslContextParametersRef=#sslContextParameters&staticResources=classpath:webapp");
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to