Bug 780361 (SOA-2770)
Summary: | java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedTypes (security_saml QS deployed in CXF) | ||||||
---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Enterprise SOA Platform 5 | Reporter: | Martin Vecera <mvecera> | ||||
Component: | JBossESB, Security, Examples | Assignee: | Kevin Conner <kevin.conner> | ||||
Status: | CLOSED NEXTRELEASE | QA Contact: | |||||
Severity: | urgent | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 5.1.0.ER6 | CC: | kevin.conner, mvecera | ||||
Target Milestone: | --- | Keywords: | Regression, TestBlocker | ||||
Target Release: | 5.1.0.ER8 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
URL: | http://jira.jboss.org/jira/browse/SOA-2770 | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: |
production config., CXF installed
|
|||||
Last Closed: | 2011-03-08 02:30:48 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Martin Vecera
2011-01-13 17:12:16 UTC
Affects Testing: Removed: [Regression] Added: [Regression, Blocks Testing] On which machine? How is it being deployed? I have just started ER6 and seen a different error java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperationsForProvider(JaxWsServiceFactoryBean.java:264) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:256) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:424) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:528) at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:278) at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:178) Yes, this is the first exception during deployment. Ignore this and try running the example with ant runtest and the other shows up. I suspect that the first exception (ClassCastException) is the issue and the second (FileNotFoundException) a consequence of the first failure to parse the WSDL. Sounds like an issue with CXF integration though, will do some investigation. The CXF codebase assumes that the service class (PicketLinkSTS) implements a parameterized interface, presumably javax.xml.ws.Provider. Unfortunately PicketLinkSTS does not implement this directly, rather it is referenced indirectly through SecurityTokenService. Will add a workaround for this specific deployment. Please send me that workaround when you have it. I need to fix our tests as well and it would be great to have it before another build. Thanks. It looks like these may be separate issues with the CXF integration working around the first one leads to the following on the console - java.lang.ClassNotFoundException: org.jboss.soa.esb.picketlink.PicketLinkSTS This would suggest that this code is not using the context classloader associated with the war to locate the class/resource. Will investigate further. Turned out to be a typo in the build.xml, class was found on deployment but not when runtest was executed subsequently. Update to quickstart to fix picketlink-sts.war Attachment: Added: security_saml.zip Workaround Description: Added: Subclass webservice implementation and specify interfaces/annotations directly. e.g. for PicketLinkSTS you would create the following and specify it as the servlet in web.xml @WebServiceProvider(serviceName="PicketLinkSTS", portName="PicketLinkSTSPort", targetNamespace="urn:picketlink:identity-federation:sts", wsdlLocation="WEB-INF/wsdl/PicketLinkSTS.wsdl") @ServiceMode(value=Service.Mode.PAYLOAD) public class PicketLinkSTS extends org.picketlink.identity.federation.core.wstrust.PicketLinkSTS implements Provider<Source> { } Link: Added: This issue depends JBESB-3560 Updated in ESB codebase, will be in next merge. Verified with 5.1.0 ER8 Release Notes Docs Status: Added: Not Required Temporarily reopening to update release note info. Release Notes Docs Status: Removed: Not Required Added: Documented as Resolved Issue Writer: Added: dlesage Release Notes Text: Added: https://issues.jboss.org/browse/SOA-2770 A java.lang.ClassCastException occurred if the user deployed the security_saml quick start with CXF enabled. This was caused by an error in a build file which lead to the class being found on deployment but not on the subsequent run test. To fix this problem, the picketlink-sts.war file has been updated in the quick start. As a result, the exception no longer occurs. |