Unable to unwrap OracleConnection from JBoss WrappedConnectionJDK6

Description

Marking this as a GeoServer issue (even though the error occurs at the GeoTools level). GeoServer should be in position to donate a UnWrapper for use in OracleDialect:

UnWrapper unwrapper = DataSourceFinder.getUnWrapper(cx);

And since this is a Tomcat deployment issue it is probably GeoServer's job to do (or Spring's job to do).

Previous email discussion shows this as a recurring problem:

Advice in that thread is to upgrade to the latest version of Spring in the hopes the Spring project has implemented an appropriate unwrapped for each application container.

Notes:

  • The implementation of Spring <b>JBossNativeJdbcExtractor</b> is provided by spring-jdbc-3.1.4.RELEASE.jar for the 2.4.x series.

I am tempted to do two things to address this issue:

1. Attempt to unwrap a connection during the initial datastore construction, as it is confusing for users when everything works up until the point we access an index or work with Geometry. We should instead fail early during configuration - rather than list layers and pretend to work.

2. Use reflection as a fallback to hunt through the provided Connection for an appropriate native OracleConnection. If I take this approach I will like add it to the GeoTools OracleDialect as a fallback position in the even the provided UnWrappers fail.

Environment

None

Status

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

Affects versions

2.4.7

Components

Priority

Medium
Configure