Invalid Column Type - SDO_GEOMETRY

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Invalid Column Type - SDO_GEOMETRY

jmeyer09
I have a program that is using Oracle Spatial and I am able to persist varchar, date, and number data types to the database.  Yet, when I try to persist the a column with the SDO_Geometry data type, I am receiving an "Invalid Column Type" message.

In my model.reveng.xml file I have the following

<table schema="SUASHAPE" name="TFR_ALTRV_LOCATION">
   <column name="SHAPE" type="org.hibernatespatial.GeometryUserType" />
</table>

The TfrAltrvLocation class looks like

import com.vividsolutions.jts.geom.Geometry;
...

public class TfrAltrvLocation implements java.io.Serializable {

   private Geometry shape;

   ....

   public Geometry getShape() {
      return this.shape;
   }

   public void setShape(Geometry shape) {
      this.shape = shape;
   }

   ...
}

The TfrAltrvLocation.hbm.xml file contains

....

<property name="shape" type="org.hibernatespatial.GeometryUserType">
    <column name="SHAPE" />
</property>

....

Any suggestions?

Also, I am using hibernate-spatial-oracle version 1.0.

--
Jim Meyer, PMP, ACP
AIM-SAA Program Manager
ConceptSolutions, LLC
We Make Business Intelligent
(703) 889.8434 (desk)

www.Concept-Solutions.com

This message contains privileged and/or confidential Information. You may not share or use this information without the express written consent of Concept Solutions, LLC. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not use, copy, or deliver this message in any way, shape, or form. Please destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions, and/or other information in this message that do not relate to the official business of Concept Solutions, LLC shall be understood as neither given nor endorsed by it.

www.concept-solutions.com

An Equal Opportunity Employer


CONFIDENTIALITY NOTICE: The information and/or documents contained in this transmission may contain confidential or proprietary information. The information is solely for the use of the addressee named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, any action in reliance or other use of the contents of this transmission is strictly prohibited

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Invalid Column Type - SDO_GEOMETRY

Robert Kovacs
Hi Jim

I use the following:

    @Column(name="SDO_GEOMETRY", columnDefinition="sdo_geometry")
    @Type(type="org.hibernate.spatial.GeometryType")
    private Geometry sdoGeometry;

So looking at the difference I guess it is the columnDefinition that i smissing?

I am using hibernal-spatial-4.0-M1 with hibernate-jpa-2.0-ap1-1.0.0.Final

Robert

On 17 March 2015 at 15:52, Jim Meyer <[hidden email]> wrote:
I have a program that is using Oracle Spatial and I am able to persist varchar, date, and number data types to the database.  Yet, when I try to persist the a column with the SDO_Geometry data type, I am receiving an "Invalid Column Type" message.

In my model.reveng.xml file I have the following

<table schema="SUASHAPE" name="TFR_ALTRV_LOCATION">
   <column name="SHAPE" type="org.hibernatespatial.GeometryUserType" />
</table>

The TfrAltrvLocation class looks like

import com.vividsolutions.jts.geom.Geometry;
...

public class TfrAltrvLocation implements java.io.Serializable {

   private Geometry shape;

   ....

   public Geometry getShape() {
      return this.shape;
   }

   public void setShape(Geometry shape) {
      this.shape = shape;
   }

   ...
}

The TfrAltrvLocation.hbm.xml file contains

....

<property name="shape" type="org.hibernatespatial.GeometryUserType">
    <column name="SHAPE" />
</property>

....

Any suggestions?

Also, I am using hibernate-spatial-oracle version 1.0.

--
Jim Meyer, PMP, ACP
AIM-SAA Program Manager
ConceptSolutions, LLC
We Make Business Intelligent
<a href="tel:%28703%29%20889.8434" value="+17038898434" target="_blank">(703) 889.8434 (desk)

www.Concept-Solutions.com

This message contains privileged and/or confidential Information. You may not share or use this information without the express written consent of Concept Solutions, LLC. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not use, copy, or deliver this message in any way, shape, or form. Please destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions, and/or other information in this message that do not relate to the official business of Concept Solutions, LLC shall be understood as neither given nor endorsed by it.

www.concept-solutions.com

An Equal Opportunity Employer


CONFIDENTIALITY NOTICE: The information and/or documents contained in this transmission may contain confidential or proprietary information. The information is solely for the use of the addressee named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, any action in reliance or other use of the contents of this transmission is strictly prohibited

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users



_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users