NutzCN Logo
问答 缓存序列化的问题
发布于 3221天前 作者 Rekoe 2172 次浏览 复制 上一个帖子 下一个帖子
标签:

如题

org.nutz.plugins.cache.dao.impl.convert.JavaCacheSerializer.from(JavaCacheSerializer.java:30) INFO  - Object to bytes fail
java.io.NotSerializableException: org.nutz.dao.jdbc.ReadOnceInputStream
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
	at org.nutz.plugins.cache.dao.impl.convert.JavaCacheSerializer.from(JavaCacheSerializer.java:27)
	at org.nutz.plugins.cache.dao.impl.provider.EhcacheDaoCacheProvider.put(EhcacheDaoCacheProvider.java:28)
	at org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:144)
	at org.nutz.dao.impl.DaoSupport$DaoExec.invoke(DaoSupport.java:281)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:64)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:204)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:236)
	at org.nutz.dao.impl.NutDao.fetch(NutDao.java:551)
	at com.app.service.PayReceiptService.getReceiptByTransactionId(PayReceiptService.java:33)
	at com.app.module.pay.AbstractPayAction.doPay(AbstractPayAction.java:193)
	at com.app.module.pay.uc.UCPayAction.doPays(UCPayAction.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:25)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:40)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.integration.shiro.NutShiroProcessor.process(NutShiroProcessor.java:51)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:119)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:196)
	at com.rekoe.mvc.RkCmsNutFilter.doFilter(RkCmsNutFilter.java:40)
	at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:89)
	at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:89)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:89)
	at com.caucho.server.httpcache.ProxyCacheFilterChain.doFilter(ProxyCacheFilterChain.java:170)
	at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
	at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
	at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:838)
	at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1345)
	at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1301)
	at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1285)
	at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1193)
	at com.caucho.network.listen.TcpSocketLink.handleAcceptTaskImpl(TcpSocketLink.java:992)
	at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:117)
	at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:93)
	at com.caucho.network.listen.SocketLinkThreadLauncher.handleTasks(SocketLinkThreadLauncher.java:169)
	at com.caucho.network.listen.TcpSocketAcceptThread.run(TcpSocketAcceptThread.java:61)
	at com.caucho.env.thread2.ResinThread2.runTasks(ResinThread2.java:173)
	at com.caucho.env.thread2.ResinThread2.run(ResinThread2.java:118)
2016-01-21 21:15:27,238 com.app.module.pay.AbstractPayAction.doPay(AbstractPayAction.java:243) ERROR - verifyTransaction
6 回复

恩,看看怎么加上吧


那这个表 我暂时先不用缓存

这种 不是 pojo 加上 implement Serializable 就行的吗?

有个属性 nutz特殊处理的 不允许序列化

第一行

java.io.NotSerializableException: org.nutz.dao.jdbc.ReadOnceInputStream
添加回复
请先登陆
回到顶部