Thursday, September 26, 2013

JBO-27122 and 'Closed Statement' Errors when Running ADF 11g App:ADF Error

Using ADF Application:
We might have get these errors :

java.sql.SQLException: Result set already closed
at weblogic.jdbc.wrapper.ResultSet.checkResultSet(ResultSet.java:110)
at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:65)
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getBytes(Unknown Source)
at oracle.jbo.domain.Number$1facClass.createDatum(Number.java:107)
at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1308)
at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:2331)
at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:3622)

or

java.sql.SQLException: Closed Statement
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:445)
at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:3616)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3369)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3430)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:128)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:1112)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:842)


Cause:

ADF Web applications cannot work with an XA datasource 

(XA Datasources close all their cursors at commit)

SOLUTION:

Do not use XA Datasources with ADF. So when creating a datasource in the WebLogic server make sure to change the Datasource JDBC driver from “Oracle’s Driver (Thin XA)” to “Oracle’s Driver (Thin)”.

No comments:

Post a Comment