Hibernate Spatial

ClassCastException when saving geometries

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.1
  • Fix Version/s: 1.1.1
  • Component/s: Oracle10g
  • Description:
    Hide
    See report by Sarah Haskins:


    "ClassCastException on line 51 of OracleJDBCTypeFactory.

    java.lang.ClassCastException: org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection
    at oracle.sql.STRUCT.<init>(STRUCT.java:138)
    at org.hibernatespatial.oracle.OracleJDBCTypeFactory.createStruct(OracleJDBCTypeFactory.java:51)
    at org.hibernatespatial.oracle.SDOGeometry.store(SDOGeometry.java:154)
    at org.hibernatespatial.oracle.SDOGeometryType.conv2DBGeometry(SDOGeometryType.java:82)
    ...

    I have a custom ConnectionFinder which is being called to return the "oracleConnection" in OracleJDBCTypeFactory.createStruct, but since the oracleConnection is not used to create the STRUCT (the initial method argument conn is used instead), I am getting this ClassCastException."
    Show
    See report by Sarah Haskins: "ClassCastException on line 51 of OracleJDBCTypeFactory. java.lang.ClassCastException: org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection at oracle.sql.STRUCT.<init>(STRUCT.java:138) at org.hibernatespatial.oracle.OracleJDBCTypeFactory.createStruct(OracleJDBCTypeFactory.java:51) at org.hibernatespatial.oracle.SDOGeometry.store(SDOGeometry.java:154) at org.hibernatespatial.oracle.SDOGeometryType.conv2DBGeometry(SDOGeometryType.java:82) ... I have a custom ConnectionFinder which is being called to return the "oracleConnection" in OracleJDBCTypeFactory.createStruct, but since the oracleConnection is not used to create the STRUCT (the initial method argument conn is used instead), I am getting this ClassCastException."

Issue Links

Activity

There are no comments yet on this issue.

People

Dates

  • Created:
    10/Jun/11 11:33 AM
    Updated:
    01/Nov/11 12:16 PM
    Resolved:
    22/Jun/11 11:13 AM