Quantcast

Could not deserialize exception

classic Classic list List threaded Threaded
5 messages Options
{-}
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Could not deserialize exception

{-}
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
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Could not deserialize exception

Scheidt
Does your classes implements Serializable?




On Wed, Jun 18, 2008 at 6:37 AM, {-} <[hidden email]> 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
[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
{-}
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Could not deserialize exception

{-}
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 <[hidden email]>:
Does your classes implements Serializable?




On Wed, Jun 18, 2008 at 6:37 AM, {-} <[hidden email]> 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
[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



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

Re: Could not deserialize exception

Karel Maesen
Administrator

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 <[hidden email]>:
> Does your classes implements Serializable?
>
>
>
>
> On Wed, Jun 18, 2008 at 6:37 AM, {-} <[hidden email]> 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
> [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
>
>
> _______________________________________________
> 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
{-}
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Could not deserialize exception

{-}
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 <[hidden email]>:

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 <[hidden email]>:
> Does your classes implements Serializable?
>
>
>
>
> On Wed, Jun 18, 2008 at 6:37 AM, {-} <[hidden email]> 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
> [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
>
>
> _______________________________________________
> 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


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