-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: How to use hibernate spatial execute oracle spatial function
PostPosted: Mon May 31, 2010 3:29 am 
Newbie

Joined: Mon May 31, 2010 12:35 am
Posts: 1
Hello,everyone.I have a question.I can use hibernate spatial to query table which have a geometry column in table,but if i want to execute some oracle spatial function(like sdo_buffer....).How can we do ?I try to use "createSQLQuery" function ,but it throw a exception,which is "No Dialect mapping for JDBC type: 2002".Please help me,Thanks.If give me some code of demo,that is great.


Top
 Profile  
 
 Post subject: Re: How to use hibernate spatial execute oracle spatial function
PostPosted: Tue Jun 15, 2010 4:45 am 
Newbie

Joined: Tue Jun 15, 2010 4:41 am
Posts: 2
I'm having the same troubles... Do you solved this trouble?

When a try to do a JPA nativeQuery and get the geoemtry fielda I'm getting a "No Dialect mapping for JDBC type: 2002"..

Anybody know how to solve this?

Many thanks!


Top
 Profile  
 
 Post subject: Re: How to use hibernate spatial execute oracle spatial function
PostPosted: Mon Jan 21, 2013 5:50 am 
Beginner
Beginner

Joined: Thu Jul 22, 2004 10:51 pm
Posts: 29
Location: sydney australia
I'm using postgresql, hibernate-spatial and postgis and expected to be able to use a SqlQuery to retrieve a Geometry object.

However whenever I try to query a Point, Polygon or Geometry eg

List list = session.createSQLQuery(
"select geomfromewkt('SRID=1;POINT(1 1)')").list();

I get the exception:

Caused by: org.hibernate.MappingException: No Dialect mapping for JDBC type: 1111
at org.hibernate.dialect.TypeNames.get(TypeNames.java:78)
at org.hibernate.dialect.TypeNames.get(TypeNames.java:103)
at org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:328)
at org.hibernate.loader.custom.CustomLoader$Metadata.getHibernateType(CustomLoader.java:590)
at org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.performDiscovery(CustomLoader.java:516)
at org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.java:532)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1962)
at org.hibernate.loader.Loader.doQuery(Loader.java:802)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2533)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
at org.hibernate.loader.Loader.list(Loader.java:2271)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:316)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1842)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:157)

I assume this is the same problem and my guess is that hibernate-spatial (annoyingly) didn't bother to implement mappings for the sqlquery side of things?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.