NutzCN Logo
问答 集成dubbo 以后,传递的参数必须序列化吗
发布于 2558天前 作者 13080918283 6006 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk
com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method upload2local in the service com.supermap.file.IUploadService. Tried 3 times of the providers 192.168.11.231:20880 from the registry 192.168.11.231:2181 on the consumer 192.168.11.231 using the dubbo version 2.5.8. Last error is: Failed to invoke remote method: upload2local, provider: dubbo://192.168.11.231:20880/com.supermap.file.IUploadService?anyhost=true&application=file-consumer&check=false&dubbo=2.5.8&generic=false&interface=com.supermap.file.IUploadService&methods=upload2local,upload2mongoDB,upload2DB&pid=11808®ister.ip=192.168.11.231&remote.timestamp=1513910256573&revision=2.0-SNAPSHOT&side=consumer×tamp=1513910332328, cause: Failed to send message Request [id=46, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=upload2local, parameterTypes=[class org.nutz.mvc.upload.TempFile, class java.lang.String], arguments=[org.nutz.mvc.upload.TempFile@6c9d19d2, null], attachments={path=com.supermap.file.IUploadService, interface=com.supermap.file.IUploadService, version=0.0.0}]] to /192.168.11.231:20880, cause: Serialized class org.nutz.mvc.upload.TempFile must implement java.io.Serializable
 at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:101)
 at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:229)
 at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72)
 at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)
 at com.alibaba.dubbo.common.bytecode.proxy0.upload2local(proxy0.java)
 at com.supermap.file.controllers.UploadController.upload(UploadController.java:83)
 at com.supermap.file.controllers.UploadController$FM$upload$a505705cc09e72e3a67f7bb579aafe02.invoke(UploadController.java)
 at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31)
 at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
 at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:30)
 at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
 at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
 at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
 at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
 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:202)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
 at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)
 at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
 at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
 at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861)
 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
 at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run(Thread.java:745)
Caused by: com.alibaba.dubbo.remoting.RemotingException: Failed to send message Request [id=46, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=upload2local, parameterTypes=[class org.nutz.mvc.upload.TempFile, class java.lang.String], arguments=[org.nutz.mvc.upload.TempFile@6c9d19d2, null], attachments={path=com.supermap.file.IUploadService, interface=com.supermap.file.IUploadService, version=0.0.0}]] to /192.168.11.231:20880, cause: Serialized class org.nutz.mvc.upload.TempFile must implement java.io.Serializable
 at com.alibaba.dubbo.remoting.transport.netty.NettyChannel.send(NettyChannel.java:108)
 at com.alibaba.dubbo.remoting.transport.AbstractClient.send(AbstractClient.java:258)
 at com.alibaba.dubbo.remoting.transport.AbstractPeer.send(AbstractPeer.java:54)
 at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeChannel.request(HeaderExchangeChannel.java:112)
 at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeClient.request(HeaderExchangeClient.java:88)
 at com.alibaba.dubbo.rpc.protocol.dubbo.ReferenceCountExchangeClient.request(ReferenceCountExchangeClient.java:78)
 at com.alibaba.dubbo.rpc.protocol.dubbo.DubboInvoker.doInvoke(DubboInvoker.java:97)
 at com.alibaba.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:144)
 at com.alibaba.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:75)
 at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:69)
 at com.alibaba.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:54)
 at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:69)
 at com.alibaba.dubbo.rpc.filter.ConsumerContextFilter.invoke(ConsumerContextFilter.java:48)
 at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper$1.invoke(ProtocolFilterWrapper.java:69)
 at com.alibaba.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:74)
 at com.alibaba.dubbo.rpc.protocol.InvokerWrapper.invoke(InvokerWrapper.java:53)
 at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:77)
 ... 40 more
Caused by: java.lang.IllegalStateException: Serialized class org.nutz.mvc.upload.TempFile must implement java.io.Serializable
 at com.alibaba.com.caucho.hessian.io.SerializerFactory.getDefaultSerializer(SerializerFactory.java:400)
 at com.alibaba.com.caucho.hessian.io.SerializerFactory.getSerializer(SerializerFactory.java:374)
 at com.alibaba.com.caucho.hessian.io.Hessian2Output.writeObject(Hessian2Output.java:381)
 at com.alibaba.dubbo.common.serialize.support.hessian.Hessian2ObjectOutput.writeObject(Hessian2ObjectOutput.java:79)
 at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.encodeRequestData(DubboCodec.java:177)
 at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.encodeRequest(ExchangeCodec.java:229)
 at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:68)
 at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:39)
 at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:81)
 at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:66)
 at com.alibaba.dubbo.remoting.transport.netty.NettyHandler.writeRequested(NettyHandler.java:99)
 at org.jboss.netty.channel.Channels.write(Channels.java:611)
 at org.jboss.netty.channel.Channels.write(Channels.java:578)
 at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:251)
 at com.alibaba.dubbo.remoting.transport.netty.NettyChannel.send(NettyChannel.java:98)
 ... 56 more
1 回复

TempFile不是一个合适的业务对象,别传它

添加回复
请先登陆
回到顶部