Using two resource adaptors with the same class names in one application fails with a ClassCastException

Solution Verified - Updated -

Issue

  • Using two resource adaptors with the same class names in one application gives a ClassCastException error:

    15:33:23,611 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/MyAppContext].[DisplayRAServlet]] (http-/127.0.0.1:8080-1) JBWEB000236: Servlet.service() for servlet DisplayRAServlet threw exception: java.lang.ClassCastException: my.resourceadpter.connectionspec cannot be cast to my.resourceadpter.connectionspec
    

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.3.0
    • 6.4.x

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