Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Logical handle no longer valid

pf399212obSep 19 2005 — edited Oct 4 2005
We have been seeing this error and I am unable to determine the solution. I have using WebSphere 4.xxx and just upgraded to Oracle 10g. We get a connection from the App Servers pool, unwrap it so we can get access to the OracleConnection class and use it for some spatial queries. Upon completion we close the statement and the original Connection obtained from the pool. Below is some sample code. Does anyone have any insight on this issue? Thanks in advanced.

try {
conn = getConnection(Connection.TRANSACTION_SERIALIZABLE);
OracleConnection oracleConnection = unwrapOracleConnection(conn);
geometry = JGeometry.createLinearPolygon(buildOrdinates(area), GEOMETRY_2D, DEFAULT_SRID);
STRUCT struct = JGeometry.store(geometry, oracleConnection);
statement = oracleConnection.prepareStatement(query);
statement.setBigDecimal(AREA_INDEX, area.getAreaId());
statement.setString(NAME_INDEX, area.getAreaName());
statement.setString(SIC_INDEX, area.getSic());
statement.setObject(SHAPE_INDEX, struct);
statement.setString(DESCRIPTION_INDEX, area.getDescription());
statement.setString(UID_INDEX, userId);
statement.execute();
} finally {
try {
if (statement != null) {
statement.close();
statement = null;
}
} catch (SQLException __e) {
logger.warn(__e.getMessage(), __e);
}
try {
if (conn != null) {
conn.close();
conn = null;
}
} catch (SQLException __e) {
logger.warn(__e.getMessage(), __e);
}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2005
Added on Sep 19 2005
4 comments
2,881 views