Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hsqldb support GEOMETRY column?

I have tried junit with hsqldb(v2.2.6),but it doesn't seem to support geometry.

Here is my code and error info:

java:

@Type(type = "org.hibernatespatial.GeometryUserType")
@Column(columnDefinition = "MDSYS.SDO_GEOMETRY")
public Point getGeometry() {
    return geometry;
}

errors:

DEBUG - com.mchange.v2.c3p0.impl.NewPooledConnection@126f816 handling a throwable.
   java.sql.SQLException: invalid schema name: MDSYS
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.JDBCStatement.executeUpdate(Unknown Source)
at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:64)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:204)

How do I handle it ?

like image 557
cbin Avatar asked Jun 04 '26 14:06

cbin


1 Answers

MDSYS.SDO_GEOMETRY is an Oracle type if I'm not mistaken. So that won't work with HSQLDB.

The manual does not list a geometry type: http://hsqldb.org/doc/2.0/guide/sqlgeneral-chapt.html#N103C9

So I guess your only option is to file an enhancement request.