Thursday, 13 September 2007

ORA-00904 From getFunctionColumns Method Of The Interface DatabaseMetaData

When using the following code with the 11g JDBC driver against a 10.2.0.1 database the following error occurs.

Code:

DatabaseMetaData mdata = conn.getMetaData();
...
rset = mdata.getFunctionColumns(null, null, "ADDTWONUMBERS", "N1");
..

Runtime error:

Exception in thread "main" java.sql.SQLSyntaxErrorException: ORA-00904: "PROC"."OBJECT_ID":
invalid identifier
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)


It turns out then when using the latest 10g database patch set 10.2.0.3 this works fine so it seems this was a database bug / issue fixed in 10.2.0.3. I think it's always best to be on the latest database patch set if possible.

No comments: