ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Munat <b...@munat.com>
Subject Re: java.io.NotSerializableException: com.ibatis.db.sqlmap.LazyLoadList
Date Wed, 23 Aug 2006 17:32:04 GMT
I think the problem is in the underlying jdk classes used by 
LazyLoadList... seems like someone here told me that before.

b

Chris Lamey wrote:
> Looks to me like com.ibatis.db.sqlmap.LazyLoadList isn't Serializable,
> so you can't use it in your distributed cache.  If you have the 1.x
> iBATIS source around, you could verify that.
> 
> I'm not sure why you're thinking java.lang.Object is the culprit...the
> method java.util.ArrayList.writeObject is overloaded for serialization,
> it doesn't mean it's trying to write out java.lang.Object.
> 
> I do know 1.x isn't supported anymore and so you're likely to have
> trouble getting help.
> 
> However, I don't know 1.x at all...is there a way to turn lazy loading
> off?
> 
> On Wed, 2006-08-23 at 13:10 -0400, Khanna, Vijay (GE, Corporate,
> consultant) wrote:
>> Hi,
>>  
>> Any help on this issue please ?
>>  
>> Thanks,
>> Vijay 
>>
>>
>> ______________________________________________________________________
>> From: Khanna, Vijay (GE, Corporate, consultant) 
>> Sent: Wednesday, August 23, 2006 10:22 AM
>> To: user-java@ibatis.apache.org
>> Subject: java.io.NotSerializableException:
>> com.ibatis.db.sqlmap.LazyLoadList
>>
>>
>>
>> Hello,
>>  
>> We are using Ibatis 1.x along with JBoss cache. Now when the
>> application is run in clustered environment and the Cache & session
>> replication happens, we are getting an error from Ibatis.
>> "java.io.NotSerializableException:
>> com.ibatis.db.sqlmap.LazyLoadList" . I checked within the application
>> code to find if we are using any instance of java.lang.Object, but
>> could not find any... 
>>  
>> From the stacktrace below, it seems that and instance of
>> 'java.lang.Object' is present in the list and thats where the problem
>> is...
>>  
>> I checked Ibatis 2.x and noticed this problem does not occur. But due
>> to some reasons, we do not wish to move to 2.x but would like a
>> solution for this. Help from the Ibatis's Gurus appreciated !
>>  
>> Heres the detailed stack..
>>  
>> 10:14:16,764 INFO [STDOUT] java.io.NotSerializableException:
>> com.ibatis.db.sqlmap.LazyLoadList
>>
>> 10:14:16,764 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
>>
>> 10:14:16,764 INFO [STDOUT] at
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
>>
>> 10:14:16,764 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
>>
>> 10:14:16,764 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.util.ArrayList.writeObject(ArrayList.java:529)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> sun.reflect.GeneratedMethodAccessor226.invoke(Unknown Source)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.lang.reflect.Method.invoke(Method.java:324)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.util.HashMap.writeObject(HashMap.java:978)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.lang.reflect.Method.invoke(Method.java:324)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.jboss.web.tomcat.tc5.session.SessionBasedClusteredSession.writeExternal(SessionBasedClusteredSession.java:288)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.jboss.web.tomcat.tc5.session.JBossCacheService.externalizeSession(JBossCacheService.java:771)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.jboss.web.tomcat.tc5.session.JBossCacheService.putSession(JBossCacheService.java:229)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.jboss.web.tomcat.tc5.session.SessionBasedClusteredSession.processSessionRepl(SessionBasedClusteredSession.java:165)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.jboss.web.tomcat.tc5.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:606)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.jboss.web.tomcat.tc5.session.JBossCacheManager.storeSession(JBossCacheManager.java:375)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.jboss.web.tomcat.tc5.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:38)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:91)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
>>
>> 10:14:16,780 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol
>> $Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>>
>> 10:14:16,780 INFO [STDOUT] at
>> org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
>>
>> 10:14:16,780 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
>>
>>
>>  
>> Thanks,
>> Vijay
>>  

Mime
View raw message