开发者社区> 问答> 正文

DiskStorageFactory 报错!!!!求指教?报错

@JFinal 你好,想跟你请教个问题: 测式环境不会报错,但正式环境一直报这个错误???求指教


2014-07-09 17:19:33 [net.sf.ehcache.store.disk.DiskStorageFactory] Disk Write of 88481de6-b078-4962-b925-1f7f1e8b3c3c failed:  -(:503)
 java.io.NotSerializableException: com.jfinal.log.Log4jLogger
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
at java.util.HashMap.writeObject(HashMap.java:1133)
at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1495)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
at org.apache.shiro.session.mgt.SimpleSession.writeObject(SimpleSession.java:461)
at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1495)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:440)
at net.sf.ehcache.Element.writeObject(Element.java:797)
at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1495)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
at net.sf.ehcache.util.MemoryEfficientByteArrayOutputStream.serialize(MemoryEfficientByteArrayOutputStream.java:97)
at net.sf.ehcache.store.disk.DiskStorageFactory.serializeElement(DiskStorageFactory.java:413)
at net.sf.ehcache.store.disk.DiskStorageFactory.write(DiskStorageFactory.java:392)
at net.sf.ehcache.store.disk.DiskStorageFactory$DiskWriteTask.call(DiskStorageFactory.java:493)
at net.sf.ehcache.store.disk.DiskStorageFactory$PersistentDiskWriteTask.call(DiskStorageFactory.java:1154)
at net.sf.ehcache.store.disk.DiskStorageFactory$PersistentDiskWriteTask.call(DiskStorageFactory.java:1138)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
2014-07-09 17:19:33 [net.sf.ehcache.store.disk.DiskStorageFactory] Disk Write of 88481de6-b078-4962-b925-1f7f1e8b3c3c failed:  -(:503)

展开
收起
爱吃鱼的程序员 2020-06-20 16:39:25 732 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    你需要缓存的数据没有实现序列化接口<divclass='ref'><divclass='ref'>

    引用来自“JFinal”的评论

    被缓存对象的类需要实现 <spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14.399999618530273px;line-height:22px;background-color:#FFFFFF;">Serializable接口被缓存对象的类需要实现 <spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14.399999618530273px;line-height:22px;background-color:#FFFFFF;">Serializable接口 mybatis-ehcache的高版本的问题,换成 mybatis-ehcache-1.0.1.jar就可以解决问题了!<divclass='ref'>

    引用来自“JFinal”的评论

    被缓存对象的类需要实现 <spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14.399999618530273px;line-height:22px;background-color:#FFFFFF;">Serializable接口<divclass='ref'><divclass='ref'><divclass='ref'>

    引用来自“JFinal”的评论

    被缓存对象的类需要实现 <spanstyle="font-family:微软雅黑,Verdana,sans-serif,宋体;font-size:14.399999618530273px;line-height:22px;background-color:#FFFFFF;">Serializable接口

    2020-06-20 16:39:43
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载