No Dialect mapping for JDBC type: 2002"

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

No Dialect mapping for JDBC type: 2002"

skoobi
Hi,

I am using the trunk version of hibernate spatial (compiled on Tue Mar  1 14:55:20 EST 2011), with postgres/postgis and Java6

Whenever hibernate creates the schema, I experience the following error :
No Dialect mapping for JDBC type: 2002"

Now, if I add a the following @Column annotation, things seem to work OK

@Column(columnDefinition="Geometry", name=..)

Also, I have not explicitely registered the Hibernate Spatial dialect with hibernate (I just want to use the user type for now).

So, what I wonder about is whether the columnDefinition= thing is normal, or whether it is a bug in hibernate spatial.

Thanks,
Sami Dalouche

PS: to compile from trunk, I had to get rid of all the modules besides postgis, as there were tons of compile errors (complaining of missing methods, etc)

----
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
_______________________________________________
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: No Dialect mapping for JDBC type: 2002"

Karel Maesen
Administrator
Hi,


On 01 Mar 2011, at 21:01, [hidden email] wrote:

> I am using the trunk version of hibernate spatial (compiled on Tue Mar  1 14:55:20 EST 2011), with postgres/postgis and Java6
>
> Whenever hibernate creates the schema, I experience the following error :
> No Dialect mapping for JDBC type: 2002"
>
> Now, if I add a the following @Column annotation, things seem to work OK
>
> @Column(columnDefinition="Geometry", name=..)
>
> Also, I have not explicitely registered the Hibernate Spatial dialect with hibernate (I just want to use the user type for now).
>
> So, what I wonder about is whether the columnDefinition= thing is normal, or whether it is a bug in hibernate spatial.

Yes you need to register the spatial dialect. The spatial dialect registers the type 2002 (Struct) to Geometry, and that is what makes Hibernate schema generation use the correct declaration.
>
>
> PS: to compile from trunk, I had to get rid of all the modules besides postgis, as there were tons of compile errors (complaining of missing methods, etc)

I know, I know.... I'm in the midst of extending some fundamental interfaces, and I managed so far only to get two dialects in order with the rest following soon.

Regards,

Karel

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