还是RMI的异常

同一台机器上的A系统调B系统的RMI服务,抛出一下异常:
[appframe] DEBUG 2013-08-05 17:58:14,428 -com.plat.resmgr.dao.impl.MetadataSubscibeRequisitionDaoImpl.findAll(Unknown Source) -99613 [http-6262-3]  - finding all MetadataSubscibeRequisition instances
[appframe] DEBUG 2013-08-05 17:58:18,868 -com.googlecode.jsonplugin.JSONUtil.writeJSONToResponse(JSONUtil.java:163) -104053 [http-6262-2]  - [JSON]{"message":null,"resTodayCountList":[0,0,0],"resTotalCntList":[0,0,1],"sele":false}
[appframe] ERROR 2013-08-05 17:58:24,418 -com.plat.sap.action.SummaryPropertyDataAction.haveDataContentView(SummaryPropertyDataAction.java:139) -109603 [http-6262-10]  - 浏览字典数据出错:1075897256>>>Lookup of RMI stub failed; nested exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
	java.io.EOFException
org.springframework.remoting.RemoteLookupFailureException: Lookup of RMI stub failed; nested exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
	java.io.EOFException
	at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientInterceptor.java:215)
	at org.springframework.remoting.rmi.RmiClientInterceptor.getStub(RmiClientInterceptor.java:237)
	at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:257)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
	at $Proxy65.viewDictionaryHtml(Unknown Source)
	at com.plat.sap.action.SummaryPropertyDataAction.haveDataContentView(SummaryPropertyDataAction.java:135)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
	at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
	at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
	at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is: 
	java.io.EOFException
	at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
	at java.rmi.Naming.lookup(Naming.java:84)
	at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientInterceptor.java:200)
	... 127 more
Caused by: java.io.EOFException
	at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
	at sun.rmi.server.MarshalInputStream.readLocation(MarshalInputStream.java:285)
	at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:228)
	at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1531)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1493)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
	... 130 more

虽然程序所在的服务器配置了两个IP,但非双网卡那种的,所以自然忽略了“/etc/hosts”的配置问题,因此总在思考其它的因素。周折好长时间回来,经过大牛指点,在“/etc/hosts”中的“127.0.0.1 web web”的行尾加了一个“localhost”,重启OK了。

关于“/etc/hosts”文件的说明:
一般情况下hosts文件的每行为一个主机,每行由三部份组成,每个部份由空格隔开。其中#号开头的行做说明,不被系统解释。

hosts文件的格式如下:

IP地址 主机名/域名
第一部份:网络IP地址;
第二部份:主机名或域名;
第三部份:主机名别名;

你可能感兴趣的:(rmi)