Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> oracle.AQ.AQOracleSQLException: ORA-21700: objekt findes ikke eller er markeret til sletning

oracle.AQ.AQOracleSQLException: ORA-21700: objekt findes ikke eller er markeret til sletning

From: languy <languy_at_online.stofanet.dk>
Date: Tue, 11 Jan 2005 15:20:36 +0100
Message-ID: <41e3e0b5$0$22702$d40e179e@nntp04.dk.telia.net>


Hey There,

I'm trying to post a message to the queue. To post a message to an advanced queue, the message should implement the SQLData interface. The implementation of this interface has been done in the following way:

  private String sqlType;
  private String userData;

  protected XmlData() { };

  public XmlData (String sql_type, String xml)   {
    this.sqlType = sql_type;
    this.userData = xml;
  }

  public String getSQLTypeName() throws SQLException   {
    return this.sqlType;
  }

  public void readSQL(SQLInput stream, String typeName) throws SQLException   {
    this.sqlType = typeName;
    this.userData = stream.readString();   }

  public void writeSQL(SQLOutput stream) throws SQLException   {
    stream.writeString(this.userData);
  }
}
-- snip --

The table looks in the following way:

Using the above by adding a message to the queue is done like this:

Class.forName("oracle.jdbc.pool.OracleConnectionCacheImpl").newInstance();

      conn =
DriverManager.getConnection("jdbc:oracle:thin:@host:1521:sid","user","pass") ;

      conn.setAutoCommit(false);

      /* Java types to Oracle UDT mapping */
      Map map = conn.getTypeMap();
      map.put(XmlData.SQL_TYPE , Class.forName("package.XmlData"));

      stmt = conn.createStatement();

      Class.forName("oracle.AQ.AQOracleDriver").newInstance();
      aqSession = AQDriverManager.createAQSession(conn);
      queue =
aqSession.getQueue(Util.getResourceString("xxx","PA_QUEUE_USER"),
                                                    /*queue name*/
XmlData.SQL_TYPE );
       /* fetch message data from another source */
       // 'handle' holds a collection of all messages to be sent

      // the xml is ready, so put it on the queue
      while (null != (xml = handle.getXml())) {
        message = queue.createMessage();
        payload = message.getObjectPayload();
        payload.setPayloadData(new XmlData(XmlData.SQL_TYPE, xml));
        eq_option = new AQEnqueueOption();
        queue.enqueue(eq_option, message);   // FAILS
        conn.commit();
      }

-- snip --

The enqueue method gives the following error:

 byte[] oracle.AQ.AQOracleQueue.enqueue(oracle.AQ.AQEnqueueOption, oracle.AQ.AQMessage)
  AQOracleQueue.java:1236
-- snip --

I hope someone can help me with this problem as soon as possible.

Thanks in regards,
Jess Received on Tue Jan 11 2005 - 08:20:36 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US