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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.