[postgis-users] Problem with createNativeQuery with Geometry in EJB3
Matias Massigoge
mmassigoge at gmail.com
Tue Mar 18 16:22:07 PDT 2008
Hi all,
I'm having problems with CreateNativeQuery in EJB3.
I need to use CreateNativeQuery because i want to advance of geo
functions, like centroid(geom).
The problem is that i cant to retrieve geom as a result, i get the
following error:
"javax.persistence.PersistenceException:
org.hibernate.MappingException: No Dialect mapping for JDBC type:
1111"
If i use CreateQuery it works fine since i have configured the entity
for the GometryType.
For example:
Point p = em.createQuery("Select p.location from Person p").getSingleResult();
Works fine, but
Point p = em.createNativeQuery("Select p.location from Person
p").getSingleResult();
Cant handle the geom type.
I think it somthing about the geom UserType but i cant resolve it.
I'm using JBoss 4.2.2GA, Postgres 8.2. postgis 1.3.2, JDK1.5
Any clue?
Thanks!!
Matías
More information about the postgis-users
mailing list