请参阅this article的“RMI注册表问题”段落首先了解 Java Update 1.6.0_29 的背景。
如果我理解正确(我是德国人),更新会在 rmiregistry 中引入一个错误,该错误无法使用代码库中的 file: 模式。
即以下内容将不再适用于 1.6.0_29:
-Djava.rmi.server.codebase="file:myproject/bin/ ..."
我们目前正在使用具有 file: 语法的代码库的功能。有谁知道使这项工作有效的解决方法?
注意:不,我们不想启动本地网络服务器或 ftp 服务器。
更新:
在 Naming.bind 上抛出此异常:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: access to class loader denied
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:400)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:248)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
最佳答案
我遇到了同样的问题,并且可以确认将 JDK 降级到早期版本可以解决问题。我知道,这不是您正在寻找的解决方案,但至少它可以发挥作用。
关于java - RMI 注册表问题 : rmiregistry may cause unintended exceptions when binding with codebase using the "file:" URL scheme,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8152838/