Object Types & JDeveloper

From: Axel Seinsche <axel.seinsche_at_seinsche.net>
Date: Wed, 12 Feb 2003 11:13:58 +0100
Message-ID: <b2d6oh$hdo$06$1_at_news.t-online.com>



  Hi all,

I want to insert a row which contains an oracle object type. A domain was created by the wizzard for that type. Now I wanted to use the setXXX method to set the values for that type.

But when I try to insert that row a oracle.jbo.DMLException is thrown.

[stacktrace]

oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement " INSERT INTO FREQUENZ(PK_FREQUENZ,ERSTMALS,STATUS,F_M_B) VALUES (:1,:2,:3,:4)". at
oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:462) at oracle.jbo.server.EntityImpl.doDMLWithLOBs(EntityImpl.java:4351) at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:4286) at de.innosystec.kforiia.bc4j.FrequenzImpl.doDML(FrequenzImpl.java:388) ...
[/stacktrace]

It's bad I can't see the "real" insert statement without bind variables.

There is also thrown a java.sql.Exception which tells me that my datatypes are inconsistent.

[stacktrace]

## Detail 0 ##
java.sql.SQLException: ORA-00932: inconsistent datatypes

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2321)
at oracle.jdbc.oci8.OCIDBAccess.executeFetch(OCIDBAccess.java:1741)
...
[/stacktrace]

My Code looks like this:

FMBType fmbObject = null;
newVO.first();

Row newRow = newVO.createRow();
FrequenzViewRowImpl castFreq = (FrequenzViewRowImpl) newRow;

try {
  fmbObject = new FMBType();

  fmbObject.setFrequenz(new Number(120000000));
  fmbObject.setModulation(new String("FM"));
  fmbObject.setBandbreite(new Number(1500));
} catch (SQLException exc) {
  System.out.println("SQLException: " + exc); }
  castFreq.setFMB(fmbObject);
  castFreq.setStatus("J");
  castFreq.setErstmals(new Date(new java.sql.Date(new 
java.util.Date().getTime())));

  newVO.insertRow(castFreq);
  appModule.getTransaction().commit();

My object type in the database contains a Number(13,0), a VARCHAR2(10) and a Number(10,0). In my opinion everything should be fine. Any ideas about that?

Thanks
Axel Received on Wed Feb 12 2003 - 11:13:58 CET

Original text of this message