You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Mujahed Syed (JIRA)" <ji...@apache.org> on 2016/04/20 17:03:25 UTC
[jira] [Updated] (CAMEL-9893) Camel Jetty SSL ClassCastException
for SSLContextParametersFactoryBean
[ https://issues.apache.org/jira/browse/CAMEL-9893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mujahed Syed updated CAMEL-9893:
--------------------------------
Attachment: core.log
> Camel Jetty SSL ClassCastException for SSLContextParametersFactoryBean
> ----------------------------------------------------------------------
>
> Key: CAMEL-9893
> URL: https://issues.apache.org/jira/browse/CAMEL-9893
> Project: Camel
> Issue Type: Bug
> Components: camel-jetty
> Affects Versions: 2.17.0
> Environment: Mac OS / DEV
> Reporter: Mujahed Syed
> Attachments: core.log
>
>
> Hi Team,
> I am trying to create Jetty configuration with SSL. Here is my configuration:
> {code}
> @Bean(name = "jetty")
> public JettyHttpComponent jetty(CamelContext camelContext){
> JettyHttpComponent jettyComponent = camelContext.getComponent("jetty", JettyHttpComponent.class);
> jettyComponent.setSslContextParameters(sslContextParameters());
> return jettyComponent;
> }
> @Bean(name = "sslContextParameters")
> public SSLContextParameters sslContextParameters(){
> KeyStoreParameters ksp = new KeyStoreParameters();
> ksp.setResource(KEYSTORE);
> ksp.setPassword(KEYSTORE_PASSWORD);
> KeyManagersParameters kmp = new KeyManagersParameters();
> kmp.setKeyPassword(KEYSTORE_PASSWORD);
> kmp.setKeyStore(ksp);
> TrustManagersParameters tmp = new TrustManagersParameters();
> tmp.setKeyStore(ksp);
> SSLContextParameters sslContextParameters = new SSLContextParameters();
> sslContextParameters.setKeyManagers(kmp);
> sslContextParameters.setTrustManagers(tmp);
> return sslContextParameters;
> }
> {code}
> If I load this configuration I get exception stating that:
> Caused by: java.lang.ClassCastException: org.apache.camel.util.spring.SSLContextParametersFactoryBean$$EnhancerBySpringCGLIB$$57d06d22 cannot be cast to org.apache.camel.util.jsse.SSLContextParameters
> at com.tescobank.wallet.config.DevConfiguration$$EnhancerBySpringCGLIB$$1bb53ad4.sslContextParameters(<generated>)
> at com.tescobank.wallet.config.DevConfiguration.jetty(DevConfiguration.java:45)
> at com.tescobank.wallet.config.DevConfiguration$$EnhancerBySpringCGLIB$$1bb53ad4.CGLIB$jetty$0(<generated>)
> at com.tescobank.wallet.config.DevConfiguration$$EnhancerBySpringCGLIB$$1bb53ad4$$FastClassBySpringCGLIB$$a8257ab2.invoke(<generated>)
> at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
> at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:355)
> at com.tescobank.wallet.config.DevConfiguration$$EnhancerBySpringCGLIB$$1bb53ad4.jetty(<generated>)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
> ... 62 more
> This looks like a bug to me, I have attached complete log file.
> Please let me know if you can point me to some direction.
> Thank you,
> Mujahed
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)