Hello, I'm trying to implement tests into my GWT application.
I'm using the "GWT JUnit Test" feature included into the GWT Eclipse
plugin.
I want to make test on the rpc ( and database ) functionnality,
however my application is a Gwt-Spring-Hibernate implementation.
Tests run succesfully until a rpc call. My error is :
Starting HTTP on port 0
HTTP listening on port 56923
Starting
http://192.168.1.16:56923/com.enterprise.MyModule.JUnit/junit-standards.html?gwt.codesvr=192.168.1.16:40926
on browser FF3
Module com.enterprise.MyModule.JUnit has been loaded
All clients connected (Limiting future permutations to: gecko1_8)
Show loading message
The development shell servlet received a request for 'login.rpc' in
module 'com.enterprise.MyModule.JUnit.gwt.xml'
[WARN] Resource not found: login.rpc; (could a file be missing
from the public path or a <servlet> tag misconfigured in module
com.enterprise.MyModule.JUnit.gwt.xml ?)
[ERROR] com.google.gwt.user.client.rpc.StatusCodeException: Cannot
find resource 'login.rpc' in the public path of module
'com.enterprise.MyModule.JUnit'
The error speak about the Gwt module "com.enterprise.MyModule.JUnit",
I think this module is create on runtime.
I think that my configuration doesn't load successfully, so my
questions are :
Is it possible to customize this JUnit module to become aware of my
'login.rpc' path ?
Is it mine web.xml file that is used for the test ?
How can I know if the Spring's context load successfully ?
Please, someone know a workaround to solve my problem ?
For informations...
This step doesn't throw error, it's just on the call :
final LoginServiceAsync loginService =
GWT.create(LoginService.class);
I use the annoted type of configuration :
@RemoteServiceRelativePath("login.rpc")
public interface LoginService extends RemoteService {
I use the same arguments in "GWT JUnit Test" and in dev :
-remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl
login.html -logLevel INFO
-port 8888 -war path_to_war/war com.enterprise.Login
com.enterprise.MyModule
web.xml file :
[...]
<!-- location of application context files -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/*-context.xml</param-value>
</context-param>
<!-- filter for Spring Security -->
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</
filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- filter for Spring Hibernate Request
<filter>
<filter-name>openSessionInViewFilter</filter-name>
<filter-
class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</
filter-class>
</filter>
<filter-mapping>
<filter-name>openSessionInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>-->
<!-- load application context -->
<listener>
<listener-
class>org.springframework.web.context.ContextLoaderListener</listener-
class>
</listener>
<!-- dispatch rpc service requests -->
<servlet>
<servlet-name>rpc-services</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</
servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>rpc-services</servlet-name>
<url-pattern>*.rpc</url-pattern>
</servlet-mapping>
[...]
My spring servlet config :
<bean
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<map>
<entry key="/MyModule/login.rpc"
value-ref="rpcLoginService" />
[...]
.... moreover, the remote url rpc is "http://192.168.1.16:33956/
com.enterprise.MyModule.JUnit/login.rpc", so I had tried with
something like that ( I got the same error ) :
<entry key="/com.enterprise.MyModule.JUnit/login.rpc" value-
ref="rpcLoginService" />
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.