java - RMI 注册表问题 : rmiregistry may cause unintended exceptions when binding with codebase using the "file:" URL scheme

标签 java rmiregistry

请参阅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/

相关文章:

java - 由按钮组成的面板网格

具有持久 TCP 服务器套接字的 Java 应用程序高可用性/故障转移

java - 使用类而不创建新实例

通过互联网的 Java RMI 连接

java - 在与 RMIServer 不同的主机上运行 RMIRegistry

java - RMI理论,下载 stub 文件

java - 如何通过java代码启动RMI Registry?

java - BottomNavigationView 后退按钮无法正常工作

java - 如何将标准日期解析为 GMT?

java - RMI 服务器停止?