Web service is throwing ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.reflect.TypeVariable

Solution Verified - Updated -

Issue

  • Getting java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl cannot be cast to java.lang.reflect.TypeVariable
  • Application is experiencing same error as described in CXF-6799 or CXF-5994
  • web service using indexed collectionTypes with generic types (i.e. JAXBElement [] example) throw a ClassCastException

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 6
  • a web service client or provider using CXF (i.e. default JAX-WS implementation in EAP 6)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content