Skip to content

[Bug] GIS plugin fails to insert Oracle geometry due to JDBC cast error #29

@oscarporsius

Description

@oscarporsius

What happened:
When executing a pipeline in Apache Hop that reads GIS data and writes it to an Oracle Spatial database,
the pipeline fails during the Table Output step.
The error indicates a ClassCastException when attempting to insert geometry data:

class oracle.jdbc.driver.T4CConnection cannot be cast to class oracle.jdbc.OracleConnection

What you expected to happen:
The pipeline should successfully insert geometry data (e.g., POINT) into an Oracle Spatial table using the Table Output transform, without JDBC type casting errors.
Steps to reproduce:

  1. Create a pipeline in Apache Hop with:
    • A GIS File Input (i.e. Shapefile) transform containing geometry data (e.g., POINT).
    • A Table Output transform targeting an Oracle Spatial table with a column of type SDO_GEOMETRY.
  2. Configure the Oracle database connection using a JDBC driver (e.g., ojdbc8.jar, ojdbc11.jar, etc.).
  3. Run the pipeline using the local run configuration.
  4. Observe the error during geometry insertion:
    Anything else we need to know?
    I have tried with multiple GIS plugins versions and Apache Hop versions.
    Environment:
  • Hop: 2.15.0, 2.14.0 and 2.13.0
  • Hop GIS Plugins: 1.4.0, 1.3.1, 1.3.0
  • JVM: OpenJDK 17 and OpenJDK 21
  • OS: Windows 11 (Also tested on Ubuntu 24.04)

Any suggested solutions?

If the bug is approved, would you be willing to submit a PR?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions