Closed anste closed 6 years ago
Thank you for your report.
What version of the Oracle JDBC driver are you using?
The code is tested with ojdbc6, version 11.1.0.7.0 and never gave any problems before.
Strange, that's exactly the version I 'm using. Basically what I am doing is:
[...]
// create geolatte geometry from JTS geometry
jGeometry =JTS.from((Geometry) geometry, crs);
// store geometry in database
final ConnectionFinder finder = new DefaultConnectionFinder();
sdo_geometry = new OracleJDBCTypeFactory(finder).createStruct(Encoders.encode(jGeometry), connection);
[...]
I confirmed the problem. It is triggered only when the system property GEOLATTE_USE_SDO_POINT_TYPE
is set to true
(a case not covered in my tests)
When I try to store geometries of type point into an Oracle database (Systemproperty
GEOLATTE_USE_SDO_POINT_TYPE=true
) theOracleJDBCTypeFactory.createStruct
method fails because it tries to castjava.lang.Double
tooracle.sql.Datum
.This code in OracleJDBCTypeFactory.createStruct throws
java.lang.ArrayStoreException
: