Conflict from HS PostGis and Sql Server

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

Conflict from HS PostGis and Sql Server

Filippo Rossetto
This post has NOT been accepted by the mailing list yet.
Hi, sorry for my english but I've found a conflict on Hibernate spatial 1.0
I'm doing a program that import an ASCII file (there's the coordinate) to a Database (any kind Posgis, Oracle and SQL Server) without know what is this (there's another database where I find the connection string).
The problem is I've to include on my CLASSPATH every HS jar (hibernate-spatial-postgis-1.0.jar and hibernate-spatial-sqlserver-1.0.jar) and I'm setting dynamically the dialect on the hibernate configuration file, and if I import in Oracle there isn't any problem. But in postgres appear this error when I'm trying to insert:
Could not execute JDBC batch update
and if I look the NextException there's this message:
ERROR: parse error - invalid geometry
"You must specify a valid OGC WKT geometry type such as POINT, LINESTRING or POLYGON"

If I remove from CLASSPATH the sqlserver jar hibernate-spatial-sqlserver-1.0.jar it's all fine. I believe there's a conflict on the sql-type (both have the spatial field named GEOMETRY) and try to insert in Postgres the spatial field with the sql server syntax. There's a way to solve the conflict with both jar on the classpath?
Thanks
FILIPPO
Reply | Threaded
Open this post in threaded view
|

Re: Conflict from HS PostGis and Sql Server

GavinMartin
This post has NOT been accepted by the mailing list yet.
Thanks dear for informative post. I have never passed this phase before but your post enlightened my knowledge and now I will try it and would try to solve your problem.