Can't convert object of type org.postgresql.util.PGobject

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

Can't convert object of type org.postgresql.util.PGobject

Jo
Hi,

when I do a query on my postgres/postgis database and try to save it in a List (like in the tutorial on
the hibernate spatial website) there comes an Exception:

Exception in thread "main" java.lang.IllegalArgumentException: Can't convert object of type org.postgresql.util.PGobject
        at org.hibernatespatial.postgis.PGGeometryUserType.convert2JTS(PGGeometryUserType.java:123)
        at org.hibernatespatial.AbstractDBGeometryType.nullSafeGet(AbstractDBGeometryType.java:127)
        at org.hibernatespatial.GeometryUserType.nullSafeGet(GeometryUserType.java:170)
        at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:128)
        at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
        at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2124)
        at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1404)
        at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1332)
        at org.hibernate.loader.Loader.getRow(Loader.java:1230)
        at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:603)
        at org.hibernate.loader.Loader.doQuery(Loader.java:724)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
        at org.hibernate.loader.Loader.doList(Loader.java:2228)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
        at org.hibernate.loader.Loader.list(Loader.java:2120)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
        at communication.postgresDB.PGGpsDBIO.retrieveTrk(PGGpsDBIO.java:191)
        at util.test.HibernateTester.main(HibernateTester.java:51)

I've found a similar post on the mailing list but nothing I've done solved the problem.

I'm using
hibernate 3.3.0SP1
hibernate spatial 1.0M2
hibernate-spatial-postgis-1.0-M2
hibernate-annotations 3.4.0.GA
postgis 1.4.0
postgres 8.3

Kind Regards,

Jo


--
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/wasistshortview.php?mc=sv_ext_mf@gmx
_______________________________________________
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: Can't convert object of type org.postgresql.util.PGobject

Andy Bailey-2
Jo,

It may be that you are using the wrong driver to connect to the
database. Can you post the hibernate configuration for the driver you
are using.

Andy Bailey
http://www.hazlorealidad.com

On Mon, 2008-09-15 at 13:14 +0200, Johannes Lauer wrote:

> Hi,
>
> when I do a query on my postgres/postgis database and try to save it in a List (like in the tutorial on
> the hibernate spatial website) there comes an Exception:
>
> Exception in thread "main" java.lang.IllegalArgumentException: Can't convert object of type org.postgresql.util.PGobject
> at org.hibernatespatial.postgis.PGGeometryUserType.convert2JTS(PGGeometryUserType.java:123)
> at org.hibernatespatial.AbstractDBGeometryType.nullSafeGet(AbstractDBGeometryType.java:127)
> at org.hibernatespatial.GeometryUserType.nullSafeGet(GeometryUserType.java:170)
> at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:128)
> at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
> at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2124)
> at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1404)
> at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1332)
> at org.hibernate.loader.Loader.getRow(Loader.java:1230)
> at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:603)
> at org.hibernate.loader.Loader.doQuery(Loader.java:724)
> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
> at org.hibernate.loader.Loader.doList(Loader.java:2228)
> at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
> at org.hibernate.loader.Loader.list(Loader.java:2120)
> at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
> at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
> at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
> at communication.postgresDB.PGGpsDBIO.retrieveTrk(PGGpsDBIO.java:191)
> at util.test.HibernateTester.main(HibernateTester.java:51)
>
> I've found a similar post on the mailing list but nothing I've done solved the problem.
>
> I'm using
> hibernate 3.3.0SP1
> hibernate spatial 1.0M2
> hibernate-spatial-postgis-1.0-M2
> hibernate-annotations 3.4.0.GA
> postgis 1.4.0
> postgres 8.3
>
> Kind Regards,
>
> Jo
>
>


_______________________________________________
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: Can't convert object of type org.postgresql.util.PGobject

developercircle
Hi!! to all,  are you using JDBC Driver or resources from pool on any Enterprise Server?. that cant is your problem?

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Jo
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

Jo
In reply to this post by Andy Bailey-2
Sorry, my last reply doesn't followed the thread.

I use the http://jdbc.postgresql.org/download/postgresql-8.3-603.jdbc4.jar driver.
Java 1.6 to connect to the database. The connection to the db without hibernate and with hibernate is no problem. The problem only occurs when I try to load an object from the spatial db.


There are my settings from the hibernate.properties file:

hibernate.connection.driver_class=org.postgis.DriverWrapper
hibernate.dialect=org.hibernatespatial.postgis.PostgisDialect
hibernate.connection.url=jdbc:postgresql://localhost/mydatabase

Jo

Andy Bailey-2 wrote
Jo,

It may be that you are using the wrong driver to connect to the
database. Can you post the hibernate configuration for the driver you
are using.

Andy Bailey
http://www.hazlorealidad.com

On Mon, 2008-09-15 at 13:14 +0200, Johannes Lauer wrote:
> Hi,
>
> when I do a query on my postgres/postgis database and try to save it in a List (like in the tutorial on
> the hibernate spatial website) there comes an Exception:
>
> Exception in thread "main" java.lang.IllegalArgumentException: Can't convert object of type org.postgresql.util.PGobject
> at org.hibernatespatial.postgis.PGGeometryUserType.convert2JTS(PGGeometryUserType.java:123)
> at org.hibernatespatial.AbstractDBGeometryType.nullSafeGet(AbstractDBGeometryType.java:127)
> at org.hibernatespatial.GeometryUserType.nullSafeGet(GeometryUserType.java:170)
> at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:128)
> at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
> at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2124)
> at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1404)
> at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1332)
> at org.hibernate.loader.Loader.getRow(Loader.java:1230)
> at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:603)
> at org.hibernate.loader.Loader.doQuery(Loader.java:724)
> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
> at org.hibernate.loader.Loader.doList(Loader.java:2228)
> at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
> at org.hibernate.loader.Loader.list(Loader.java:2120)
> at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
> at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
> at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
> at communication.postgresDB.PGGpsDBIO.retrieveTrk(PGGpsDBIO.java:191)
> at util.test.HibernateTester.main(HibernateTester.java:51)
>
> I've found a similar post on the mailing list but nothing I've done solved the problem.
>
> I'm using
> hibernate 3.3.0SP1
> hibernate spatial 1.0M2
> hibernate-spatial-postgis-1.0-M2
> hibernate-annotations 3.4.0.GA
> postgis 1.4.0
> postgres 8.3
>
> Kind Regards,
>
> Jo
>
>


_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@lists.hibernatespatial.org
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Jo
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

Jo
In reply to this post by developercircle
Ok. I've wrote a short Java program to test postGIS.

The Query:
select AsText(s.geom), AsText(h.geom), Distance(s.geom, h.geom) AS distance from gps_points AS s, gps_points AS h where s.ptid='1' and h.ptid='2';

works. PostGIS works. I also tried to connect to the DB by OpenJump and I get the results.

I've tried some other postgis.jar (as the newest one 1.4.0, 1.3.3 and 1.1.6). Nothing changes.

Don't know what else I can do to get the code running.

Jo




developercircle wrote
Hi!! to all,  are you using JDBC Driver or resources from pool on any
Enterprise Server?. that cant is your problem?

_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@lists.hibernatespatial.org
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

developercircle
In reply to this post by Jo
test changing this line by the normal configuration of hibernate for postgres.

hibernate.connection.driver_class=org.postgis.DriverWrapper

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Jo
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

Jo
Changed the Driver to

hibernate.connection.driver_class = org.postgresql.Driver

but same Result... no success.

developercircle wrote
test changing this line by the normal configuration of hibernate for
postgres.

hibernate.connection.driver_class=org.postgis.DriverWrapper

_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@lists.hibernatespatial.org
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

developercircle
Do you have the postgis.jar in the classpath?

_______________________________________________
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: Can't convert object of type org.postgresql.util.PGobject

Alexandre Walter Pretyman
In reply to this post by developercircle
Hello Jo_ and List,


Jo_, as stated in the tutorial (
http://www.hibernatespatial.org/tutorial.html ) I have been using the
following in my persistence.xml:

<property name="hibernate.connection.driver_class"
value="org.postgresql.Driver" />

<property name="hibernate.dialect"
value="org.hibernatespatial.postgis.PostgisDialect" />

And everything here is working fine. Could you try changing your driver
class and posting the result?

(Just for information: I have been using this configuration before in an
application server as well - JBoss - and it was working).

Alexandre Pretyman

---------------------------------------------------------------------------

From: [hidden email]
[mailto:[hidden email]] On Behalf
Of Leonardo Guzman
Sent: quarta-feira, 17 de setembro de 2008 11:25
To: Hibernate Spatial Users Discussion
Subject: Re: [hibernatespatial-users] Can't convert object of type
org.postgresql.util.PGobject

test changing this line by the normal configuration of hibernate for
postgres.

hibernate.connection.driver_class=org.postgis.DriverWrapper

_______________________________________________
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: Can't convert object of type org.postgresql.util.PGobject

Alexandre Walter Pretyman
In reply to this post by Jo
Try with a jdbc3 driver, and let us know

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf
Of Jo_
Sent: terça-feira, 16 de setembro de 2008 11:08
To: [hidden email]
Subject: Re: [hibernatespatial-users] Can't convert object of type
org.postgresql.util.PGobject


Sorry, my last reply doesn't followed the thread.

I use the http://jdbc.postgresql.org/download/postgresql-8.3-603.jdbc4.jar
driver.
Java 1.6 to connect to the database. The connection to the db without
hibernate and with hibernate is no problem. The problem only occurs when I
try to load an object from the spatial db.


There are my settings from the hibernate.properties file:

hibernate.connection.driver_class=org.postgis.DriverWrapper
hibernate.dialect=org.hibernatespatial.postgis.PostgisDialect
hibernate.connection.url=jdbc:postgresql://localhost/mydatabase

Jo


Andy Bailey-2 wrote:

>
> Jo,
>
> It may be that you are using the wrong driver to connect to the
> database. Can you post the hibernate configuration for the driver you
> are using.
>
> Andy Bailey
> http://www.hazlorealidad.com
>
> On Mon, 2008-09-15 at 13:14 +0200, Johannes Lauer wrote:
>> Hi,
>>
>> when I do a query on my postgres/postgis database and try to save it in a
>> List (like in the tutorial on
>> the hibernate spatial website) there comes an Exception:
>>
>> Exception in thread "main" java.lang.IllegalArgumentException: Can't
>> convert object of type org.postgresql.util.PGobject
>> at
>>
org.hibernatespatial.postgis.PGGeometryUserType.convert2JTS(PGGeometryUserTy
pe.java:123)
>> at
>>
org.hibernatespatial.AbstractDBGeometryType.nullSafeGet(AbstractDBGeometryTy
pe.java:127)
>> at
>>
org.hibernatespatial.GeometryUserType.nullSafeGet(GeometryUserType.java:170)
>> at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:128)
>> at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
>> at
>>
org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntit
yPersister.java:2124)
>> at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1404)
>> at
org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1332)
>> at org.hibernate.loader.Loader.getRow(Loader.java:1230)
>> at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:603)
>> at org.hibernate.loader.Loader.doQuery(Loader.java:724)
>> at
>>
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.ja
va:259)
>> at org.hibernate.loader.Loader.doList(Loader.java:2228)
>> at
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
>> at org.hibernate.loader.Loader.list(Loader.java:2120)
>> at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
>> at
>>
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
>> at
>>
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
>> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
>> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
>> at
communication.postgresDB.PGGpsDBIO.retrieveTrk(PGGpsDBIO.java:191)

>> at util.test.HibernateTester.main(HibernateTester.java:51)
>>
>> I've found a similar post on the mailing list but nothing I've done
>> solved the problem.
>>
>> I'm using
>> hibernate 3.3.0SP1
>> hibernate spatial 1.0M2
>> hibernate-spatial-postgis-1.0-M2
>> hibernate-annotations 3.4.0.GA
>> postgis 1.4.0
>> postgres 8.3
>>
>> Kind Regards,
>>
>> Jo
>>
>>
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
>
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-us
ers
>
>

--
View this message in context:
http://www.nabble.com/Can%27t-convert-object-of-type-org.postgresql.util.PGo
bject-tp19491034p19512621.html
Sent from the Hibernate Spatial - Users mailing list archive at Nabble.com.

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

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Jo
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

Jo
In reply to this post by developercircle
Yes. The postgis_1.4.0.jar is in the classpath.

developercircle wrote
Do you have the postgis.jar in the classpath?

_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@lists.hibernatespatial.org
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

developercircle
Can you write the code where exception happen?

_______________________________________________
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: Can't convert object of type org.postgresql.util.PGobject

Karel Maesen
Administrator
In reply to this post by Jo
Hi Jo,

I see that you use Hibernate 3.3.0SP1. Could you try to use a 3.2.x  
version ? I received from some other users that they have problems  
with that new version.

I would also recommend that you use a somewhat older version of the  
postgis.jar. I haven't yet tested with the 1.4 release.

Regards,
Karel


On 17 Sep 2008, at 17:10, Jo_ wrote:

>
> Yes. The postgis_1.4.0.jar is in the classpath.
>
>
> developercircle wrote:
>>
>> Do you have the postgis.jar in the classpath?
>>
>> _______________________________________________
>> hibernatespatial-users mailing list
>> [hidden email]
>> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/ 
>> hibernatespatial-users
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Can%27t-convert- 
> object-of-type-org.postgresql.util.PGobject-tp19491034p19534266.html
> Sent from the Hibernate Spatial - Users mailing list archive at  
> Nabble.com.
>
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/ 
> hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Jo
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

Jo
In reply to this post by Alexandre Walter Pretyman
Ok...

I think I get closer...

I print out the postgres driver version:
PostgreSQL 8.0devel JDBC3 with SSL (build 309)

I don't know where it is. I've placed the newer one in the classpath but eclipse/java
does't use this for org.postgresql.Driver .

The exception get threw for example the .list() method on my query.





Alexandre Walter Pretyman-2 wrote
Try with a jdbc3 driver, and let us know

-----Original Message-----
From: hibernatespatial-users-bounces@lists.hibernatespatial.org
[mailto:hibernatespatial-users-bounces@lists.hibernatespatial.org] On Behalf
Of Jo_
Sent: terça-feira, 16 de setembro de 2008 11:08
To: hibernatespatial-users@lists.hibernatespatial.org
Subject: Re: [hibernatespatial-users] Can't convert object of type
org.postgresql.util.PGobject


Sorry, my last reply doesn't followed the thread.

I use the http://jdbc.postgresql.org/download/postgresql-8.3-603.jdbc4.jar
driver.
Java 1.6 to connect to the database. The connection to the db without
hibernate and with hibernate is no problem. The problem only occurs when I
try to load an object from the spatial db.


There are my settings from the hibernate.properties file:

hibernate.connection.driver_class=org.postgis.DriverWrapper
hibernate.dialect=org.hibernatespatial.postgis.PostgisDialect
hibernate.connection.url=jdbc:postgresql://localhost/mydatabase

Jo


Andy Bailey-2 wrote:
>
> Jo,
>
> It may be that you are using the wrong driver to connect to the
> database. Can you post the hibernate configuration for the driver you
> are using.
>
> Andy Bailey
> http://www.hazlorealidad.com
>
> On Mon, 2008-09-15 at 13:14 +0200, Johannes Lauer wrote:
>> Hi,
>>
>> when I do a query on my postgres/postgis database and try to save it in a
>> List (like in the tutorial on
>> the hibernate spatial website) there comes an Exception:
>>
>> Exception in thread "main" java.lang.IllegalArgumentException: Can't
>> convert object of type org.postgresql.util.PGobject
>> at
>>
org.hibernatespatial.postgis.PGGeometryUserType.convert2JTS(PGGeometryUserTy
pe.java:123)
>> at
>>
org.hibernatespatial.AbstractDBGeometryType.nullSafeGet(AbstractDBGeometryTy
pe.java:127)
>> at
>>
org.hibernatespatial.GeometryUserType.nullSafeGet(GeometryUserType.java:170)
>> at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:128)
>> at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
>> at
>>
org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntit
yPersister.java:2124)
>> at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1404)
>> at
org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1332)
>> at org.hibernate.loader.Loader.getRow(Loader.java:1230)
>> at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:603)
>> at org.hibernate.loader.Loader.doQuery(Loader.java:724)
>> at
>>
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.ja
va:259)
>> at org.hibernate.loader.Loader.doList(Loader.java:2228)
>> at
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
>> at org.hibernate.loader.Loader.list(Loader.java:2120)
>> at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
>> at
>>
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
>> at
>>
org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
>> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
>> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
>> at
communication.postgresDB.PGGpsDBIO.retrieveTrk(PGGpsDBIO.java:191)
>> at util.test.HibernateTester.main(HibernateTester.java:51)
>>
>> I've found a similar post on the mailing list but nothing I've done
>> solved the problem.
>>
>> I'm using
>> hibernate 3.3.0SP1
>> hibernate spatial 1.0M2
>> hibernate-spatial-postgis-1.0-M2
>> hibernate-annotations 3.4.0.GA
>> postgis 1.4.0
>> postgres 8.3
>>
>> Kind Regards,
>>
>> Jo
>>
>>
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> hibernatespatial-users@lists.hibernatespatial.org
>
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-us
ers
>
>

--
View this message in context:
http://www.nabble.com/Can%27t-convert-object-of-type-org.postgresql.util.PGo
bject-tp19491034p19512621.html
Sent from the Hibernate Spatial - Users mailing list archive at Nabble.com.

_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@lists.hibernatespatial.org
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-us
ers

_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@lists.hibernatespatial.org
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

Alexandre Walter Pretyman
I use maven to manage my project libraries dependencies and from the maven quick start page configuration ( http://www.hibernatespatial.org/mavenquick.html ) the following pertinent libraries were downloaded:

hibernate-3.2.6.ga.jar
hibernate-spatial-1.0-M2.jar
hibernate-spatial-postgis-1.0-M2.jar
postgresql-8.1-407.jdbc3.jar
postgis-jdbc-1.1.6.jar

below follows my pom.xml if you want to give maven a try. You can always download the libraries with maven and import them into your current project.

I use the EntityManager library, so there is much stuff associated with it. You can try building a simpler pom.xml using this as a base, just remember to copy the repositories.

Regards,
Alexandre Pretyman


==== Pom.xml BEGIN ===========================

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>br.com.m2msolutions</groupId>
        <artifactId>FrotaSE</artifactId>
        <packaging>jar</packaging>
        <version>1.0-SNAPSHOT</version>
        <name>GisProjectTest</name>
        <url>http://maven.apache.org</url>
        <dependencies>
                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>3.8.1</version>
                        <scope>test</scope>
                </dependency>
                <dependency>
                        <groupId>org.geotools</groupId>
                        <artifactId>gt-main</artifactId>
                        <version>2.5-RC1</version>
                </dependency>
                <dependency>
                        <groupId>org.hibernatespatial</groupId>
                        <artifactId>hibernate-spatial-postgis</artifactId>
                        <version>1.0-M2</version>
                </dependency>
                <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-annotations</artifactId>
                        <version>3.3.1.GA</version>
                </dependency>
                <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-entitymanager</artifactId>
                        <version>3.3.2.GA</version>
                </dependency>
                <dependency>
                        <groupId>c3p0</groupId>
                        <artifactId>c3p0</artifactId>
                        <version>0.9.1.2</version>
                </dependency>
                <dependency>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                        <version>1.2.15</version>
                        <exclusions>
                                <exclusion>
                                        <groupId>com.sun.jdmk</groupId>
                                        <artifactId>jmxtools</artifactId>
                                </exclusion>
                                <exclusion>
                                        <groupId>javax.mail</groupId>
                                        <artifactId>mail</artifactId>
                                </exclusion>
                                <exclusion>
                                        <groupId>javax.jms</groupId>
                                        <artifactId>jms</artifactId>
                                </exclusion>
                                <exclusion>
                                        <groupId>com.sun.jmx</groupId>
                                        <artifactId>jmxri</artifactId>
                                </exclusion>
                        </exclusions>
                </dependency>
        </dependencies>


  <!-- =========================================================== -->
  <!--     Repositories (ibiblio, refractions...).                 -->
  <!--     This is where Maven looks for dependencies.             -->
  <!-- =========================================================== -->
        <repositories>
                <repository>
                        <snapshots>
                                <enabled>false</enabled>
                        </snapshots>
                        <id>ibiblio</id>
                        <name>Ibiblio - the public's library and digital archive</name>
                        <url>http://www.ibiblio.org/maven2</url>
                </repository>
                <repository>
                        <id>refractions</id>
                        <name>Refractions Research Maven 2 Repository</name>
                        <url>http://lists.refractions.net/m2</url>
                </repository>
                <repository>
                        <snapshots>
                                <enabled>false</enabled>
                        </snapshots>
                        <id>geotools</id>
                        <name>Geotools repository</name>
                        <url>http://maven.geotools.fr/repository</url>
                </repository>
                <repository>
                        <snapshots>
                                <enabled>false</enabled>
                        </snapshots>
                        <id>central</id>
                        <name>Maven Repository Switchboard</name>
                        <url>http://repo1.maven.org/maven2</url>
                </repository>
                <repository>
                        <id>Hibernate Spatial repo</id>
                        <url>http://www.hibernatespatial.org/repository</url>
                </repository>
                <repository>
                        <id>JBoss</id>
                        <url>http://repository.jboss.com/maven2</url>
                </repository>
        </repositories>
</project>

==== Pom.xml END ===========================

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Jo_
Sent: quarta-feira, 17 de setembro de 2008 13:03
To: [hidden email]
Subject: Re: [hibernatespatial-users] Can't convert object of type org.postgresql.util.PGobject


Ok...

I think I get closer...

I print out the postgres driver version:
PostgreSQL 8.0devel JDBC3 with SSL (build 309)

I don't know where it is. I've placed the newer one in the classpath but
eclipse/java
does't use this for org.postgresql.Driver .

The exception get threw for example the .list() method on my query.






Alexandre Walter Pretyman-2 wrote:

>
> Try with a jdbc3 driver, and let us know
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On
> Behalf
> Of Jo_
> Sent: terça-feira, 16 de setembro de 2008 11:08
> To: [hidden email]
> Subject: Re: [hibernatespatial-users] Can't convert object of type
> org.postgresql.util.PGobject
>
>
> Sorry, my last reply doesn't followed the thread.
>
> I use the http://jdbc.postgresql.org/download/postgresql-8.3-603.jdbc4.jar
> driver.
> Java 1.6 to connect to the database. The connection to the db without
> hibernate and with hibernate is no problem. The problem only occurs when I
> try to load an object from the spatial db.
>
>
> There are my settings from the hibernate.properties file:
>
> hibernate.connection.driver_class=org.postgis.DriverWrapper
> hibernate.dialect=org.hibernatespatial.postgis.PostgisDialect
> hibernate.connection.url=jdbc:postgresql://localhost/mydatabase
>
> Jo
>
>
> Andy Bailey-2 wrote:
>>
>> Jo,
>>
>> It may be that you are using the wrong driver to connect to the
>> database. Can you post the hibernate configuration for the driver you
>> are using.
>>
>> Andy Bailey
>> http://www.hazlorealidad.com
>>
>> On Mon, 2008-09-15 at 13:14 +0200, Johannes Lauer wrote:
>>> Hi,
>>>
>>> when I do a query on my postgres/postgis database and try to save it in
>>> a
>>> List (like in the tutorial on
>>> the hibernate spatial website) there comes an Exception:
>>>
>>> Exception in thread "main" java.lang.IllegalArgumentException: Can't
>>> convert object of type org.postgresql.util.PGobject
>>> at
>>>
> org.hibernatespatial.postgis.PGGeometryUserType.convert2JTS(PGGeometryUserTy
> pe.java:123)
>>> at
>>>
> org.hibernatespatial.AbstractDBGeometryType.nullSafeGet(AbstractDBGeometryTy
> pe.java:127)
>>> at
>>>
> org.hibernatespatial.GeometryUserType.nullSafeGet(GeometryUserType.java:170)
>>> at org.hibernate.type.CustomType.nullSafeGet(CustomType.java:128)
>>> at org.hibernate.type.AbstractType.hydrate(AbstractType.java:105)
>>> at
>>>
> org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntit
> yPersister.java:2124)
>>> at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1404)
>>> at
> org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1332)
>>> at org.hibernate.loader.Loader.getRow(Loader.java:1230)
>>> at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:603)
>>> at org.hibernate.loader.Loader.doQuery(Loader.java:724)
>>> at
>>>
> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.ja
> va:259)
>>> at org.hibernate.loader.Loader.doList(Loader.java:2228)
>>> at
> org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
>>> at org.hibernate.loader.Loader.list(Loader.java:2120)
>>> at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
>>> at
>>>
> org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
>>> at
>>>
> org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
>>> at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
>>> at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
>>> at
> communication.postgresDB.PGGpsDBIO.retrieveTrk(PGGpsDBIO.java:191)
>>> at util.test.HibernateTester.main(HibernateTester.java:51)
>>>
>>> I've found a similar post on the mailing list but nothing I've done
>>> solved the problem.
>>>
>>> I'm using
>>> hibernate 3.3.0SP1
>>> hibernate spatial 1.0M2
>>> hibernate-spatial-postgis-1.0-M2
>>> hibernate-annotations 3.4.0.GA
>>> postgis 1.4.0
>>> postgres 8.3
>>>
>>> Kind Regards,
>>>
>>> Jo
>>>
>>>
>>
>>
>> _______________________________________________
>> hibernatespatial-users mailing list
>> [hidden email]
>>
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-us
> ers
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Can%27t-convert-object-of-type-org.postgresql.util.PGo
> bject-tp19491034p19512621.html
> Sent from the Hibernate Spatial - Users mailing list archive at
> Nabble.com.
>
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-us
> ers
>
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
>
>

--
View this message in context: http://www.nabble.com/Can%27t-convert-object-of-type-org.postgresql.util.PGobject-tp19491034p19535508.html
Sent from the Hibernate Spatial - Users mailing list archive at Nabble.com.

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

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Jo
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

Jo
In reply to this post by Karel Maesen
Hi Karel,

I've found one Postgres JDBC Driver. I deleted the jar (it was at the java system lib dir)
But there must be even another one. (see log)

The curious is:
When I delete my postgresJDBC driver from the classpath, I can't get
org.postgresql.Driver.getVersion() (think that's ok, because this package isn't in the classpath).

But the log4J output from hibernate gives me:
18.09.2008 11:32:32 org.hibernate.cfg.SettingsFactory buildSettings
INFO: RDBMS: PostgreSQL, version: 8.3.1
18.09.2008 11:32:32 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.1 JDBC3 with SSL (build 407)
18.09.2008 11:32:32 org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernatespatial.postgis.PostgisDialect

Don't know where I have to found this driver to kill it.

The "positive" is, that the Exception has changed to:
8.09.2008 11:32:33 org.hibernate.util.JDBCExceptionReporter logExceptions
WARNUNG: SQL Error: 0, SQLState: null
18.09.2008 11:32:33 org.hibernate.util.JDBCExceptionReporter logExceptions
SCHWERWIEGEND: Unknown type: 0101000020E610000082E2C798BBB62640A4DFBE0E9CAB4940
org.hibernate.exception.GenericJDBCException: could not execute query
        at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)

Perhaps it is the false postgres JDBC driver for Java 1.6.

Regards,

jo

Karel Maesen wrote
Hi Jo,

I see that you use Hibernate 3.3.0SP1. Could you try to use a 3.2.x  
version ? I received from some other users that they have problems  
with that new version.

I would also recommend that you use a somewhat older version of the  
postgis.jar. I haven't yet tested with the 1.4 release.

Regards,
Karel


On 17 Sep 2008, at 17:10, Jo_ wrote:

>
> Yes. The postgis_1.4.0.jar is in the classpath.
>
>
> developercircle wrote:
>>
>> Do you have the postgis.jar in the classpath?
>>
>> _______________________________________________
>> hibernatespatial-users mailing list
>> hibernatespatial-users@lists.hibernatespatial.org
>> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/ 
>> hibernatespatial-users
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Can%27t-convert- 
> object-of-type-org.postgresql.util.PGobject-tp19491034p19534266.html
> Sent from the Hibernate Spatial - Users mailing list archive at  
> Nabble.com.
>
> _______________________________________________
> hibernatespatial-users mailing list
> hibernatespatial-users@lists.hibernatespatial.org
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/ 
> hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@lists.hibernatespatial.org
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

Karel Maesen
Administrator
Jo,

I'm not certain I understand. Could you list what versions you have  
on the claspath of the postgresql JDBC, postgis, and hibernate  
libraries?

Regards,

Karel

On 18 Sep 2008, at 11:53, Jo_ wrote:

>
> Hi Karel,
>
> I've found one Postgres JDBC Driver. I deleted the jar (it was at  
> the java
> system lib dir)
> But there must be even another one. (see log)
>
> The curious is:
> When I delete my postgresJDBC driver from the classpath, I can't get
> org.postgresql.Driver.getVersion() (think that's ok, because this  
> package
> isn't in the classpath).
>
> But the log4J output from hibernate gives me:
> 18.09.2008 11:32:32 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: RDBMS: PostgreSQL, version: 8.3.1
> 18.09.2008 11:32:32 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: JDBC driver: PostgreSQL Native Driver, version: PostgreSQL  
> 8.1 JDBC3
> with SSL (build 407)
> 18.09.2008 11:32:32 org.hibernate.dialect.Dialect <init>
> INFO: Using dialect: org.hibernatespatial.postgis.PostgisDialect
>
> Don't know where I have to found this driver to kill it.
>
> The "positive" is, that the Exception has changed to:
> 8.09.2008 11:32:33 org.hibernate.util.JDBCExceptionReporter  
> logExceptions
> WARNUNG: SQL Error: 0, SQLState: null
> 18.09.2008 11:32:33 org.hibernate.util.JDBCExceptionReporter  
> logExceptions
> SCHWERWIEGEND: Unknown type:
> 0101000020E610000082E2C798BBB62640A4DFBE0E9CAB4940
> org.hibernate.exception.GenericJDBCException: could not execute query
> at
> org.hibernate.exception.SQLStateConverter.handledNonSpecificException(
> SQLStateConverter.java:126)
>
> Perhaps it is the false postgres JDBC driver for Java 1.6.
>
> Regards,
>
> jo
>
>
> Karel Maesen wrote:
>>
>> Hi Jo,
>>
>> I see that you use Hibernate 3.3.0SP1. Could you try to use a 3.2.x
>> version ? I received from some other users that they have problems
>> with that new version.
>>
>> I would also recommend that you use a somewhat older version of the
>> postgis.jar. I haven't yet tested with the 1.4 release.
>>
>> Regards,
>> Karel
>>
>>
>> On 17 Sep 2008, at 17:10, Jo_ wrote:
>>
>>>
>>> Yes. The postgis_1.4.0.jar is in the classpath.
>>>
>>>
>>> developercircle wrote:
>>>>
>>>> Do you have the postgis.jar in the classpath?
>>>>
>>>> _______________________________________________
>>>> hibernatespatial-users mailing list
>>>> [hidden email]
>>>> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/
>>>> hibernatespatial-users
>>>>
>>>>
>>>
>>> --
>>> View this message in context: http://www.nabble.com/Can%27t-convert-
>>> object-of-type-org.postgresql.util.PGobject-tp19491034p19534266.html
>>> Sent from the Hibernate Spatial - Users mailing list archive at
>>> Nabble.com.
>>>
>>> _______________________________________________
>>> hibernatespatial-users mailing list
>>> [hidden email]
>>> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/
>>> hibernatespatial-users
>>
>> _______________________________________________
>> hibernatespatial-users mailing list
>> [hidden email]
>> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/ 
>> hibernatespatial-users
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Can%27t-convert- 
> object-of-type-org.postgresql.util.PGobject-tp19491034p19549460.html
> Sent from the Hibernate Spatial - Users mailing list archive at  
> Nabble.com.
>
> _______________________________________________
> hibernatespatial-users mailing list
> [hidden email]
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/ 
> hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Jo
Reply | Threaded
Open this post in threaded view
|

Re: Can't convert object of type org.postgresql.util.PGobject

Jo
Yeah! ... It works!!!

It was a problem with the imported libs from the geotools project.
I deleted all libs and imported only those which I use.
Somewhere in the geotools must be another pgsql JDBC driver which is getting
loaded before the one that I placed in the project lib directory.

I now use
hibernate 3.3 and postgis 1.4 . and JDBC4 for Postgres 8.3 and Java 1.6

Thank you all for the hints!!!

Jo

Karel Maesen wrote
Jo,

I'm not certain I understand. Could you list what versions you have  
on the claspath of the postgresql JDBC, postgis, and hibernate  
libraries?

Regards,

Karel

On 18 Sep 2008, at 11:53, Jo_ wrote:

>
> Hi Karel,
>
> I've found one Postgres JDBC Driver. I deleted the jar (it was at  
> the java
> system lib dir)
> But there must be even another one. (see log)
>
> The curious is:
> When I delete my postgresJDBC driver from the classpath, I can't get
> org.postgresql.Driver.getVersion() (think that's ok, because this  
> package
> isn't in the classpath).
>
> But the log4J output from hibernate gives me:
> 18.09.2008 11:32:32 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: RDBMS: PostgreSQL, version: 8.3.1
> 18.09.2008 11:32:32 org.hibernate.cfg.SettingsFactory buildSettings
> INFO: JDBC driver: PostgreSQL Native Driver, version: PostgreSQL  
> 8.1 JDBC3
> with SSL (build 407)
> 18.09.2008 11:32:32 org.hibernate.dialect.Dialect <init>
> INFO: Using dialect: org.hibernatespatial.postgis.PostgisDialect
>
> Don't know where I have to found this driver to kill it.
>
> The "positive" is, that the Exception has changed to:
> 8.09.2008 11:32:33 org.hibernate.util.JDBCExceptionReporter  
> logExceptions
> WARNUNG: SQL Error: 0, SQLState: null
> 18.09.2008 11:32:33 org.hibernate.util.JDBCExceptionReporter  
> logExceptions
> SCHWERWIEGEND: Unknown type:
> 0101000020E610000082E2C798BBB62640A4DFBE0E9CAB4940
> org.hibernate.exception.GenericJDBCException: could not execute query
> at
> org.hibernate.exception.SQLStateConverter.handledNonSpecificException(
> SQLStateConverter.java:126)
>
> Perhaps it is the false postgres JDBC driver for Java 1.6.
>
> Regards,
>
> jo
>
>
> Karel Maesen wrote:
>>
>> Hi Jo,
>>
>> I see that you use Hibernate 3.3.0SP1. Could you try to use a 3.2.x
>> version ? I received from some other users that they have problems
>> with that new version.
>>
>> I would also recommend that you use a somewhat older version of the
>> postgis.jar. I haven't yet tested with the 1.4 release.
>>
>> Regards,
>> Karel
>>
>>
>> On 17 Sep 2008, at 17:10, Jo_ wrote:
>>
>>>
>>> Yes. The postgis_1.4.0.jar is in the classpath.
>>>
>>>
>>> developercircle wrote:
>>>>
>>>> Do you have the postgis.jar in the classpath?
>>>>
>>>> _______________________________________________
>>>> hibernatespatial-users mailing list
>>>> hibernatespatial-users@lists.hibernatespatial.org
>>>> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/
>>>> hibernatespatial-users
>>>>
>>>>
>>>
>>> --
>>> View this message in context: http://www.nabble.com/Can%27t-convert-
>>> object-of-type-org.postgresql.util.PGobject-tp19491034p19534266.html
>>> Sent from the Hibernate Spatial - Users mailing list archive at
>>> Nabble.com.
>>>
>>> _______________________________________________
>>> hibernatespatial-users mailing list
>>> hibernatespatial-users@lists.hibernatespatial.org
>>> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/
>>> hibernatespatial-users
>>
>> _______________________________________________
>> hibernatespatial-users mailing list
>> hibernatespatial-users@lists.hibernatespatial.org
>> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/ 
>> hibernatespatial-users
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Can%27t-convert- 
> object-of-type-org.postgresql.util.PGobject-tp19491034p19549460.html
> Sent from the Hibernate Spatial - Users mailing list archive at  
> Nabble.com.
>
> _______________________________________________
> hibernatespatial-users mailing list
> hibernatespatial-users@lists.hibernatespatial.org
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/ 
> hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@lists.hibernatespatial.org
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Hi, Jo I need Help

bardock2210
In reply to this post by Jo
Hi Jo, I need help with a query i'm using to try to connect with a geometry DB column, i'm using the function "AsText" with the hibernate dialect HQL and my method looks like this:

createQuery

but I have an error, I'm new in this, if you could help me, I'll be grateful...

the error is the next: