java - org.hibernate.MappingException: No Dialect mapping for JDBC type: 2002 -


I'm getting org.hibernate.MappingException: no bid mapping JDBC Type: 2002 When I try to get a geometry field type to a JPA nativeQuery.

I am using Oracle and org.hibernatespatial.oracle.OracleSpatial10gDialect .

As the geometry field is mapped:

  @Column (name = "geometry") @Type (type = "org.hibernatespatial.GeometryUserType") Private Geometry geometry; // ... list & lt; Object & gt; ListFeatures = New Linkedist & lt; Object & gt; (); Query Query = entityManager.createNativeQuery ("Select" + Slot + ", the feature of geometry from edtem_features, edtem_dades where grandfather" + "feature." + Tematic.getIdGeomField () + '= Grandfather. "+ Tematic.getIdDataField ( ) + "and Dada.capesid =" + tematic.getCapa (). GetId () + "and feature.geometriesid =" + tematic.getGeometria (). GetId ()); listFeatures.addAll (query.getResultList ());  

this spring + struts2

  & my hibernate configuration lt, bean id = "entityManagerFactory" class = "org.springframework.orm.jpa. LocalContainerEntityManagerFactoryBean "& gt; Property Name =" Data Source "Riff =" Data Source "/> Property Name =" JP Venderadaptr "& gt; & Lt; bean class =" org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter "& gt; & Lt; property name =" Detabesplafat "value =" org.hibernatespatial.oracle.OracleSpatial10gDialect "/ & gt ; & Lt; property name = "show SQL" value = "true" / & gt; & Lt; / beans & gt; & Lt; / property & gt; & Lt; property name = "Jepiapiprrtitij" & gt; & Lt; Theater Content & gt; & Lt; Prop key = "hibernate.dialect" & gt; Org.hibernatespatial.oracle.OracleSpatial10gDialect & lt; / Prop & gt; & Lt; Prop key = "hibernate.default_schema" & gt; My_schema & lt; / Prop & gt; & Lt; / Theater & gt; & Lt; / Property & gt; & Lt; / Bean & gt;  

How can this be resolved? Or how to force it to get the type of geometry to work?

After the text "itemprop =" text ">

You can try with the following mapping definition:

  @column (name = "geometry", columnDefinition = "geometry", nullable = true) Private geometry geometry; Instead of  

:

  @ column (name = "geometry") @ type (type = "org.hibernatespatial.GeometryUserType") personal geometry geometry;  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -