Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-3800

java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.reflect.TypeVariable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 7.0.0.ER6
    • Web Services
    • None

      This is an EAP 7 reference for https://bugzilla.redhat.com/show_bug.cgi?id=1312501

      Deploying test web service gives on JBoss startup:
      Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.reflect.TypeVariable
      at org.apache.cxf.jaxb.JAXBContextInitializer.addType(JAXBContextInitializer.java:251)

      Generated web service class has the following element which has issues with the JAXB binding:

      @XmlElementRefs(

      { @XmlElementRef(name = "Salutation", namespace = "http://ws.gss.redhat.com/", type = JAXBElement. @XmlElementRef(name = "Name", namespace = "http://ws.gss.redhat.com/", type = JAXBElement.class) }

      )
      protected JAXBElement<String> [] salutationAndName;

      Web service was generated from WSDL with <jaxb:globalBindings collectionType="indexed" /> and the following schema:

      <xs:complexType name="Greetings">
      <xs:sequence maxOccurs="unbounded">
      <xs:element name="Salutation" type="xsd:string"/>
      <xs:element name="Name" type="xsd:string"/>
      </xs:sequence>
      </xs:complexType>

      issue was fixed in apache upstream, need a cxf upgrade for later EAP 7

      https://issues.apache.org/jira/browse/CXF-6799
      https://github.com/apache/cxf/pull/114

              rhn-support-asoldano Alessio Soldano
              chaowan@redhat.com Chao Wang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: