Andreas Zielke
2005-02-18 18:32:19 UTC
Hi *,
I've got a remoting problem, which at first seemed very similar to Charlie's
problem (http://sourceforge.net/mailarchive/message.php?msg_id=10887683).
My problem symptoms are exactly the same as in his first posting:
I get an exception in my client code:
org.springframework.remoting.RemoteAccessException: Cannot access HTTP
invoker remote service at
[http://localhost:8080/MMHelloWorld/ServiceFacade]; nested exception is
java.io.FileNotFoundException:
http://localhost:8080/MMHelloWorld/ServiceFacade
java.io.FileNotFoundException:
http://localhost:8080/MMHelloWorld/ServiceFacade
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:798)
at
.......
The server console contains the warning "No mapping for
[/MMHelloWorld/ServiceFacade] in DispatcherServlet with name 'remote'"
I'm using the following web.xml:
==========================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app >
<!-- Context Configuration locations for Spring XML files -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/applicationContext-resources.xml,
classpath:/applicationContext-hibernate.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- Dispatch Servlet Configuration -->
<servlet>
<servlet-name>remote</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!--
I've also included this mapping on and off (due to the chapter 12.4.1
BeanNameUrlHandlerMapping, although it seems to be missing in the remoting
chapter)
<servlet-mapping>
<servlet-name>remote</servlet-name>
<url-pattern>/ServiceFacade</url-pattern>
</servlet-mapping>
-->
</web-app>
==========================================================================
applicationContext-hibernate.xml contains (among other beans)
<bean id="model.ServiceFacade" class="model.ServiceFacade">
<bean name="/ServiceFacade"
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
<property name="service">
<ref local="model.ServiceFacade"/>
</property>
<property name="serviceInterface">
<value>model.IServiceFacade</value>
</property>
</bean>
==========================================================================
remote-servlet.xml contains no beans, but inherits the parents' beans
I've also tried to explicitly pre-instantiate the
<bean
class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/>
in remote-servlet.xml, but that didn't solve my problem, either
==========================================================================
The client application-context contains only two beans:
<bean id="facadeHolder" class="FacadeHolder">
<property name="facade"><ref bean="serviceFacade"/></property>
</bean>
<bean id="serviceFacade"
class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl">
<value>http://localhost:8080/MMHelloWorld/ServiceFacade</value>
</property>
<property name="serviceInterface">
<value>buerokino.model.IServiceFacade</value>
</property>
</bean>
==========================================================================
Some further info: my application is *NOT* running as root, so I don't use
http://localhost:8080/ServiceFacade but
http://localhost:8080/MMHelloWorld/ServiceFacade
instead.
Any hints?
(I've got the gut feeling that it could be one of the leading slashes in
the <bean name="/ServiceFacade" ... or the
<url-pattern>/ServiceFacade</url-pattern> and will try to fiddle around with
those.)
Thx for any info,
Andreas
I've got a remoting problem, which at first seemed very similar to Charlie's
problem (http://sourceforge.net/mailarchive/message.php?msg_id=10887683).
My problem symptoms are exactly the same as in his first posting:
I get an exception in my client code:
org.springframework.remoting.RemoteAccessException: Cannot access HTTP
invoker remote service at
[http://localhost:8080/MMHelloWorld/ServiceFacade]; nested exception is
java.io.FileNotFoundException:
http://localhost:8080/MMHelloWorld/ServiceFacade
java.io.FileNotFoundException:
http://localhost:8080/MMHelloWorld/ServiceFacade
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:798)
at
.......
The server console contains the warning "No mapping for
[/MMHelloWorld/ServiceFacade] in DispatcherServlet with name 'remote'"
I'm using the following web.xml:
==========================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app >
<!-- Context Configuration locations for Spring XML files -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/applicationContext-resources.xml,
classpath:/applicationContext-hibernate.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!-- Dispatch Servlet Configuration -->
<servlet>
<servlet-name>remote</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!--
I've also included this mapping on and off (due to the chapter 12.4.1
BeanNameUrlHandlerMapping, although it seems to be missing in the remoting
chapter)
<servlet-mapping>
<servlet-name>remote</servlet-name>
<url-pattern>/ServiceFacade</url-pattern>
</servlet-mapping>
-->
</web-app>
==========================================================================
applicationContext-hibernate.xml contains (among other beans)
<bean id="model.ServiceFacade" class="model.ServiceFacade">
<bean name="/ServiceFacade"
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
<property name="service">
<ref local="model.ServiceFacade"/>
</property>
<property name="serviceInterface">
<value>model.IServiceFacade</value>
</property>
</bean>
==========================================================================
remote-servlet.xml contains no beans, but inherits the parents' beans
I've also tried to explicitly pre-instantiate the
<bean
class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/>
in remote-servlet.xml, but that didn't solve my problem, either
==========================================================================
The client application-context contains only two beans:
<bean id="facadeHolder" class="FacadeHolder">
<property name="facade"><ref bean="serviceFacade"/></property>
</bean>
<bean id="serviceFacade"
class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl">
<value>http://localhost:8080/MMHelloWorld/ServiceFacade</value>
</property>
<property name="serviceInterface">
<value>buerokino.model.IServiceFacade</value>
</property>
</bean>
==========================================================================
Some further info: my application is *NOT* running as root, so I don't use
http://localhost:8080/ServiceFacade but
http://localhost:8080/MMHelloWorld/ServiceFacade
instead.
Any hints?
(I've got the gut feeling that it could be one of the leading slashes in
the <bean name="/ServiceFacade" ... or the
<url-pattern>/ServiceFacade</url-pattern> and will try to fiddle around with
those.)
Thx for any info,
Andreas
--
Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail
Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS
GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail