java.io.NotSerializableException: org.hibernatespatial.postgis.PostgisDialect

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

java.io.NotSerializableException: org.hibernatespatial.postgis.PostgisDialect

Farrukh Najmi
Dear colleagues,

I am trying to use hibernate second level cache with my spatial queries
but finding that I am getting java.io.NotSerializableException resulting
in objects not being serialized to disk and instead being evicted.

First, it was org.hibernatespatial.GeometryUserType. So I moved up to
hibernate-spatial 1.0 which had made the GeometryUserType class
implement Serializable. This fixed the problem (good).

However, now I am getting the same issue with
org.hibernatespatial.postgis.PostgisDialect class.

Is this a known issue or shall I file one?

Here is the stack trace....

java.io.NotSerializableException:
org.hibernatespatial.postgis.PostgisDialect
         at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
         at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
         at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
         at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
         at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
         at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
         at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
         at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
         at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
         at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
         at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
         at java.util.HashMap.writeObject(HashMap.java:1001)
         at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
         at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
         at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
         at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
         at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
         at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
         at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
         at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416)
         at net.sf.ehcache.Element.writeObject(Element.java:787)
         at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
         at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
         at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
         at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
         at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
         at
net.sf.ehcache.util.MemoryEfficientByteArrayOutputStream.serialize(MemoryEfficientByteArrayOutputStream.java:97)
         at
net.sf.ehcache.store.compound.factories.DiskStorageFactory.serializeElement(DiskStorageFactory.java:327)
         at
net.sf.ehcache.store.compound.factories.DiskStorageFactory.write(DiskStorageFactory.java:306)
         at
net.sf.ehcache.store.compound.factories.DiskStorageFactory$DiskWriteTask.call(DiskStorageFactory.java:412)
         at
net.sf.ehcache.store.compound.factories.DiskOverflowStorageFactory$OverflowDiskWriteTask.call(DiskOverflowStorageFactory.java:247)
         at
net.sf.ehcache.store.compound.factories.DiskOverflowStorageFactory$OverflowDiskWriteTask.call(DiskOverflowStorageFactory.java:236)

--
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com


_______________________________________________
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: java.io.NotSerializableException: org.hibernatespatial.postgis.PostgisDialect

Farrukh Najmi

Added the following issue:

http://www.hibernatespatial.org/jira/browse/HIBSPA-74

Karel, any chance a quick minor release could be done that has the fix?
Thanks for your consideration.

On 01/03/2011 03:55 PM, Farrukh Najmi wrote:

> I am trying to use hibernate second level cache with my spatial
> queries but finding that I am getting java.io.NotSerializableException
> resulting in objects not being serialized to disk and instead being
> evicted.
>
> First, it was org.hibernatespatial.GeometryUserType. So I moved up to
> hibernate-spatial 1.0 which had made the GeometryUserType class
> implement Serializable. This fixed the problem (good).
>
> However, now I am getting the same issue with
> org.hibernatespatial.postgis.PostgisDialect class.
>
> Is this a known issue or shall I file one?
>
> Here is the stack trace....
>
> java.io.NotSerializableException:
> org.hibernatespatial.postgis.PostgisDialect
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
>         at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
>         at java.io.ObjectOutputStream.writeSerialData(ObjectO


--
Regards,
Farrukh Najmi

Web: http://www.wellfleetsoftware.com


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