Eamonn,

Thanks, I completely missed that wasn't a CXF class.  A little rooting
in the matlab classpath found the ice.* stuff and removing it solved the
problem.  I have to figure out what that's in there, but I know the
problem now!

More help than you expected!

Thanks!
Nate
  


-----Original Message-----
From: Eamonn Dwyer [mailto:[email protected]] 
Sent: Wednesday, July 15, 2009 11:21 AM
To: [email protected]
Subject: RE: WSS with SSL configuration problem ClassCastException in
decorateWithTLS


Hi Nate
it looks like Matlab is using ice.https.HttpsURLConnection - it could be
that this class is not an instance of Sun's HttpsURLConnection class. My
guess is that when you run it outside of Matlab you are using the jdk's
HttpsURLConnection class and that's why it works outside Matlab. I've no
idea what the  ice.https.HttpsURLConnection class is - I tried
google'ing it for its API and couldn't find anything to help.

Maybe you could check to see if Matlab is using
ice.https.HttpsURLConnection and if there is a way to get Matlab to use
the JDK's HttpsURLConnection instead?

Not much help I'm afraid. 

regards
Eamonn





> Subject: WSS with SSL configuration problem ClassCastException in
decorateWithTLS
> Date: Wed, 15 Jul 2009 10:49:24 -0400
> From: [email protected]
> To: [email protected]
> 
> 
> Hello,
> 
> I should probably first admit I'm trying to do something stupid, I
have written a CXF client to a WSS (username token) web service, which I
have packaged up into a jar to enable use of the service from Matlab.
Thanks to previous help, the client appears to work fine except when I
try to call the functionality from inside Matlab, where I get a
ClassCastException when the SSL socket is being created.  I know this
isn't really a CXF issue, but I'm hoping someone can diagnose the error
to point me where the configuration is broken.  The same code works fine
from outside matlab, so it seems like this must be a configuration
problem of some kind. The problem only appears when using WSS, a client
to a non-WSS service using the same platform works fine.
> 
> Info: CXF-2.2.3 snapshot, Java 1.6.0_04-b12
> 
> The client does claim to find cxf.xml, I packaged this in the root of
the jar, is this appropriate? 
> [INFO] ControlledValidationXmlBeanDefinitionReader - Loading XML bean
definitions from class path resource [cxf.xml]
> 
> The logging from the service call and stack trace are provided below.

> 
> Thanks in advance,
> Nate
> 
> 
> The stack trace follows below:
> Jul 15, 2009 10:17:15 AM org.apache.cxf.transport.https.SSLUtils
getCiphersuites
> INFO: The cipher suites have not been configured, falling back to
cipher suite filters.
> Jul 15, 2009 10:17:15 AM org.apache.cxf.transport.https.SSLUtils
getCiphersuites
> INFO: The cipher suite filters have not been configured, falling back
to default filters.
> Jul 15, 2009 10:17:15 AM org.apache.cxf.transport.https.SSLUtils
getCiphersFromList
> INFO: The cipher suites have been set to SSL_RSA_WITH_RC4_128_MD5,
SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA,
TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA,
SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA,
SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA,
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA, TLS_KRB5_WITH_RC4_128_SHA,
TLS_KRB5_WITH_RC4_128_MD5, TLS_KRB5_WITH_3DES_EDE_CBC_SHA,
TLS_KRB5_WITH_3DES_EDE_CBC_MD5, TLS_KRB5_WITH_DES_CBC_SHA,
TLS_KRB5_WITH_DES_CBC_MD5, TLS_KRB5_EXPORT_WITH_RC4_40_SHA,
TLS_KRB5_EXPORT_WITH_RC4_40_MD5, TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA,
TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5.  
> Jul 15, 2009 10:17:15 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
>       at
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag
eSenderInterceptor.java:48)
>       at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:236)
>       at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
>       at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
>       at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
>       at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>       at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
>       at $Proxy44.createActivity(Unknown Source)
>       at
edu.cornell.cac.tuc.matlab.JSDLMediator.jobStart(JSDLMediator.java:97)
> Caused by: javax.imageio.IIOException: Error while initializing secure
socket
>       at
org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnectio
n(HttpsURLConnectionFactory.java:148)
>       at
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:497)
>       at
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag
eSenderInterceptor.java:46)
>       ... 8 more
> Caused by: java.lang.IllegalArgumentException: Error decorating
connection class ice.https.HttpsURLConnection
>       at
org.apache.cxf.transport.https.HttpsURLConnectionFactory.decorateWithTLS
(HttpsURLConnectionFactory.java:255)
>       at
org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnectio
n(HttpsURLConnectionFactory.java:140)
>       ... 10 more
> Caused by: java.lang.ClassCastException
>       at java.lang.Class.cast(Unknown Source)
>       at
org.apache.cxf.transport.https.HttpsURLConnectionFactory.decorateWithTLS
(HttpsURLConnectionFactory.java:250)
>       ... 11 more
> javax.xml.ws.soap.SOAPFaultException: Could not send Message.
>       at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141)
>       at $Proxy44.createActivity(Unknown Source)
>       at
edu.cornell.cac.tuc.matlab.JSDLMediator.jobStart(JSDLMediator.java:97)
> Caused by: javax.imageio.IIOException: Error while initializing secure
socket
>       at
org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnectio
n(HttpsURLConnectionFactory.java:148)
>       at
org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:497)
>       at
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(Messag
eSenderInterceptor.java:46)
>       at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:236)
>       at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
>       at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
>       at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
>       at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>       at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
>       ... 2 more
> Caused by: java.lang.IllegalArgumentException: Error decorating
connection class ice.https.HttpsURLConnection
>       at
org.apache.cxf.transport.https.HttpsURLConnectionFactory.decorateWithTLS
(HttpsURLConnectionFactory.java:255)
>       at
org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnectio
n(HttpsURLConnectionFactory.java:140)
>       ... 10 more
> Caused by: java.lang.ClassCastException
>       at java.lang.Class.cast(Unknown Source)
>       at
org.apache.cxf.transport.https.HttpsURLConnectionFactory.decorateWithTLS
(HttpsURLConnectionFactory.java:250)
>       ... 11 more

_________________________________________________________________
See all the ways you can stay connected to friends and family
http://www.microsoft.com/windows/windowslive/default.aspx

Reply via email to