Charlie, did you try the situation I described, e.g. pass serializable beans as parameter or return value of a spring configured service exported via gwt-sl (HB4GWTRPCServiceExporter in particular)?
I receive the following exception in the gwt shell: [INFO] StandardContext[]ERROR: The serialization policy file '/ com.google.gwt.sample.stockwatcher.StockWatcher/ 21D750EA65B9E586B24F4D6634D3C366.gwt.rpc' was not found; did you forget to include it in this deployment? [INFO] StandardContext[]WARNING: Failed to get the SerializationPolicy '21D750EA65B9E586B24F4D6634D3C366' for module 'http://localhost:8888/ com.google.gwt.sample.stockwatcher.StockWatcher/'; a legacy, 1.3.3 compatible, serialization policy will be used. You may experience SerializationExceptions as a result. [WARN] StandardContext[]Exception while dispatching incoming RPC call java.lang.RuntimeException: com.google.gwt.user.client.rpc.SerializationException: Type 'com.google.gwt.sample.stockwatcher.domain.StockMarket' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field serializer. For security purposes, this type will not be serialized. at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleExporterProcessingException(GWTRPCServiceExporter.java: 344) at org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java: 313) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java: 86) at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest(GWTRPCServiceExporter.java: 363) at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java: 49) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java: 875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java: 809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java: 571) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java: 511) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java: 198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java: 929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java: 160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 799) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 577) at org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:619) Caused by: com.google.gwt.user.client.rpc.SerializationException: Type 'com.google.gwt.sample.stockwatcher.domain.StockMarket' was not assignable to 'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field serializer. For security purposes, this type will not be serialized. at com.google.gwt.user.server.rpc.impl.LegacySerializationPolicy.validateSerialize(LegacySerializationPolicy.java: 140) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java: 581) at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java: 129) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter $ValueWriter$8.write(ServerSerializationStreamWriter.java:146) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java: 520) at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:573) at com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java: 441) at org.gwtwidgets.server.spring.hb4gwt.HB4GWTRPCServiceExporter.invokeMethodOnService(HB4GWTRPCServiceExporter.java: 63) at org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java: 298) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java: 86) at org.gwtwidgets.server.spring.GWTRPCServiceExporter.handleRequest(GWTRPCServiceExporter.java: 363) at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java: 49) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java: 875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java: 809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java: 571) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java: 511) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java: 198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java: 104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java: 520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java: 929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java: 160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 799) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 577) at org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:619) Holger On 14 Sep., 20:38, Charlie Collins <[EMAIL PROTECTED]> wrote: > You don't appear to need the *.gwt.rpc serialization policy file in > hosted mode. That file is generated by the compiler, and you don't > need to even invoke the compiler for the shell/hosted mode. > > I tried several applications that have beans that implement > Serializable and it seems to work fine. Closing the issue unless > someone has more info or a reproducible example. > > On Sep 9, 12:50 pm, Charlie Collins <[EMAIL PROTECTED]> wrote: > > > This does make sense, yes. > > > Whether or not files need special treatment though depends on how they > > are accessed. If they have to be in a particular file system location > > they are different than if they just need to be on the classpath. > > > For Spring and JPA stuff, and other things that need to be present at > > a particular path location for the hosted mode tomcat, I have just > > used the antrun plugin in the past to copy them to where they need to > > be. I think others also just use noserver once things get complicated > > (but that has it's own other issues, can't run tests, etc). > > > We actually used to have an issue in the tracker for > > this:http://code.google.com/p/gwt-maven/issues/detail?id=82(whichI am re- > > opening to revisit). It details how to use ant run and such. > > > I am adding an issue for the *rpc file. That should automatically get > > copied over for sure. > > > On Sep 9, 12:19 pm, Holger <[EMAIL PROTECTED]> wrote: > > > > I'm trying to use gwt 1.5.2, spring 2.5.4, gwt-sl 0.1.5a and gwt-maven > > > 2.0-beta22. > > > > Has someone got this setup to work in web mode and hosted mode? > > > > Currently, I have one maven project to test this integration > > > based on the StockWatcher example from the gwt tutorial. > > > The GWT-RPC should call a spring configured service, exported via > > > GWTRPCServiceExporter from gwt-sl. > > > > So, my src/main/webapp/ directory contains > > > - web.xml (defining Spring DispatcherServlet) > > > - remoting-servlet.xml (defining UrlMapping and > > > GWTRPCServiceExporter ) > > > - applicationContext.xml (defining Spring business objects) > > > - log4j.properties (defining loggers and appenders) > > > > What I want to achieve is to start and run the app in hosted mode with > > > "mvn gwt:gwt". > > > I have enabled the "mergewebxml" goal to be able to use my web.xml > > > file and it > > > gets copied to directory "target/tomcat/webapps/ROOT/WEB-INF" - Ok. > > > But the other files (remoting-servlet.xml, applicationContext.xml, > > > log4j.properties) > > > are missing there, so when executing "mvn gwt:gwt" these files are not > > > found. > > > When I copy them manually to the above location, the shell starts up > > > correctly. > > > > Would it make sense to add this funtionality to gwt-maven, e.g. coping > > > the files from > > > src/main/webapp/WEB-INF to target/tomcat/webapps/ROOT/WEB-INF to > > > support this > > > use case or is there something I'm doing wrong ? > > > > In addition, theserializationpolicy(*.gwt.rpc) file cannot be found > > > in hosted mode. I had to > > > copy it manually to target/tomcat/webapps/ROOT/<module-name>/*.gwt.rpc > > > to make it available. > > > It is needed when the classes used in RPC implement Serializable > > > instead of IsSerializable. > > > > Does this all make sense to you? > > > > Thanks, > > > Holger --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "gwt-maven" 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/gwt-maven?hl=en -~----------~----~----~----~------~----~------~--~---
