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 and later
Universal Connection Pool - Version and later
Information in this document applies to any platform.


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.

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

public static void main(String[] args)
  AQjmsQueueConnectionFactory fact = new AQjmsQueueConnectionFactory();
  try {

  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");


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