Invalid version number "1.5" passed to external.gwtOnLoad(), expected "1.6";

33 views
Skip to first unread message

glidealong

unread,
Jun 2, 2009, 9:02:12 AM6/2/09
to Google API Libraries for GWT
I am getting this issue with GWT1.6.4 in jetty hosted mode and when i
am trying to add a gadget
developed with gwt-gadgets-1.0.3, GWT1.6.4

The error is as follows

[ERROR] Invalid version number "1.5" passed to external.gwtOnLoad(),
expected "1.6";
your hosted mode bootstrap file may be out of date; if you are using -
noserver try
recompiling and redeploying your app


[ERROR] Failure to load module 'com.test.gadget.TestGadget'
com.google.gwt.dev.shell.ie.IDispatchImpl$HResultException:
-2147024809
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad
(BrowserWidgetIE6.java:63)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke
(BrowserWidgetIE6.java:161)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke
(IDispatchImpl.java:294)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6
(IDispatchImpl.java:194)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6
(COMObject.java:117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.SwtHostedModeBase.processEvents
(SwtHostedModeBase.java:235)
at com.google.gwt.dev.HostedModeBase.pumpEventLoop
(HostedModeBase.java:558)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)

I am compiling the application with the same dependencies as i am
running my gwt
application(opensocial container), but I am still getting this error

Any help is greatly appreciated, cuz i am wasting a lot of time in
building and deploying the container application to jbos to test every
single change.

Best Regards,
Hafiz

Eric Ayers

unread,
Jun 2, 2009, 9:49:59 AM6/2/09
to gwt-goo...@googlegroups.com
It looks like the gadget hosted on the URL you are loading up was compiled with GWT 1.5.  You need to recompile the gadget with GWT 1.6 and deploy it to your gadget container for your app to work.

If you have multiple gadgets in the page, you may be seeing this error from a different gadget.
--
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

Hafiz A Haq

unread,
Jun 2, 2009, 10:37:29 AM6/2/09
to gwt-goo...@googlegroups.com
I am pretty sure i am compiling my gadget with 1.6 dependencies. This is the contents of the command file that i use to compile the gadget

@java -Xmx256M -cp "%~dp0\src;%~dp0\bin;gwthome/gwt-user/1.6.4/gwt-user-1.6.4.jar;gwthome/gwt-dev/1.6.4/gwt-dev-1.6.4-windows.jar;repo\gwt-gadgets-1.0.2\gwt-gadgets-1.0.2\gwt-gadgets.jar;repo\gwt-fabridge\1.2.1\gwt-fabridge-1.2.1.jar;repo\r\pl\rmalinowski\gwt2swf\gwt2swf\0.6.0\gwt2swf-0.6.0.jar" com.google.gwt.dev.Compiler com.test.gadget.TestGadget -style DETAILED

And all the paths mentioned are correct and points to the proper jars as mentioned.

Any clue, or anything specific that i need to check?

Thanks and Regards,
Hafiz

2009/6/2 Eric Ayers <zun...@google.com>



--
He who asks is a fool for five minutes, but he who does not ask remains a fool forever.

Eric Ayers

unread,
Jun 2, 2009, 11:09:47 AM6/2/09
to gwt-goo...@googlegroups.com
No doubt, that is the version you are trying to debug with, but have you uploaded the compiled gadget to its new hosting place?  Are you sure you are deploying the new .gadget.xml file when you do?

The gadgets in the distribution and those hosted at gwt.google.com were compiled with GWT 1.5, so don't try debugging against those unless you are building with GWT 1.5

One other thing you can do is compile in pretty mode (add -pretty to the command line, then look at the compiled output.  The call go external.gwtOnLoad() should have '1.6' as the last argument.  Try downloading the gadget URL from your webbrowser and make sure it is serving up the right version.

Hafiz A Haq

unread,
Jun 2, 2009, 11:33:01 AM6/2/09
to gwt-goo...@googlegroups.com
Everything is taken care of, including the deployment of the compiled gadget.

On inspecting the cache.js file i found these entries at the beginning.

var $gwt_version = "1.6.4";
var $wnd = window;
var $doc = $wnd.document;
var $moduleName, $moduleBase;
I think this is what you meant by the version of the gadget.

glidealong

unread,
Jun 3, 2009, 2:39:50 AM6/3/09
to Google API Libraries for GWT


> One other thing you can do is compile in pretty mode (add -pretty to the
> command line, then look at the compiled output.  The call go
> external.gwtOnLoad() should have '1.6' as the last argument.  Try
> downloading the gadget URL from your webbrowser and make sure it is serving
> up the right version.
>
Thanks for pointing this, on inspecting the gadget xml, i found this -
$intern_3 = '1.5' which is indeed the third parameter for the onLoad
method.

Why is this so? How can i make sure that the compiler provide
$intern_3 = '1.6.4' as per the dependencies i mentioned the compile
comand?

Really appreciate your help.

Thanks and Regards,
Hafiz

glidealong

unread,
Jun 3, 2009, 2:51:46 AM6/3/09
to Google API Libraries for GWT
On manually modifying the value to 1.6 the above mentioned error has
gone, but i am facing a new issue
[ERROR] Unable to find 'com/test/gadget/TestGadget.gwt.xml' on your
classpath; could be a typo, or maybe you forgot to include a classpath
entry for source?

Can any one point how to bypass this?, cuz all the test gadgets are
rendering fine in the hosted mode env, only the one developed with the
gadget api is failing to load. Seems the hosted mode has mistaken the
gadget xml for a gwt module?

Thanks and Regards,
Hafi

Eric Ayers

unread,
Jun 3, 2009, 6:18:38 AM6/3/09
to gwt-goo...@googlegroups.com
It might make things clearer ir you make a new tab in iGoogle (or a
new page in whatever gadget container you are using) that contains
only the gadget being developed. You might get bogus warnings for
gadgets that are not being debugged, but for me, that is usually only
with gadgets developed with GWT.

This is kind of baffling. Is it at all possible that you are
compiling the gadget with GWT 1.5 (say, with a command line script)
and running hosted mode with GWT 1.6? (say, using the new Google
Plugin?)

Hafiz A Haq

unread,
Jun 3, 2009, 7:59:00 AM6/3/09
to gwt-goo...@googlegroups.com


2009/6/3 Eric Ayers <zun...@google.com>


It might make things clearer ir you make a new tab in iGoogle (or a
new page in whatever gadget container you are using)  that contains
only the gadget being developed.  You might get bogus warnings for
gadgets that are not being debugged, but for me, that is usually only
with gadgets developed with GWT.

I am running only this gadget in the container and the gadget works perfectly in my container and igoogle. But the gadget fails to render only in the hosted mode.
 


This is kind of baffling.  Is it at all possible that you are
compiling the gadget with GWT 1.5 (say, with a command line script)
and running hosted mode with GWT 1.6? (say, using the new Google
Plugin?)

Yes I am using gwt 1.6 plugin and compiling the gadget with the same jars as used by the latest plugin.

Can u please take a look at theTestGadget-compile.cmd contents that i had provided in one of the previous posts in the same thread and let me know if that is the issue?

But still , it is wierd that the gadget xml developed with gadgets api seems to beconsidered to be a module, but all the other gadgets are rendering properly , maybe the name of the gadget xml is causing the problem?

Thanks and Regards,
Hafiz

Eric Ayers

unread,
Jun 3, 2009, 8:05:53 AM6/3/09
to gwt-goo...@googlegroups.com
So, using the plugin, go to Window->Preferences->Google->Web toolkit
and tell me where your SDK setups point to. Then go to your project
and look under project ->Google->Web toolkit and make sure your hosted
SDK is setup with the 1.6 environment.

Hafiz A Haq

unread,
Jun 3, 2009, 9:21:34 AM6/3/09
to gwt-goo...@googlegroups.com
Yes, my eclipse preferences point to sdk version 1.6.4 and my gadget project preferences is also pointing to the same sdk. But what i don't understand is why my c
The container project is also using 1.6.4 sdk

Any clue.

Thanks and Regards,
Hafiz

2009/6/3 Eric Ayers <zun...@google.com>

Hafiz A Haq

unread,
Jun 3, 2009, 9:26:12 AM6/3/09
to gwt-goo...@googlegroups.com
what i was trying to type was ,

2009/6/3 Hafiz A Haq <hafi...@gmail.com>
Yes, my eclipse preferences point to sdk version 1.6.4 and my gadget project preferences is also pointing to the same sdk. The container project is also using 1.6.4 sdk .

 
But what i don't understand is why my gadget compiler is still putting $intern_3 = '1.5' in the gadget xml?!!!

Eric Ayers

unread,
Jun 3, 2009, 10:42:41 AM6/3/09
to gwt-goo...@googlegroups.com
OK, Haziz, you are doing everything right, there is a problem in the distribution.

I just reproduced the problem when using the pre-packaged GWT 1.6.4  and 1.0.2 gwt-gadget .jar files.  The .jar files were compiled with GWT 1.5, so that variable must be substituted in when the gwt-gadgets.jar is built, not when the compiler is run.  The problem goes away if you are working from source (like I usually do)

If you want to work around the problem, you can grab the source code from subversion (http://gwt-google-apis.googlecode.com/svn/releases/gadgets/1.0) and rebuild it under 1.6

I've created an issue to track the problem.  Please star it if you want to follow updates.

  http://code.google.com/p/gwt-google-apis/issues/detail?id=275

Thanks for your patience in helping get to the bottom of this,
-Eric.
Reply all
Reply to author
Forward
0 new messages