java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • There is an exception while deploying secuirty_saml QS with CXF enabled: 17:59:16,231 ERROR [[/picketlink-sts]] StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'PicketLinkSTS': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) ... While trying to run the example, there is another exception being thrown: 17:59:45,470 ERROR [[/picketlink-sts]] StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'PicketLinkSTS': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) ... Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'WEB-INF/wsdl/PicketLinkSTS.wsdl'.: java.io.FileNotFoundException: /qa/home/mvecera/work/soa/510ER6.cxf/jboss-as/bin/WEB-INF/wsdl/PicketLinkSTS.wsdl at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2111) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2303) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2335) at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:232) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:179) at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:91) ... 53 more Caused by: java.io.FileNotFoundException: /qa/home/mvecera/work/soa/510ER6.cxf/jboss-as/bin/WEB-INF/wsdl/PicketLinkSTS.wsdl at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:105) at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:112) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2101) ... 58 more It seems like CXF is trying to locate the WSDL file in a wrong place. The same problem is in our integration test suite making this test unable to verify correct SAML operation.
    via by Martin Vecera,
  • There is an exception while deploying secuirty_saml QS with CXF enabled: 17:59:16,231 ERROR [[/picketlink-sts]] StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'PicketLinkSTS': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) ... While trying to run the example, there is another exception being thrown: 17:59:45,470 ERROR [[/picketlink-sts]] StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'PicketLinkSTS': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) ... Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing 'WEB-INF/wsdl/PicketLinkSTS.wsdl'.: java.io.FileNotFoundException: /qa/home/mvecera/work/soa/510ER6.cxf/jboss-as/bin/WEB-INF/wsdl/PicketLinkSTS.wsdl at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2111) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2303) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:2335) at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:232) at org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:179) at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:91) ... 53 more Caused by: java.io.FileNotFoundException: /qa/home/mvecera/work/soa/510ER6.cxf/jboss-as/bin/WEB-INF/wsdl/PicketLinkSTS.wsdl at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:105) at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:112) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(WSDLReaderImpl.java:2101) ... 58 more It seems like CXF is trying to locate the WSDL file in a wrong place. The same problem is in our integration test suite making this test unable to verify correct SAML operation.
    via by Martin Vecera,
    • 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)
    No Bugmate found.