Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Unknown
Description
When the following camel websocket secure route is deployed on karaf, we get this error
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]
<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");