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 FEBRUARY 27, 2025
Applies to:
JDBC - Version 12.2.0.0.0 and laterUniversal 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("<USER>", "NAME>");
QueueSender sender = qsess.createSender(queue);
TextMessage tm = ((AQjmsSession) qsess).createTextMessage("Hello, Oracle JMS");
sender.send(tm);
}
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |