Sunday, September 18, 2011

oracle.jbo.NotConnectedException: JBO-25200 While using View Criteria

This error "which i think its a bug in JDeveloper 11g Release 2", appeared while building view criteria with bind variable inside the SQL query using read-only view.

While developing a view object based on SQL query I add a where condition in which it select a specific employee information as an example " (where empno=:empno) " from details table in which it will return multiple records, then I wanted to build a view criteria on this view object to filter the result based on another attribute.

So while the page begins loading, it throws the following exception:

oracle.jbo.NotConnectedException: JBO-25200:.
at oracle.jbo.server.DBTransactionImpl.checkConnected(
at oracle.jbo.server.DBTransactionImpl2.createPreparedStatement(

And the application stops working since the connection to the database is lost.

The error message is not clear to what is happening inside the application flow, and it does not provide enough information about the actual error. But eventually and after building the project from scratch, I discovered that the bind variable used inside the SQL query as discussed before, should be set to HIDE value under control hints.

Finally got it to work... :)