Oops it right, if i print the caught says :

This application is out of date, please click the refresh button on
your browser.
com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived
(RequestCallbackAdapter.java:204)
com.google.gwt.http.client.Request.fireOnResponseReceivedImpl
(Request.java:264)
com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch
(Request.java:236)
com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
227)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
com.google.gwt.dev.shell.mac.MethodDispatch.invoke(MethodDispatch.java:
71)
org.eclipse.swt.internal.carbon.OS.ReceiveNextEvent(Native Method)
org.eclipse.swt.widgets.Display.sleep(Display.java:3801)
com.google.gwt.dev.SwtHostedModeBase.sleep(SwtHostedModeBase.java:241)
com.google.gwt.dev.SwtHostedModeBase.processEvents
(SwtHostedModeBase.java:236)
com.google.gwt.dev.HostedModeBase.pumpEventLoop(HostedModeBase.java:
558)
com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
com.google.gwt.dev.HostedMode.main(HostedMode.java:232)

It's strange. What can i do ?

Thanks for your help.

On 6 mai, 11:01, Paul Robinson <ukcue...@gmail.com> wrote:
> Your onFailure method ignores the Throwable it's given. Maybe it
> contains something useful?
>
>
>
> Ouaibou wrote:
> > Hello,
>
> > I have a problem with the callback of a RPC call. I have post in
> > appengine forum because i think it was a problem with the appengine
> > datastore, but Max Ross suggests me to post here :
>
> >http://groups.google.com/group/google-appengine-java/browse_thread/th...
>
> > In order to summarize :
>
> > I have two classes AudioFile and Genre. AudioFile as a field of type
> > Genre. Both are marked as detachable like Max says me. I add an
> > AudioFile in the datastore and then i do a RPC call in the client side
> > in order to retrieve the data :
>
> > this.gtunesService.getAudioFiles(new AsyncCallback<List<AudioFile>>()
> > {
> >                        public void onFailure(Throwable caught) {
> >                                 SC.say(Gtunes.SERVER_ERROR);
> >                         }
> >                         public void onSuccess(List<AudioFile> result)
> > {
> >                                 Gtunes.this.audioFiles = result;
> >                                 String buf = "";
> >                                 for (AudioFile af :
> > Gtunes.this.audioFiles) {
> >                                         buf += "genre = " + af.getGenre
> > ().getName() + " - "
> >                                                         + af.getName()
> > + "<br />";
> >                                 }
> >                                 SC.say(buf);
> >                         }
> >                 });
>
> > The problem is in the server side with the following code :
>
> > public List<AudioFile> getAudioFiles() {
> >            List<AudioFile> audioFiles = null;
> >            PersistenceManager pm = PMF.get().getPersistenceManager();
>
> >            try {
> >                    Query q = pm.newQuery(AudioFile.class);
> >                    q.setOrdering("name");
> >                    audioFiles = new ArrayList<AudioFile>((List<AudioFile>) 
> > q.execute
> > ());
> >                    pm.detachCopyAll(audioFiles);
> >            } finally {
> >                    pm.close();
> >            }
>
> >            System.out.println("list = " + audioFiles);
> >            for (AudioFile audioFile : audioFiles) {
> >                    System.out.println("name = " + audioFile.getName() + 
> > "\n");
> >            }
>
> >            return audioFiles;
> >    }
>
> > audioFiles contains my data. But the return has a problem because i
> > enter in the onFailure in the client side but without any error.
>
> > However, i see that if i change the line :
>
> > audioFiles = new ArrayList<AudioFile>((List<AudioFile>) q.execute());
>
> > for :
>
> > audioFiles = (List<AudioFile>) q.execute();
>
> > I have get the following error :
>
> > 5 mai 2009 22:23:23
> > com.google.appengine.tools.development.ApiProxyLocalImpl log
> > SEVERE: [1241555003875000] javax.servlet.ServletContext log:
> > Exception
> > while dispatching incoming RPC call
> > com.google.gwt.user.client.rpc.SerializationException: Type
> > 'org.datanucleus.store.appengine.query.StreamingQueryResult' was not
> > included in the set of types which can be serialized by this
> > SerializationPolicy or its Class object could not be loaded. For
> > security purposes, this type will not be serialized.
> >         at
> > com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSer
> > ialize
> > (StandardSerializationPolicy.java:83)
> >         at
> > com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.seriali
> > ze
> > (ServerSerializationStreamWriter.java:591)
> >         at
> > com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.write
> > Object
> > (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.seriali
> > zeValue
> > (ServerSerializationStreamWriter.java:530)
> >         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 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse
> > (RPC.java:529)
> >         at
> > com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
> > (RemoteServiceServlet.java:166)
> >         at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
> > (RemoteServiceServlet.java:86)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:
> > 713)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:
> > 806)
> >         at org.mortbay.jetty.servlet.ServletHolder.handle
> > (ServletHolder.java:
> > 487)
> >         at org.mortbay.jetty.servlet.ServletHandler
> > $CachedChain.doFilter
> > (ServletHandler.java:1093)
> >         at
> > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> > (TransactionCleanupFilter.java:43)
> >         at org.mortbay.jetty.servlet.ServletHandler
> > $CachedChain.doFilter
> > (ServletHandler.java:1084)
> >         at org.mortbay.jetty.servlet.ServletHandler.handle
> > (ServletHandler.java:360)
> >         at org.mortbay.jetty.security.SecurityHandler.handle
> > (SecurityHandler.java:216)
> >         at org.mortbay.jetty.servlet.SessionHandler.handle
> > (SessionHandler.java:181)
> >         at org.mortbay.jetty.handler.ContextHandler.handle
> > (ContextHandler.java:712)
> >         at org.mortbay.jetty.webapp.WebAppContext.handle
> > (WebAppContext.java:
> > 405)
> >         at
> > com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
> > (DevAppEngineWebAppContext.java:54)
> >         at org.mortbay.jetty.handler.HandlerWrapper.handle
> > (HandlerWrapper.java:139)
> >         at
> > com.google.appengine.tools.development.JettyContainerService
> > $ApiProxyHandler.handle(JettyContainerService.java:306)
> >         at org.mortbay.jetty.handler.HandlerWrapper.handle
> > (HandlerWrapper.java:139)
> >         at org.mortbay.jetty.Server.handle(Server.java:313)
> >         at org.mortbay.jetty.HttpConnection.handleRequest
> > (HttpConnection.java:
> > 506)
> >         at org.mortbay.jetty.HttpConnection$RequestHandler.content
> > (HttpConnection.java:844)
> >         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:
> > 644)
> >         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:
> > 211)
> >         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:
> > 381)
> >         at org.mortbay.io.nio.SelectChannelEndPoint.run
> > (SelectChannelEndPoint.java:396)
> >         at org.mortbay.thread.BoundedThreadPool$PoolThread.run
> > (BoundedThreadPool.java:442)
>
> > I don't know where to see in order to debug. Does someone has an
> > idea ?
>
> > Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to