I’m getting a strange error when trying to connect to an Oracle DB using JNDI inside a JBOSS-EAP server.
2013-11-25 13:33:54,046 DEBUG [org.geotools.factory] - Factory implementations for category UnWrapper:
org.geoserver.data.jdbc.SpringUnWrapper
org.geotools.data.jdbc.datasource.DBCPUnWrapper
org.geotools.jdbc.LifecycleConnectionUnWrapper
2013-11-25 13:33:54,054 WARN [org.geotools.jdbc] - Failed to use SDO_TUNE.EXTENT_OF, falling back on envelope aggregation
java.sql.SQLException: Could not obtain native oracle connection for class org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6
at org.geotools.data.oracle.OracleDialect.unwrapConnection(OracleDialect.java:565)
at org.geotools.data.oracle.OracleDialect.readGeometry(OracleDialect.java:502)
at org.geotools.data.oracle.OracleDialect.readGeometry(OracleDialect.java:492)
at org.geotools.data.oracle.OracleDialect.getOptimizedBounds(OracleDialect.java:754)
at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1141)
at org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:501)
at org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java:189)
The rest of the log is attached.
Interestingly the connection works fine if I use the normal Oracle Datastore (with the same jar - which is an updated version for 11.2 rather than the one that ships with GeoServer).
Has anyone seen anything similar or got any hints as to how I can go about debugging further?
cheers
Ian
–
Ian Turton
ian.txt (14.4 KB)
On Mon, Nov 25, 2013 at 2:58 PM, Ian Turton <ijturton@anonymised.com> wrote:
I'm getting a strange error when trying to connect to an Oracle DB using
JNDI inside a JBOSS-EAP server.
2013-11-25 13:33:54,046 DEBUG [org.geotools.factory] - Factory
implementations for category UnWrapper:
org.geoserver.data.jdbc.SpringUnWrapper
org.geotools.data.jdbc.datasource.DBCPUnWrapper
org.geotools.jdbc.LifecycleConnectionUnWrapper
2013-11-25 13:33:54,054 WARN [org.geotools.jdbc] - Failed to use
SDO_TUNE.EXTENT_OF, falling back on envelope aggregation
java.sql.SQLException: Could not obtain native oracle connection for class
org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6
at
org.geotools.data.oracle.OracleDialect.unwrapConnection(OracleDialect.java:565)
at
org.geotools.data.oracle.OracleDialect.readGeometry(OracleDialect.java:502)
at
org.geotools.data.oracle.OracleDialect.readGeometry(OracleDialect.java:492)
at
org.geotools.data.oracle.OracleDialect.getOptimizedBounds(OracleDialect.java:754)
at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1141)
at
org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:501)
at
org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java:189)
The rest of the log is attached.
Interestingly the connection works fine if I use the normal Oracle
Datastore (with the same jar - which is an updated version for 11.2 rather
than the one that ships with GeoServer).
Has anyone seen anything similar or got any hints as to how I can go about
debugging further?
In order to read Oracle geometries we need to original Oracle connection.
All connection pools wrap the native connections with some pooling wrapper,
and we have a list
of objects implementing org.geotools.data.jdbc.datasource.UnWrapper that
know how to unwrap
specific pooled connections.
I guess we don't have one for the JBOSS pools.
Mind, if you want to add one, make sure you're using reflection to avoid
the code to be dependent on the
JBoss jars.
Cheers
Andrea
--
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
By the way, we get a number of these un-wrappers from Spring, maybe upgrading to a more
recent version of Spring will help (we do have an unwrapper for JBoss already, but I guess it’s too old for your JBoss version?):
http://docs.spring.io/spring/docs/3.2.5.RELEASE/javadoc-api/org/springframework/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.html
Which is something I’ve been thinking about lately, that is, upgrading trunk to Spring 3.2.
Maybe you have a look at how hard the upgrade is?
Cheers
Andrea
···
On Mon, Nov 25, 2013 at 3:12 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
On Mon, Nov 25, 2013 at 2:58 PM, Ian Turton <ijturton@anonymised.com> wrote:
I’m getting a strange error when trying to connect to an Oracle DB using JNDI inside a JBOSS-EAP server.
2013-11-25 13:33:54,046 DEBUG [org.geotools.factory] - Factory implementations for category UnWrapper:
org.geoserver.data.jdbc.SpringUnWrapper
org.geotools.data.jdbc.datasource.DBCPUnWrapper
org.geotools.jdbc.LifecycleConnectionUnWrapper
2013-11-25 13:33:54,054 WARN [org.geotools.jdbc] - Failed to use SDO_TUNE.EXTENT_OF, falling back on envelope aggregation
java.sql.SQLException: Could not obtain native oracle connection for class org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6
at org.geotools.data.oracle.OracleDialect.unwrapConnection(OracleDialect.java:565)
at org.geotools.data.oracle.OracleDialect.readGeometry(OracleDialect.java:502)
at org.geotools.data.oracle.OracleDialect.readGeometry(OracleDialect.java:492)
at org.geotools.data.oracle.OracleDialect.getOptimizedBounds(OracleDialect.java:754)
at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1141)
at org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:501)
at org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java:189)
The rest of the log is attached.
Interestingly the connection works fine if I use the normal Oracle Datastore (with the same jar - which is an updated version for 11.2 rather than the one that ships with GeoServer).
Has anyone seen anything similar or got any hints as to how I can go about debugging further?
In order to read Oracle geometries we need to original Oracle connection.
All connection pools wrap the native connections with some pooling wrapper, and we have a list
of objects implementing org.geotools.data.jdbc.datasource.UnWrapper that know how to unwrap
specific pooled connections.
I guess we don’t have one for the JBOSS pools.
Mind, if you want to add one, make sure you’re using reflection to avoid the code to be dependent on the
JBoss jars.
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
Thanks for that - a whole chunk of spring I had no idea existed. Allegedly the unwrapper geoserver ships with should work with my version of JBoss so I’ve kicked it back over the fence to the red Hat guys to see if they can fix it.
Ian
···
On 25 November 2013 14:16, Andrea Aime <andrea.aime@…1107…> wrote:
By the way, we get a number of these un-wrappers from Spring, maybe upgrading to a more
recent version of Spring will help (we do have an unwrapper for JBoss already, but I guess it’s too old for your JBoss version?):
http://docs.spring.io/spring/docs/3.2.5.RELEASE/javadoc-api/org/springframework/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.html
Which is something I’ve been thinking about lately, that is, upgrading trunk to Spring 3.2.
Maybe you have a look at how hard the upgrade is?
Cheers
Andrea
–
Ian Turton
On Mon, Nov 25, 2013 at 3:12 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
On Mon, Nov 25, 2013 at 2:58 PM, Ian Turton <ijturton@anonymised.com> wrote:
I’m getting a strange error when trying to connect to an Oracle DB using JNDI inside a JBOSS-EAP server.
2013-11-25 13:33:54,046 DEBUG [org.geotools.factory] - Factory implementations for category UnWrapper:
org.geoserver.data.jdbc.SpringUnWrapper
org.geotools.data.jdbc.datasource.DBCPUnWrapper
org.geotools.jdbc.LifecycleConnectionUnWrapper
2013-11-25 13:33:54,054 WARN [org.geotools.jdbc] - Failed to use SDO_TUNE.EXTENT_OF, falling back on envelope aggregation
java.sql.SQLException: Could not obtain native oracle connection for class org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6
at org.geotools.data.oracle.OracleDialect.unwrapConnection(OracleDialect.java:565)
at org.geotools.data.oracle.OracleDialect.readGeometry(OracleDialect.java:502)
at org.geotools.data.oracle.OracleDialect.readGeometry(OracleDialect.java:492)
at org.geotools.data.oracle.OracleDialect.getOptimizedBounds(OracleDialect.java:754)
at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1141)
at org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:501)
at org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java:189)
The rest of the log is attached.
Interestingly the connection works fine if I use the normal Oracle Datastore (with the same jar - which is an updated version for 11.2 rather than the one that ships with GeoServer).
Has anyone seen anything similar or got any hints as to how I can go about debugging further?
In order to read Oracle geometries we need to original Oracle connection.
All connection pools wrap the native connections with some pooling wrapper, and we have a list
of objects implementing org.geotools.data.jdbc.datasource.UnWrapper that know how to unwrap
specific pooled connections.
I guess we don’t have one for the JBOSS pools.
Mind, if you want to add one, make sure you’re using reflection to avoid the code to be dependent on the
JBoss jars.
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
Ian,
Just for reference of another thread that I opened that maybe be
duplicated: Oracle NG (JNDI) Driver with JBoss connection pool problem
<http://osgeo-org.1560.x6.nabble.com/Oracle-NG-JNDI-Driver-with-JBoss-connection-pool-problem-td5292335.html#a5292550>
Using the last Oracle Driver in JBoss 6.4 module, removing the same from
geoserver.war and explicit included dependency of driver in
jboss-deployment-descriptor.xml included in geoserver.war JNDI works fine.
Below my jboss-deployment-descriptor.xml used in geoserver.war:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<dependencies>
<module name="com.oracle.jdbc" />
</dependencies>
<local-last value="true" />
</deployment>
</jboss-deployment-structure>
The problem was solved, now I can use JNDI and non JNDI Oracle Stores in
GeoServer with JBoss EAP 6.4 DataSource.
Thank you.
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Oracle-JNDI-connection-with-JBOSS-EAP-tp5091016p5292553.html
Sent from the GeoServer - User mailing list archive at Nabble.com.