Spring 未找到RMI类

Spring 未找到RMI类,spring,rmi,classnotfoundexception,Spring,Rmi,Classnotfoundexception,我得到ClassNotFoundexception,下面是代码: 服务器: <bean id="metaFactoryRmiServiceExporter" class="org.springframework.remoting.rmi.RmiServiceExporter"> <property name="serviceName" value="metaFactoryService"/> <property name="service" re

我得到
ClassNotFound
exception,下面是代码:

服务器:

<bean id="metaFactoryRmiServiceExporter"
  class="org.springframework.remoting.rmi.RmiServiceExporter">
    <property name="serviceName" value="metaFactoryService"/>
    <property name="service" ref="metaFactoryServiceImpl"/>
    <property name="serviceInterface" value="IMetaFactoryService"/>
    <property name="registryPort" value="1098"/>
</bean>
我可以获取注册表.list(),但查找会引发异常。为什么?
我已配置security.policy

ClassNotFoundException
表示类路径中缺少一个类。的可能重复项
if (System.getSecurityManager() == null) {
   System.setSecurityManager(new RMISecurityManager());
}
try {
    Registry registry = LocateRegistry.getRegistry("127.0.0.1",1098);
    registry.lookup("metaFactoryService");
    for (String s:registry.list()) {
        System.out.println(s);
    }
} catch (Exception e) {
    e.printStackTrace();
}