Note that there are some explanatory texts on larger screens.

plurals
  1. POClassNotFoundException using Spring RMI
    primarykey
    data
    text
    <p>I have two projects (client and server) trying to exchange some objects thru Spring RMI in Eclipse Helios. The client only knows their interfaces. A similar program passing Strings works fine.</p> <p>I'm following <em>Spring In Action</em>'s 3rd edition examples, and instead of Spitter preferred Twitter :) The objects work fine at the server, and no one knows the implementations, just Spring. What is odd is that it throws a ClassNotFoundException, seeming that the client is complaining he doesn't know TwitterImpl!</p> <p>Thanks in advance for any help!</p> <p>Stack trace:</p> <pre><code>Exception in thread "main" org.springframework.remoting.RemoteAccessException: Could not access remote service [rmi://localhost/TwitterService]; nested exception is java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: twitter.domain.TwitterImpl (no security manager: RMI class loader disabled) at org.springframework.remoting.rmi.RmiClientInterceptorUtils.convertRmiAccessException(RmiClientInterceptorUtils.java:193) at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:347) at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:259) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy1.getTwitter(Unknown Source) at twitter.Retrieve.getTwits(Retrieve.java:31) at twitter.Main.main(Main.java:30) </code></pre> <p>Client rmi.xml</p> <pre><code>&lt;bean class="org.springframework.remoting.rmi.RmiProxyFactoryBean" id="twitterService"&gt; &lt;property name="serviceUrl" value="rmi://localhost/TwitterService"&gt; &lt;/property&gt; &lt;property name="serviceInterface" value="twitter.service.TwitterService"&gt; &lt;/property&gt; &lt;/bean&gt; &lt;bean id="retrieve" class="twitter.Retrieve"&gt; &lt;property name="twitterService" ref="twitterService"&gt;&lt;/property&gt; &lt;/bean&gt; </code></pre> <p>Server rmi.xml</p> <pre><code>&lt;bean class="org.springframework.remoting.rmi.RmiServiceExporter"&gt; &lt;property name="service" ref="twitterService" /&gt; &lt;property name="serviceName" value="TwitterService" /&gt; &lt;property name="serviceInterface" value="twitter.service.TwitterService" /&gt; &lt;/bean&gt; &lt;bean class="twitter.service.TwitterServiceImpl" id="twitterService"&gt; &lt;property name="twits"&gt; ... &lt;/property&gt; &lt;property name="twitters"&gt; ... &lt;/property&gt; &lt;/bean&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload