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

JBoss Issue Tracker | Martin Vecera | 6 years ago
  1. 0

    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.

    JBoss Issue Tracker | 6 years ago | Martin Vecera
    java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
  2. 0

    java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedTypes (security_saml QS deployed in CXF)

    https://bugzilla.redhat.com/bugzilla/ | 6 years ago | Martin Vecera
    java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
  3. 0

    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.

    JBoss Issue Tracker | 6 years ago | Martin Vecera
    java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

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

    Google Groups | 4 years ago | T.W.H
    java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
  6. 0

    Issue with neethi and WSO2 DStudio client stub

    Stack Overflow | 3 years ago | Jorge Infante Osorio
    java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

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

      at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperationsForProvider()
    2. Apache CXF Runtime JAX-WS Frontend
      JaxWsServiceFactoryBean.initializeWSDLOperations
      1. org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperationsForProvider(JaxWsServiceFactoryBean.java:264)
      2. org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:256)
      2 frames
    3. Apache CXF Core
      ReflectionServiceFactoryBean.create
      1. org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:424)
      2. org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:528)
      3. org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:278)
      3 frames
    4. Apache CXF Runtime JAX-WS Frontend
      JaxWsServiceFactoryBean.create
      1. org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:178)
      1 frame