Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes, the <code>?</code> are substituted by the values you need to store.</p> <p>Did you try to use the following type: <code>GeometryUserType</code> and not the <code>GeometryType</code>? I suspect <code>GeometryType</code> is not directly supported by the API of Hibernate Spatial Project. It is maybe an abstract class which you could not instantiate directly to map your datas with annotations - it acts beyond the scene as we have experimented.</p> <p><code>Caused by: java.lang.UnsupportedOperationException</code> which has make me tell that.</p> <p>And the last XML stuff inside <a href="http://www.hibernatespatial.org/usage.html" rel="nofollow">the tutorial you have followed</a> is clear:</p> <pre><code>... &lt;property name="geometry" type="org.hibernatespatial.GeometryUserType"&gt; &lt;column name="geom" /&gt; &lt;/property&gt; ... </code></pre> <p>Looking at the code inside the <a href="http://www.hibernatespatial.org/websvn/filedetails.php?repname=hibernate-spatial&amp;path=%2Fbranches%2Fhibernate-3.6-integration%2Fhibernate-spatial-postgis%2Fsrc%2Fmain%2Fjava%2Forg%2Fhibernatespatial%2Fpostgis%2FPGGeometryUserType.java&amp;sc=1" rel="nofollow">GeometryUserType</a> I see only one place where these exception could be thrown.</p> <pre><code>public Object conv2DBGeometry(Geometry jtsGeom, Connection connection) { org.postgis.Geometry geom = null; jtsGeom = forceEmptyToGeometryCollection(jtsGeom); if (jtsGeom instanceof com.vividsolutions.jts.geom.Point) { geom = convertJTSPoint((com.vividsolutions.jts.geom.Point) jtsGeom); } else if (jtsGeom instanceof com.vividsolutions.jts.geom.LineString) { geom = convertJTSLineString((com.vividsolutions.jts.geom.LineString) jtsGeom); } else if (jtsGeom instanceof com.vividsolutions.jts.geom.MultiLineString) { geom = convertJTSMultiLineString((com.vividsolutions.jts.geom.MultiLineString) jtsGeom); } else if (jtsGeom instanceof com.vividsolutions.jts.geom.Polygon) { geom = convertJTSPolygon((com.vividsolutions.jts.geom.Polygon) jtsGeom); } else if (jtsGeom instanceof com.vividsolutions.jts.geom.MultiPoint) { geom = convertJTSMultiPoint((com.vividsolutions.jts.geom.MultiPoint) jtsGeom); } else if (jtsGeom instanceof com.vividsolutions.jts.geom.MultiPolygon) { geom = convertJTSMultiPolygon((com.vividsolutions.jts.geom.MultiPolygon) jtsGeom); } else if (jtsGeom instanceof com.vividsolutions.jts.geom.GeometryCollection) { geom = convertJTSGeometryCollection((com.vividsolutions.jts.geom.GeometryCollection) jtsGeom); } if (geom != null) return new PGgeometry(geom); else throw new UnsupportedOperationException("Conversion of " + jtsGeom.getClass().getSimpleName() + " to PGgeometry not supported"); } </code></pre> <p>Where PGgeometry stands for PostGis Geometry I think (or maybe PostgreSQL).</p> <p>I have found some topics where Karel Maesen and others speak about the InnoDB support is not very well, but they are maybe outdated (<a href="http://hibernate-spatial.1140993.n2.nabble.com/Hibernate-Spatial-with-Hibernate-3-6-and-Mysql-InnoDB-td6153777.html" rel="nofollow">05-2011</a>).</p> <p>Good luck!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload