├─client
│ └─c15
│ └─rmi
│ DisplayPerfectTime.class
│ PerfectTimeI.class
└─server
└─c15
└─rmi
PerfectTime.class
PerfectTimeI.class
这样的目录结构有问题,你将c15.rmi分成了在两个不同文件中的两个目录当然有问题,
(!)你可以在源文件中用命令 javac -d . *.java生成对应package的文件,package和文件结构要对应
(2)在当前目录中建立一个c15\rmi的目录,将编译生成后的class文件拷贝进去.
│ └─c15
│ └─rmi
│ DisplayPerfectTime.class
│ PerfectTimeI.class
└─server
└─c15
└─rmi
PerfectTime.class
PerfectTimeI.class
这样的目录结构有问题,你将c15.rmi分成了在两个不同文件中的两个目录当然有问题,
(!)你可以在源文件中用命令 javac -d . *.java生成对应package的文件,package和文件结构要对应
(2)在当前目录中建立一个c15\rmi的目录,将编译生成后的class文件拷贝进去.
解决方案 »
- 发布实体bean是报错
- 几乎相同的目录,文件不能访问,404错误
- 小妹有事相求
- 各位前辈,我有一个HTML页面,想变成JSP页面,但出现在了乱码,而且不能保存~~~
- 各种xml配置文件的格式问题
- TOMCAT5.0的JSP网页,发布时候,想:去掉端口号,直接输入域名,怎样实现呢?
- Hibernate使用中你遇到过这样的问题吗?
- java List 删除 单选
- 关于spring和struts和用发生的一个问题
- 谁有 JAVA2 API 大全的电子文档下载地址
- Struts错误,"Cannot retrieve definition for form bean null",如何解决?请高手帮忙!!
- 那里 Forte[tm] for Java[tm] Community Edition 3.0 下载
.javaG:\Bean\RmiTest>rmic c15.rmi.PerfectTimeG:\Bean\RmiTest>start rmiregistry 2005G:\Bean\RmiTest>java -Djava.rmi.server.codebase=file:///g:/bean/rmitest/ -Djava.
security.policy=file:///g:/bean/rmitest/policy c15.rmi.PerfectTime还是出错
Exception in thread "main" java.rmi.ServerException: Server RemoteException; nes
ted exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: c15.rmi.PerfectTime_Stub
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
n Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at java.rmi.Naming.bind(Unknown Source)
at c15.rmi.PerfectTime.main(PerfectTime.java:20)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested ex
ception is:
java.lang.ClassNotFoundException: c15.rmi.PerfectTime_Stub
Caused by: java.lang.ClassNotFoundException: c15.rmi.PerfectTime_Stub
这一步生成的两个class也应该放到c15\rmi下;
还是不行
做到第五步就出同样的异常:Exception in thread "main" java.rmi.ServerException: Server RemoteException; nes
ted exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: net.xiaobo.remoteserver.HelloRemoteImp
_Stub
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
n Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at java.rmi.Naming.bind(Unknown Source)
at net.xiaobo.remoteserver.HelloRemoteImp.main(HelloRemoteImp.java:18)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested ex
ception is:
java.lang.ClassNotFoundException: net.xiaobo.remoteserver.HelloRemoteImp
_Stub
Caused by: java.lang.ClassNotFoundException: net.xiaobo.remoteserver.HelloRemote
Imp_Stub
如果按照我的步骤不行,你在docs文档中rmi这块找到附带的那个例子,按照它上面的步骤运行一下,看看有什么情况!