I'm having a issue trying to get working a JPA nativeQuery.
I'm having a org.hibernate.MappingException: No Dialect mapping for JDBC type: 2002 when a try to do a nativeQuery and get a geometry field type.
I use oracle and org.hibernatespatial.oracle.OracleSpatial10gDialect.
The geom fields is mapped as:
Anybody knows a solution? or how to force the type of the geometry to get wroking this...
Looking at the JDBC documentation, 2002 is a struct data type. The error message tells you the dialect does not support this. You could try upgrading your dialect, or swap the data type to something it can support.
I using the dialect that match to my database. I don't know is there's a best dialect, I will check it.
Now I'm using another query, and using a @SqlResultSetMapping and returning a two whole objects. (dades, features)....No only some fields. Usign this now is working...Not is the best solution but it' works.
I don't undestand how works the dialect, but it's strange that cannot use a nativeQuery with a user defined type (org.hibernatespatial.GeometryUserType) by the dialect.
Well now is working using this:
There will be plenty of time to discuss your objections when and if you return. The cargo is this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!