cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Schroedl (JIRA)" <>
Subject [jira] Commented: (CXF-1459) ClassCastException occurs on HTTPS web service call made by app deployed to BEA WebLogic 9.2
Date Sat, 08 Nov 2008 02:28:44 GMT


Tom Schroedl commented on CXF-1459:

I haven't encountered any other issues. However, on my next project, the same issue came up.
This time it was in a Java 6 application. The app was using CXF for making web service connections
to external services that required client PKI authentication, and the app was also using Tibco
Java client libraries for JMS over SSL. I discovered the root of the problem was the Tibco
libs were setting the following Java system property:

This was ultimately causing my CXF web service client to throw a class cast exception when
it attempted to make a secure connection. Let me explain why this occurs..

The java.protocol.handler.pkgs system property is a list of package name prefixes used by
Java to resolve protocol names into actual handler class names. As of v1.4, JSSE has been
integrated into the J2SDK. Thus, the classes formerly in have been promoted
to the package and are now a part of the standard JSSE API.

For compatibility purposes the classes and interfaces still exist, but have
been deprecated. Applications written using them can run in the J2SDK v1.4 and later without
being recompiled. **Thus, setting the system property causes Java to use the deprecated implementation.**

The problem with CXF comes in because it assumes the newer handler package structure when
it attempts to decorate the underlying connection with your TLSClientParameters.

I was not able to get past the Tibco library setting this property no matter what I did, so
I decided to modify the CXF source, which worked. The workaround involved checking the type
of the https url connection. It only handles the case, but could easily be
enhanced to check for and handle the WebLogic ( case.

Sorry if this was a lot, hopefully will be of help to someone.

> ClassCastException occurs on HTTPS web service call made by app deployed to BEA WebLogic
> --------------------------------------------------------------------------------------------
>                 Key: CXF-1459
>                 URL:
>             Project: CXF
>          Issue Type: Improvement
>    Affects Versions: 2.0.4
>            Reporter: Tom Schroedl
> HTTPS web service call fails from webapp deployed in ear file to BEA 9.2 with following
> java.lang.ClassCastException:
>    at org.apache.cxf.transport.https.HttpsURLConnectionFactory.createConnection(
> My weblogic-application.xml contains:
> <prefer-application-packages>
>    <package-name>javax.jws.*</package-name>
> </prefer-application-packages>
> The secure web service call works in Tomcat 5.5.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message