Hi

Ok, I managed to locate and fix the problem, which I suspect is a GWT
bug.

What it had was something like this:

public final static MyRpcServiceAsync rpc =
GWT.create(MyRpcService.class);

public void onModuleLoad() {
        rpc.bootstrap(new AsyncCallback<Bootstrap>() { ...

                public void onSuccess(Bootstrap b) {
                        RootPanel rootPanel = RootPanel.get();
                        rootPanel.add(...);
                        ...
                }
}

That failed outside devmode, but when i changed that to (changing
rootPanel from local to class variable):

public final static MyRpcServiceAsync rpc =
GWT.create(MyRpcService.class);
private RootPanel rootPanel;

public void onModuleLoad() {
        rootPanel = RootPanel.get();
        rpc.bootstrap(new AsyncCallback<Bootstrap>() { ...

                public void onSuccess(Bootstrap b) {
                        rootPanel.add(...);
                        ...
                }
}

That took me a while to figure out.

Best regards Jens


On Jul 7, 9:06 am, Jens <djar...@gmail.com> wrote:
> Yes, I ran the GWT compiler to ensure the source for both hosted mode
> and non hosted mode would be the same.
>
> I have tested 5 setups:
>
> 1) Development mode (gwt internal jetty) with ?gwt.codesvr
> 2) Development mode (external server, tomcat) with ?gwt.codesvr
> 3) Development mode (gwt internal jetty) without ?gwt.codesvr but with
> a gwt compile in eclipse
> 4) Development mode (external server, tomcat) without ?gwt.codesvr but
> with a gwt compile in eclipse
> 5) External tomcat server deployed as a war (where the war is simply a
> zip of the war dir in eclipse)
>
> 1) & 2) Works as expected
> 3) & 4) gives the "Uncaught TypeError: Cannot read property
> 'com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_serializer' of
> undefined error"
> 5) gives me an "Uncaught TypeError: Cannot read property 'f' of
> undefined"
>
> My guess is that some changes i made in the rpc methods trigger this.
>
> Best regards Jens
>
> On Jul 6, 9:08 pm, Magno Machado <magn...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Did you ran GWT Compiler and are the compiled files (the *.cache.html,
> > module.nocache.js and etc) updated? Or are you simply running devmode and
> > removing the ?gwt.codesvr from the url?
>
> > On Wed, Jul 6, 2011 at 1:13 PM, Jens <djar...@gmail.com> wrote:
> > > Hi
>
> > > I have an application that i have been working on for a while, but now
> > > suddenly the application will not run outside dev mode.
>
> > > If i remove the "gwt.codesvr=127.0.0.1:9997" from my url, the
> > > application stops working (it will not bootstrap).
>
> > > After digging a bit around i found the following javascript stacktrace
> > > in chrome:
>
> > > Uncaught TypeError: Cannot read property
> > > 'com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_serializer' of
> > > undefined
> > > (anonymous function) FDA307FC33B43DADD6B98D9EE42A955C.cache.html:976
> > > gwtOnLoad FDA307FC33B43DADD6B98D9EE42A955C.cache.html:22850
> > > maybeStartModule myapp.nocache.js:40
> > > allocationrule.onScriptLoad myapp.nocache.js:273
> > > (anonymous function)FDA307FC33B43DADD6B98D9EE42A955C.cache.html:22858
>
> > > Any clues on what going on here?
>
> > > Best regards Jens
>
> > > --
> > > 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.
>
> > --
> > Magno Machado 
> > Paulohttp://blog.magnomachado.com.brhttp://code.google.com/p/emballo/

-- 
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