Invalid name pattern - at enqueue call
The advanced queuing demo code throws this error when we try to use our own object...9i, JDev 9.03, classes12, runtime12, AQJMS. Our object was pulled using jpublisher. PL/SQL has no trouble queuing the object and it is valid.
Error text, code snippet and high level object definition follow...
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=localhost))(CONNECT_DATA=(SID=TI)))
All connected
DriverVersion: [9.2.0.1.0]
DriverMajorVersion: [9]
DriverMinorVersion: [2]
DriverName: [Oracle JDBC driver]
Successfully created AQSession
Successfully created tSuperObject in RTENGINE schema
Queue type created of : 0
Successfully created oSuperObject in Superobject
Successful start queue
Exception-1: oracle.AQ.AQOracleSQLException: invalid name pattern: RTENGINE.SUPEROBJECT_OBJTYP
oracle.AQ.AQOracleSQLException: invalid name pattern: RTENGINE.SUPEROBJECT_OBJTYP
byte[] oracle.AQ.AQOracleQueue.enqueue(oracle.AQ.AQEnqueueOption, oracle.AQ.AQMessage)
AQOracleQueue.java:1236
void aqorademo02.AQObjectPayloadTest(oracle.AQ.AQSession)
aqorademo02.java:308
void aqorademo02.main(java.lang.String[])
aqorademo02.java:101
Process exited with exit code 0.
code ---------
public static void AQObjectPayloadTest(AQSession aq_sess)
throws AQException, SQLException, ClassNotFoundException
{
Connection db_conn = null;
AQQueue queue = null;
AQMessage message = null;
AQObjectPayload payload = null;
AQEnqueueOption eq_option = null;
AQDequeueOption dq_option = null;
SuperobjectObjtyp message2 = null;
SuperobjectObjtyp so = new SuperobjectObjtyp();
db_conn = ((AQOracleSession)aq_sess).getDBConnection();
queue = aq_sess.getQueue("RTENGINE", "QSUPEROBJECT");
/* Enqueue a message in queue */
message = queue.createMessage();
try
{
so.setSid(Integer.valueOf("9"));
}
catch( SQLException e )
{
//could not connect, todo any custom error reporting required
System.out.println("SQL Execption");
e.printStackTrace();
}
try
{
payload = message.getObjectPayload();
}
catch( Exception e )
{
//could not connect, todo any custom error reporting required
System.out.println("SQL Get Object Payload Execption");
e.printStackTrace();
}
try
{
payload.setPayloadData(so);
}
catch( Exception e )
{
//could not connect, todo any custom error reporting required
System.out.println("SQL Set Payload Execption");
e.printStackTrace();
}
long startT = System.currentTimeMillis();
int i =0;
while(i<100)
{
if (i==1)
{
startT = System.currentTimeMillis();
}
eq_option = new AQEnqueueOption();
/* Enqueue a message into queue */
queue.enqueue(eq_option, message);
db_conn.commit();
i = i+1;
}
object .sqlj file -------------
public class SuperobjectObjtyp implements ORAData, ORADataFactory
{
public static final String SQLNAME = "RTENGINE.SUPEROBJECT_OBJTYP";
public static final int SQLTYPECODE = OracleTypes.STRUCT;