RMIを使用していくつかの Bean を作成しSpring
、それらをエクスポートしようとしています...
これが私のコードです:
<bean class="org.springframework.remoting.rmi.RmiServiceExporter">
<property name="serviceName" value="OfferService" />
<property name="service" ref="offerService" />
<property name="serviceInterface" value="ro.project.services.OfferService" />
<property name="registryPort" value="1199" />
</bean>
ルート フォルダーに「policy.all」というファイルを作成し、その引数を使用して VM を実行していますが、まだ次のエラーが発生します。
java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)
何をすべきかわかりません... Linuxでは、まったく同じプロジェクトが正常に実行されています(jdk 1.7.0.4を使用)が、Windowsではそうではありません... Java 1.5(Windows)では機能しています..しかし、Java 1.7. 0.4 (windows) 動かない…
編集:
私のエラーは次のとおりです。
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExporter#0' defined in class path resource [spring/services.xml]: Invocation of init method failed; nested exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationHandler (no security manager: RMI class loader disabled)
この行を追加した後:
if (System.getSecurityManager() == null)
{
RMISecurityManager manager = new RMISecurityManager();
System.setSecurityManager(manager);
}
このエラーがあります:
Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [spring/application-context.xml]; nested exception is java.io.FileNotFoundException: class path resource [spring/application-context.xml] cannot be opened because it does not exist
前もって感謝します