Java Application Fails with $Proxy Cannot Be Cast To Oracle.sql.StructDescriptor When Using UCP and Application Continuity

(Doc ID 2339948.1)

Last updated on DECEMBER 18, 2017

Applies to:

JDBC - Version 12.2.0.0.0 and later
Universal Connection Pool - Version 12.1.0.2.0 and later
Information in this document applies to any platform.

Symptoms

Java application using JDBC 12.2 fails with $Proxy cannot be cast to oracle.sql.StructDescriptor .
The application uses UCP and Application Continuity. It fails when it tries to put a message into a queue.

Running orachk, this report shows concrete classes from aqapi.jar.



STEPS
-----------------------
The issue can be reproduced at will when running java application that puts a message into a queue.

public static void main(String[] args)
  {
AQjmsOracleDebug.setTraceLevel(6);
  AQjmsQueueConnectionFactory fact = new AQjmsQueueConnectionFactory();
  try {
fact.setDatasource(failsDataSource());

  QueueConnectionFactory qfact = fact;

  QueueConnection qcon = qfact.createQueueConnection();
  QueueSession qsess = qcon.createQueueSession(false, Session.DUPS_OK_ACKNOWLEDGE);
  Queue queue = ((AQjmsSession) qsess).getQueue("AQADMIN", "xxxxx");
  QueueSender sender = qsess.createSender(queue);
  TextMessage tm = ((AQjmsSession) qsess).createTextMessage("Hello, Oracle JMS");
  sender.send(tm);
}


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms