JPA - Oracle Spatial (JGeometry) Support


TopLink, EclipseLink supports the SDO_GEOMETRY datatype using the JGeometryConverter (

The Java fields in an entity should be of type oracle.spatial.geometry.JGeometry using the Oracle spatial library.



Get the Java Spatial API in the lib directory of Weblogic:

  • To support Oracle Spatial, copy the jar sdoapi.jar to <WEBLOGIC_HOME>/server/lib

Extend the domain:

  • Download the toplink-spatial-template.jar (to support Oracle Spatial)
  • Launch the Config Wizard (<WEBLOGIC_HOME>/common/bin/ (or .cmd).
  • Select Extend an existing WebLogic domain.
  • Browse and select your WebLogic Server domain.
  • Select Extend my domain using an existing extension template.
  • Browse and select the required template JAR (toplink-spatial-template.jar for Oracle Spatial
  • Complete the remaining pages of the wizard and finish

Extracting Domain Extension Contents...
Saving the Domain Information...
Updating Domain Information...
String Substituting Domain Files...
Performing OS Specific Tasks...
Performing Post Domain Creation Tasks...
Domain Extension Applied Successfully!

Domain Location: /bishiphome/Middleware/user_projects/domains/bifoundation_domain
Admin Server URL:
  • Restart Weblogic

Annotation Example

@StructConverter(name = "JGeometry", converter = 
public class Hotstar implements Serializable {
	private static final long serialVersionUID = 1L;
	private JGeometry point;
	private JGeometry point90112;



java.lang.NoClassDefFoundError: oracle/spatial/geometry/JGeometry

Exception in thread "main" javax.ejb.EJBException: EJB Exception: ; 
nested exception is: java.lang.NoClassDefFoundError: oracle/spatial/geometry/JGeometry; 
nested exception is: java.rmi.RemoteException: EJB Exception: ; 
nested exception is: java.lang.NoClassDefFoundError: oracle/spatial/geometry/JGeometry

You must complete the configuration of your application server.

Documentation / Reference

Powered by ComboStrap