Trying to use Hibernate Spatial 4.0-M1 with Oracle.

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

Trying to use Hibernate Spatial 4.0-M1 with Oracle.

visuel

Dear All,

 

Everything used to work fine in JBOSS 5 with hibernate 3.3.1.GS and hibernate spatial  1.0-M1.

Migrating from JBOSS 5 to JBOSS 6.0.1 EAP forced me to use  hibernate version 4 and then hibernatespatial  1.0-M1 stopped working for me.

 

 

When trying to store geometry I get the following:

------------------------------------------------

java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.spatial.dialect.oracle.SDOGeometry

        at org.hibernate.spatial.dialect.oracle.SDOGeometryValueBinder.convertJTSPoint(SDOGeometryValueBinder.java:176) [hibernate-spatial-4.0-M1.jar:4.0.0.Final]

        ....

        ....

 

 

In my Maven pom I use the following hibernate versions:

 

                               <version.org.hibernate.entity.manager>4.1.6.Final-redhat-3</version.org.hibernate.entity.manager>

                               <version.org.hibernate>4.1.6.Final-redhat-3</version.org.hibernate>

 

The version of jts is 1.12.

 

For  persistence I use the following properties inside the persistence.xml.

 

                               <properties>

                                               <property name="hibernate.dialect" value="org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect" />

                                               <property name="hibernate.show_sql" value="true" />

                                   <property name="hibernate.format_sql" value="true"/>

                               </properties>  

 

I use the this annotation in the entity that I want to persist:

 

                               @Column(name="LOCATION_DELIVERED")

                        @Type(type="org.hibernate.spatial.GeometryType")

                         private Point locationDelivered;

 

 

In JBOSS logging I can see:

 

                [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 58) HHH000400: Using dialect: org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect

 

I use the ojbc6.jar driver for Oracle.

 

I tried to all the annotations, dialects , Oracle drivers, column_definitions that I could think of.

 

Could someone  please give me a hint to help me further?

 

Victor

 

 

 

This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/emaildisclaimer


_______________________________________________
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: Trying to use Hibernate Spatial 4.0-M1 with Oracle.

klaus.rossmy

Hi Victor!
You have to upgrade to hibernate-spatial 4 …probably have to make a couple of changes to your source code too, since quite a lot has changed…at least we had do this once we did the upgrade

Regards Tilman

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Hoven, V.H. (Victor) van den
Sent: Mittwoch, 30. Januar 2013 11:20
To: [hidden email]
Subject: [hibernatespatial-users] Trying to use Hibernate Spatial 4.0-M1 with Oracle.

 

Dear All,

 

Everything used to work fine in JBOSS 5 with hibernate 3.3.1.GS and hibernate spatial  1.0-M1.

Migrating from JBOSS 5 to JBOSS 6.0.1 EAP forced me to use  hibernate version 4 and then hibernatespatial  1.0-M1 stopped working for me.

 

 

When trying to store geometry I get the following:

------------------------------------------------

java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.spatial.dialect.oracle.SDOGeometry

        at org.hibernate.spatial.dialect.oracle.SDOGeometryValueBinder.convertJTSPoint(SDOGeometryValueBinder.java:176) [hibernate-spatial-4.0-M1.jar:4.0.0.Final]

        ....

        ....

 

 

In my Maven pom I use the following hibernate versions:

 

                               <version.org.hibernate.entity.manager>4.1.6.Final-redhat-3</version.org.hibernate.entity.manager>

                               <version.org.hibernate>4.1.6.Final-redhat-3</version.org.hibernate>

 

The version of jts is 1.12.

 

For  persistence I use the following properties inside the persistence.xml.

 

                               <properties>

                                               <property name="hibernate.dialect" value="org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect" />

                                               <property name="hibernate.show_sql" value="true" />

                                   <property name="hibernate.format_sql" value="true"/>

                               </properties>  

 

I use the this annotation in the entity that I want to persist:

 

                               @Column(name="LOCATION_DELIVERED")

                        @Type(type="org.hibernate.spatial.GeometryType")

                         private Point locationDelivered;

 

 

In JBOSS logging I can see:

 

                [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 58) HHH000400: Using dialect: org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect

 

I use the ojbc6.jar driver for Oracle.

 

I tried to all the annotations, dialects , Oracle drivers, column_definitions that I could think of.

 

Could someone  please give me a hint to help me further?

 

Victor

 

 

 

This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/emaildisclaimer


_______________________________________________
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: Trying to use Hibernate Spatial 4.0-M1 with Oracle.

klaus.rossmy
In reply to this post by visuel

Looking closer at your mail I see you are already using hibernate-spatial 4…maybe you still have this old hibernate-spatial-oracle-dialect lib (from version 1)  in your classpath?

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Hoven, V.H. (Victor) van den
Sent: Mittwoch, 30. Januar 2013 11:20
To: [hidden email]
Subject: [hibernatespatial-users] Trying to use Hibernate Spatial 4.0-M1 with Oracle.

 

Dear All,

 

Everything used to work fine in JBOSS 5 with hibernate 3.3.1.GS and hibernate spatial  1.0-M1.

Migrating from JBOSS 5 to JBOSS 6.0.1 EAP forced me to use  hibernate version 4 and then hibernatespatial  1.0-M1 stopped working for me.

 

 

When trying to store geometry I get the following:

------------------------------------------------

java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.spatial.dialect.oracle.SDOGeometry

        at org.hibernate.spatial.dialect.oracle.SDOGeometryValueBinder.convertJTSPoint(SDOGeometryValueBinder.java:176) [hibernate-spatial-4.0-M1.jar:4.0.0.Final]

        ....

        ....

 

 

In my Maven pom I use the following hibernate versions:

 

                               <version.org.hibernate.entity.manager>4.1.6.Final-redhat-3</version.org.hibernate.entity.manager>

                               <version.org.hibernate>4.1.6.Final-redhat-3</version.org.hibernate>

 

The version of jts is 1.12.

 

For  persistence I use the following properties inside the persistence.xml.

 

                               <properties>

                                               <property name="hibernate.dialect" value="org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect" />

                                               <property name="hibernate.show_sql" value="true" />

                                   <property name="hibernate.format_sql" value="true"/>

                               </properties>  

 

I use the this annotation in the entity that I want to persist:

 

                               @Column(name="LOCATION_DELIVERED")

                        @Type(type="org.hibernate.spatial.GeometryType")

                         private Point locationDelivered;

 

 

In JBOSS logging I can see:

 

                [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 58) HHH000400: Using dialect: org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect

 

I use the ojbc6.jar driver for Oracle.

 

I tried to all the annotations, dialects , Oracle drivers, column_definitions that I could think of.

 

Could someone  please give me a hint to help me further?

 

Victor

 

 

 

This e-mail and its contents are subject to the DISCLAIMER at http://www.tno.nl/emaildisclaimer


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