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 database the following error occurs.


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(
at oracle.jdbc.driver.DatabaseError.newSQLException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(

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

No comments: