Class 'instanceof' fails for org.jboss.jca.adapters.jdbc.jdk6.WrappedResultSetJDK6 in EAP 6

Solution Verified - Updated -

Issue

  • A result set retrieved from a query execution cannot be accessed as a WrappedResultSetJDK6
  • The class name is reported correctly, but instanceof fails to match the class
    java.sql.ResultSet results = statement.executeQuery();
    System.out.println(results.getClass().getName()); // displays org.jboss.jca.adapters.jdbc.jdk6.WrappedResultSetJDK6
    if (results instanceof org.jboss.jca.adapters.jdbc.jdk6.WrappedResultSetJDK6) {
        ... // execution never enters this code block
    }

Environment

  • Red Hat JBoss Enterprise Application Platform (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