Could not deserialize exception

5 Messages Forum Options Options
Embed this topic
Permalink
{-}
Could not deserialize exception
Reply Threaded MoreMore options
Print post
Permalink
Hello,
I'm trying to query via hibernate to a table that has a postgis geometry field, I followed the tutorial, my environment is jboss 5 , suse linux, ejb3, postgre 8.1, jdk 1.6 I get this:
 INFO  [SerializableType] could not read column value from result set: geom; could not deserialize
...

 javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize
12:07:30,550 ERROR [STDERR]     at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:630)
12:07:30,551 ERROR [STDERR]     at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:74)
....
 Caused by: java.io.StreamCorruptedException: invalid stream header: 30313031
12:07:30,555 ERROR [STDERR]     at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
12:07:30,555 ERROR [STDERR]     at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
12:07:30,555 ERROR [STDERR]     at org.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:252)
12:07:30,555 ERROR [STDERR]     at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:209)



_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@...
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Scheidt
Re: Could not deserialize exception
Reply Threaded MoreMore options
Print post
Permalink
Does your classes implements Serializable?




On Wed, Jun 18, 2008 at 6:37 AM, {-} <125003@...> wrote:
Hello,
I'm trying to query via hibernate to a table that has a postgis geometry field, I followed the tutorial, my environment is jboss 5 , suse linux, ejb3, postgre 8.1, jdk 1.6 I get this:
 INFO  [SerializableType] could not read column value from result set: geom; could not deserialize
...

 javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize
12:07:30,550 ERROR [STDERR]     at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:630)
12:07:30,551 ERROR [STDERR]     at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:74)
....
 Caused by: java.io.StreamCorruptedException: invalid stream header: 30313031
12:07:30,555 ERROR [STDERR]     at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
12:07:30,555 ERROR [STDERR]     at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
12:07:30,555 ERROR [STDERR]     at org.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:252)
12:07:30,555 ERROR [STDERR]     at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:209)



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



_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@...
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
{-}
Re: Could not deserialize exception
Reply Threaded MoreMore options
Print post
Permalink
Well, yes, the one in the specified in the type mapping is :
org.hibernatespatial.GeometryUserType
and in the java file is declared as jts Geometry

2008/6/18 Felippe Scheidt <felippescheidt@...>:
Does your classes implements Serializable?




On Wed, Jun 18, 2008 at 6:37 AM, {-} <125003@...> wrote:
Hello,
I'm trying to query via hibernate to a table that has a postgis geometry field, I followed the tutorial, my environment is jboss 5 , suse linux, ejb3, postgre 8.1, jdk 1.6 I get this:
 INFO  [SerializableType] could not read column value from result set: geom; could not deserialize
...

 javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize
12:07:30,550 ERROR [STDERR]     at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:630)
12:07:30,551 ERROR [STDERR]     at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:74)
....
 Caused by: java.io.StreamCorruptedException: invalid stream header: 30313031
12:07:30,555 ERROR [STDERR]     at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
12:07:30,555 ERROR [STDERR]     at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
12:07:30,555 ERROR [STDERR]     at org.hibernate.util.SerializationHelper$CustomObjectInputStream.<init>(SerializationHelper.java:252)
12:07:30,555 ERROR [STDERR]     at org.hibernate.util.SerializationHelper.deserialize(SerializationHelper.java:209)



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



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



_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@...
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Karel Maesen
Re: Could not deserialize exception
Reply Threaded MoreMore options
Print post
Permalink

The underlying exception is a StreamCorruptedException. That makes me  
think that the problem is not with the Hibernate Spatial code, but  
with your app. server set up. These kind of exceptions occur when  
some component tries to read an object stream, but this stream is not  
laid out as expected.

Regards,

Karel Maesen


On 18 Jun 2008, at 13:13, {-} wrote:

> Well, yes, the one in the specified in the type mapping is :
> org.hibernatespatial.GeometryUserType
> and in the java file is declared as jts Geometry
>
> 2008/6/18 Felippe Scheidt <felippescheidt@...>:
> Does your classes implements Serializable?
>
>
>
>
> On Wed, Jun 18, 2008 at 6:37 AM, {-} <125003@...> wrote:
> Hello,
> I'm trying to query via hibernate to a table that has a postgis  
> geometry field, I followed the tutorial, my environment is jboss  
> 5 , suse linux, ejb3, postgre 8.1, jdk 1.6 I get this:
>  INFO  [SerializableType] could not read column value from result  
> set: geom; could not deserialize
> ...
>
>  javax.persistence.PersistenceException:  
> org.hibernate.type.SerializationException: could not deserialize
> 12:07:30,550 ERROR [STDERR]     at  
> org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(
> AbstractEntityManagerImpl.java:630)
> 12:07:30,551 ERROR [STDERR]     at  
> org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:74)
> ....
>  Caused by: java.io.StreamCorruptedException: invalid stream  
> header: 30313031
> 12:07:30,555 ERROR [STDERR]     at  
> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
> 12:07:30,555 ERROR [STDERR]     at java.io.ObjectInputStream.<init>
> (ObjectInputStream.java:280)
> 12:07:30,555 ERROR [STDERR]     at  
> org.hibernate.util.SerializationHelper
> $CustomObjectInputStream.<init>(SerializationHelper.java:252)
> 12:07:30,555 ERROR [STDERR]     at  
> org.hibernate.util.SerializationHelper.deserialize
> (SerializationHelper.java:209)
>
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> hibernatespatial-users@...
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/ 
> hibernatespatial-users
>
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> hibernatespatial-users@...
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/ 
> hibernatespatial-users
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> hibernatespatial-users@...
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/ 
> hibernatespatial-users

_______________________________________________
hibernatespatial-users mailing list
hibernatespatial-users@...
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
{-}
Re: Could not deserialize exception
Reply Threaded MoreMore options
Print post
Permalink
Sorry, I replyed wrong post a moment ago...
My problem was that I was using both javax annotations and hbm.xml files, after only using annotations with also org.hibernate.type anno, worked fine. at least in deploying.
thanks all

2008/6/19 Karel Maesen <karel@...>:

The underlying exception is a StreamCorruptedException. That makes me
think that the problem is not with the Hibernate Spatial code, but
with your app. server set up. These kind of exceptions occur when
some component tries to read an object stream, but this stream is not
laid out as expected.

Regards,

Karel Maesen


On 18 Jun 2008, at 13:13, {-} wrote:

> Well, yes, the one in the specified in the type mapping is :
> org.hibernatespatial.GeometryUserType
> and in the java file is declared as jts Geometry
>
> 2008/6/18 Felippe Scheidt <felippescheidt@...>:
> Does your classes implements Serializable?
>
>
>
>
> On Wed, Jun 18, 2008 at 6:37 AM, {-} <125003@...> wrote:
> Hello,
> I'm trying to query via hibernate to a table that has a postgis
> geometry field, I followed the tutorial, my environment is jboss
> 5 , suse linux, ejb3, postgre 8.1, jdk 1.6 I get this:
>  INFO  [SerializableType] could not read column value from result
> set: geom; could not deserialize
> ...
>
>  javax.persistence.PersistenceException:
> org.hibernate.type.SerializationException: could not deserialize
> 12:07:30,550 ERROR [STDERR]     at
> org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(
> AbstractEntityManagerImpl.java:630)
> 12:07:30,551 ERROR [STDERR]     at
> org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:74)
> ....
>  Caused by: java.io.StreamCorruptedException: invalid stream
> header: 30313031
> 12:07:30,555 ERROR [STDERR]     at
> java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:783)
> 12:07:30,555 ERROR [STDERR]     at java.io.ObjectInputStream.<init>
> (ObjectInputStream.java:280)
> 12:07:30,555 ERROR [STDERR]     at
> org.hibernate.util.SerializationHelper
> $CustomObjectInputStream.<init>(SerializationHelper.java:252)
> 12:07:30,555 ERROR [STDERR]     at
> org.hibernate.util.SerializationHelper.deserialize
> (SerializationHelper.java:209)
>
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> hibernatespatial-users@...
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/
> hibernatespatial-users
>
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> hibernatespatial-users@...
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/
> hibernatespatial-users
>
>
> _______________________________________________
> hibernatespatial-users mailing list
> hibernatespatial-users@...
> http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/
> hibernatespatial-users

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


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