PDA

View Full Version : Remoting and RemotingAccessException



cornflakes
Jan 31st, 2005, 05:42 PM
Hello,

I have exposed one of my beans in my existing Spring web-app as an HttpInvokerService using the HttpInvokerServiceExporter. In the
metaanalysis-servlet.xml file I have:

!--Server Side Spring Http Invoker-->
<bean name="/ArrayDesignService"
class="org.springframework.remoting.httpinvoker.HttpInvok erServiceExporter">
<property name="service">
<ref bean="arraydesignMan"/>
</property>
<property name="serviceInterface">
<value>bus.ArrayDesignManagerInterface</value>
</property>
</bean>


I have a command line client that is trying to access this service, but to no avail. I am getting:

org.springframework.remoting.RemoteAccessException : Cannot access HTTP invoker remote service at [http://localhost:8080/ArrayDesignService] ...

My client side bean factory looks as follows:

<beans>
<!-- Remoting -->
<bean id="simpleclientobject" class="tools.SimpleClientObject">
<property name="arrayDesignManagerInterface">
<ref bean="arrayDesignManagerProxy"/>
</property>
</bean>

<!-- Spring Http Invoker Client-->
<bean id="arrayDesignManagerProxy"
class="org.springframework.remoting.httpinvoker.HttpInvok erProxyFactoryBean">
<property name="serviceUrl">
<value>http://localhost:8080/ArrayDesignService</value>
</property>
<property name="serviceInterface">
<value>bus.ArrayDesignManagerInterface</value>
</property>
</bean>
</beans>

I have taken the url mappings out of my metaanalysis-servlet.xml file as well as the servlet mappings out of the [i][b]web.xml[b][i] file.

Any ideas?

I've tried to expose the service via HttpInvoker, Hessian, Burlap, and RMI and am getting the same error.

robh
Feb 1st, 2005, 10:55 AM
Can you post the full stack trace? That way I can trace this to a particular method or line.

Thanks.

Rob

cornflakes
Feb 2nd, 2005, 10:46 AM
Thanks, Rob.

I was in fact able to sort this out. The webapp context name was not included in the client bean-factory. I had:

https://localhost:8080/metaanalysis/ArrayDesignService as opposed to

https://localhost:8080/webapp context/metaanalysis/ArrayDesignService

I have created different servlets and corresponding beanFactories to handle different types of requests (ie. one for web-requests, one for remoting-requests etc.). Just wondering if it is possibe to import beans from one factory to the other to avoid error prone copy and paste. I saw a reference to the

<import resource="beanFactory.xml"/> but this doesn't seem to work when depending on Tomcat to load the beanFactory. I'm sure I've missed something ... any advice? I you'ld like, I can post this on a different area of the forum.

Regards,

Kiran