camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim.Schwalbe" <tim.schwa...@mindbit.de>
Subject Keycloak Camel InvalidKeySpecException: encoded key spec not recognise
Date Thu, 09 Jul 2015 15:05:37 GMT
Hi guys,

iam trying to do authentifaction with keycloak 1.2.1Final and Camel 2.15.2.
It should run in ServiceMix 5.4.0. 

I Try to do with this tutorial:
https://github.com/keycloak/keycloak/tree/master/examples/fuse/camel

The Route starts with 

        <route id="httpBridge">
            <from uri="jetty:http://0.0.0.0:8182/upload"/>
            <process ref="helloProcessor"/>
            <log message="The message from camel endpoint contains
${body}"/>
        </route>

But i can open the address.


        <route id="httpBridge">
            <from
uri="jetty:http://0.0.0.0:8182/upload?handlers=sessionHandler&amp;matchOnUriPrefix=true"/>
            <process ref="helloProcessor"/>
            <log message="The message from camel endpoint contains
${body}"/>
        </route>

This code is liek the one in the example above, but then the following
exception raised.
I Hope anyone can help me with this issue.

Thanks and regards...



015-07-09 16:55:26,266 | ERROR | xtenderThread-70 | ContextLoaderListener           
| ?                                   ? | 122 -
org.springframework.osgi.extender - 1.2.1 | Application context refresh
failed (OsgiBundleXmlApplicationContext(bundle=de.camel-endpoint-example,
config=osgibundle:/META-INF/spring/*.xml))
org.apache.camel.RuntimeCamelException: java.lang.RuntimeException:
java.security.spec.InvalidKeySpecException: encoded key spec not recognised
        at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1619)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:123)[246:org.apache.camel.camel-spring:2.15.2]
        at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:332)[246:org.apache.camel.camel-spring:2.15.2]
        at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)[79:org.apache.servicemix.bundles.spring-context:3.2.11.RELEASE_1]
        at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)[79:org.apache.servicemix.bundles.spring-context:3.2.11.RELEASE_1]
        at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:950)[79:org.apache.servicemix.bundles.spring-context:3.2.11.RELEASE_1]
        at
org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)[121:org.springframework.osgi.core:1.2.1]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)[121:org.springframework.osgi.core:1.2.1]
        at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[121:org.springframework.osgi.core:1.2.1]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[121:org.springframework.osgi.core:1.2.1]
        at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[122:org.springframework.osgi.extender:1.2.1]
        at java.lang.Thread.run(Thread.java:745)[:1.7.0_55]
Caused by: java.lang.RuntimeException:
java.security.spec.InvalidKeySpecException: encoded key spec not recognised
        at
org.keycloak.adapters.KeycloakDeploymentBuilder.internalBuild(KeycloakDeploymentBuilder.java:43)[232:org.keycloak.keycloak-adapter-core:1.2.0.Final]
        at
org.keycloak.adapters.KeycloakDeploymentBuilder.build(KeycloakDeploymentBuilder.java:111)[232:org.keycloak.keycloak-adapter-core:1.2.0.Final]
        at
org.keycloak.adapters.jetty.core.AbstractKeycloakJettyAuthenticator.initializeKeycloak(AbstractKeycloakJettyAuthenticator.java:194)[236:org.keycloak.keycloak-jetty-core:1.2.0.Final]
        at
org.keycloak.adapters.jetty.core.AbstractKeycloakJettyAuthenticator.setConfiguration(AbstractKeycloakJettyAuthenticator.java:122)[236:org.keycloak.keycloak-jetty-core:1.2.0.Final]
        at
org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:377)[64:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at
org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:453)[64:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[64:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)[64:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at
org.eclipse.jetty.server.handler.ScopedHandler.doStart(ScopedHandler.java:115)[64:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at
org.eclipse.jetty.server.session.SessionHandler.doStart(SessionHandler.java:124)[64:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[64:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at
org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)[64:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at
org.eclipse.jetty.server.Server.doStart(Server.java:282)[64:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)[64:org.eclipse.jetty.aggregate.jetty-all-server:8.1.15.v20140411]
        at
org.apache.camel.component.jetty.JettyHttpComponent.connect(JettyHttpComponent.java:335)[260:org.apache.camel.camel-jetty-common:2.15.2]
        at
org.apache.camel.component.http.HttpEndpoint.connect(HttpEndpoint.java:178)[258:org.apache.camel.camel-http:2.15.2]
        at
org.apache.camel.component.http.HttpConsumer.doStart(HttpConsumer.java:53)[258:org.apache.camel.camel-http:2.15.2]
        at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2869)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:3163)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:3099)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3029)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2797)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2653)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2467)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2463)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2463)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2432)[244:org.apache.camel.camel-core:2.15.2]
        at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:255)[246:org.apache.camel.camel-spring:2.15.2]
        at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:121)[246:org.apache.camel.camel-spring:2.15.2]
        ... 10 more
Caused by: java.security.spec.InvalidKeySpecException: encoded key spec not
recognised
        at
org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi.engineGeneratePublic(Unknown
Source)[219:bcprov:1.50.0]
        at
org.bouncycastle.jcajce.provider.asymmetric.rsa.KeyFactorySpi.engineGeneratePublic(Unknown
Source)[219:bcprov:1.50.0]
        at
java.security.KeyFactory.generatePublic(KeyFactory.java:328)[:1.7.0_55]
        at
org.keycloak.util.DerUtils.decodePublicKey(DerUtils.java:49)[233:org.keycloak.keycloak-core:1.2.0.Final]
        at
org.keycloak.util.PemUtils.decodePublicKey(PemUtils.java:50)[233:org.keycloak.keycloak-core:1.2.0.Final]
        at
org.keycloak.adapters.KeycloakDeploymentBuilder.internalBuild(KeycloakDeploymentBuilder.java:41)[232:org.keycloak.keycloak-adapter-core:1.2.0.Final]
        ... 42 more





--
View this message in context: http://camel.465427.n5.nabble.com/Keycloak-Camel-InvalidKeySpecException-encoded-key-spec-not-recognise-tp5769058.html
Sent from the Camel Development mailing list archive at Nabble.com.

Mime
View raw message