camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Moulliard (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-6433) Invalid KeyStore format error is generated using camel websocket secure on osgi platform
Date Thu, 06 Jun 2013 06:52:19 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-6433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Charles Moulliard updated CAMEL-6433:
-------------------------------------

    Attachment: Screen Shot 2013-06-06 at 08.49.09.png

When the resource is packaged into a bundle, this part of the code of JSSEParameters return
a FileNotFound Exception

{code}
    protected InputStream resolveResource(String resource) throws IOException {
        InputStream is = null;

        try {
            LOG.trace("Trying to open resource [{}] as a file.", resource);
            is = new FileInputStream(resource);
            LOG.debug("Opened resource [{}] as a file.", resource);
        } catch (FileNotFoundException e) {
            LOG.trace("Could not open resource [" + resource + "] as a file.", e);
        }
{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

Mime
View raw message