rmi,端口冲突

最近在给客户的应用软件中,有个模块一直报错,而别的模块都能正常使用,这个模块与别的模块不一样地方就是:这个模块使用了rmi技术调用,只要调用这个模块就报错误,信息如下:

 

2010-06-01 15:08:47 [ERROR] com.nstrong.itop.web.action.knowledge.KnowledgeAction {KnowledgeAction.java:601} - org.springframework.remoting.RemoteLookupFailureException: 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
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(Unknown Source)
 at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientInterceptor.java:198)
 at org.springframework.remoting.rmi.RmiClientInterceptor.getStub(RmiClientInterceptor.java:235)
 at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:255)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 at $Proxy1.loadAllRootKnowledgeBaseType(Unknown Source)
 at com.nstrong.itop.web.manager.knowledge.KnowledgeWebManager.getKnowledgeTypeList(KnowledgeWebManager.java:287)
 at com.nstrong.itop.web.manager.knowledge.KnowledgeWebManager.loadAllKnowledgeTypeTree(KnowledgeWebManager.java:592)
 at com.nstrong.itop.web.manager.knowledge.KnowledgeWebManager$$FastClassByCGLIB$$fe89b220.invoke(<generated>)
 at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
 at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:695)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
 at com.nstrong.itop.web.framework.LogAroundInterceptor.invoke(LogAroundInterceptor.java:27)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
 at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:630)
 at com.nstrong.itop.web.manager.knowledge.KnowledgeWebManager$$EnhancerByCGLIB$$48c93fa6.loadAllKnowledgeTypeTree(<generated>)
 at com.nstrong.itop.web.action.knowledge.KnowledgeAction.configKnowledgeType(KnowledgeAction.java:597)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
 at com.nstrong.itop.web.framework.actionInterface.BaseAction.execute(BaseAction.java:237)
 at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
 at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at com.nstrong.itop.web.framework.CharsetFilter.doFilter(CharsetFilter.java:67)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
 at java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException
 at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
 at java.io.ObjectInputStream.readObject0(Unknown Source)
 at java.io.ObjectInputStream.readObject(Unknown Source)
 at sun.rmi.server.MarshalInputStream.readLocation(Unknown Source)
 at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
 at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
 at java.io.ObjectInputStream.readClassDesc(Unknown Source)
 at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
 at java.io.ObjectInputStream.readObject0(Unknown Source)
 at java.io.ObjectInputStream.readObject(Unknown Source)
 ... 49 more

 

自己百般尝试[修改rmi配置文件,有的说是:权限问题,有的说是有同一class,后来一一尝试修改]:而且只有在客户那里才报错,将代码放到别的电脑都没有问题,后来修改rmi调用的配置文件中的rmi端口,居然好了,原来是rmi端口冲突造成的,可从日志没有看出来,至少自己没有看出来。郁闷了我十几个小时,所以贴出来,希望给同仁一些提示!

你可能感兴趣的:(java,apache,AOP,Web,struts)