javascript error from remote client

I am trying Vaadin on a new project and under eclipse the application works fine. When I connect from a remote browser the page seems to load but I get the following error (copy of debug window):

--------------------------- start --------------------------------

Debug window

Clear console Restart app Force layout Analyze layouts

Drag=move, shift-drag=resize, doubleclick=min/max.Use debug=quiet to log only to browser console.

Vaadin application servlet version: 6.2.6

Widget set is built on version: 6.2.6

Application version: NONVERSIONED

Warning: widgetset version 6.2.6 does not seem to match theme version

inserting load indicator

Making UIDL Request with params: init

Server visit took 18ms

JSON parsing took 1ms

change

LOADING

com.google.gwt.core.client.JavaScriptException: (TypeError): c.getBoxObjectFor is not a function stack: Ao([object HTMLHtmlElement]
,[object HTMLDivElement]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:3377 zo([object HTMLDivElement]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:1856 Oeb([object HTMLDivElement]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:2642 nyb([object Object]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:2808 xyb([object Object]
,“v-panel”)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:2101 myb([object Object]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:3523 vib([object Object]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:3621 jcb([object Array]
,[object Object]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:2623 Y8([object Object]
,[object Array]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:2921 Oub([object Array]
,[object Object]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:3618 gLb([object Object]
,[object Array]
,[object Object]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:3630 d9([object Object]
,[object Object]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:3633 aab([object Object]
,[object Object]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:2966 cab([object Object]
,[object Object]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:3444 Ox([object Object]
,[object Object]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:2994 ry([object XMLHttpRequest]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:2081 ([object Event]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:2328 _k((function () {a.Sb(b);}),[object XMLHttpRequest]
,[object Object]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:2538 ([object Event]
)@http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html:2115 fileName: http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html lineNumber: 3377

Processing time was 26ms for 3436 characters of JSON

Referenced paintables: 6

Making UIDL Request with params: 604138JSESSIONID FE32DED6AAF79406A746B39DE956F609PID2cookiesc

Server visit took 7ms

JSON parsing took 0ms

Processing time was 0ms for 59 characters of JSON

Referenced paintables: 6.

--------------------------- end --------------------------------

Any idea if what can be?

I have also tried to generate the war file. It is generated but strangely Tomcat does not expand it and does not see the application. Any idea of what can happen?

It’s hard to say what the problem could be, but my first guess is that there’s something wrong with the custom widget set you’re using. Do you have your own custom widgets or are you using some addons?

There could also be something wrong with the installation; uncompiled widget set or some version incompatibility, such as badly installed widget sets or themes.

The “Warning: widgetset version 6.2.6 does not seem to match theme version” worries me a bit. It might be nothing, but reading the source code, its not quite clear to me in which situations the warning is displayed.

Tahks Marko,

No I’m not using any custom widget, The only widget I installed is the Vaadin Chamelon Theme.

What is quite strange is that on local machine it works, seems to be a problem with GWT (by the way IS a problem with GWT) The only difference is that in my local machine I have GWT installed.

I tried to recompile all components and I got some errors:

Validating newly compiled units
[ERROR]
Errors in ‘jar:file:/home/franco/jProjects/ps/hzplan/WebContent/WEB-INF/lib/vaadin-6.3.0.jar!/com/vaadin/terminal/gwt/client/ui/VDragAndDropWrapper.java’
[ERROR]
Line 75: The method findWidget(Element, null) is undefined for the type Util
[ERROR]
Line 519: The method isDynamicHeight() from the type VCustomComponent is not visible
[ERROR]
Line 519: The method isDynamicWidth() from the type VCustomComponent is not visible
[ERROR]
Errors in ‘jar:file:/home/franco/jProjects/ps/hzplan/WebContent/WEB-INF/lib/vaadin-6.3.0.jar!/com/vaadin/terminal/gwt/client/ui/dd/VTargetInSubtree.java’
[ERROR]
Line 24: The type com.vaadin.terminal.gwt.client.ui.VTree.TreeNode is not visible
[ERROR]
Line 33: TreeNode cannot be resolved to a type
[ERROR]
Line 33: The method getNodeByKey(String) is undefined for the type VTree
[ERROR]
Line 42: Incompatible conditional operand types Widget and TreeNode
[ERROR]
Line 42: TreeNode cannot be resolved to a type
[ERROR]
Line 43: TreeNode cannot be resolved to a type
[ERROR]
Errors in ‘jar:file:/home/franco/jProjects/ps/hzplan/WebContent/WEB-INF/lib/vaadin-6.3.0.jar!/com/vaadin/terminal/gwt/client/ui/dd/VDragAndDropManager.java’
[ERROR]
Line 86: The method getElementFromPoint(int, int) is undefined for the type Util
[ERROR]
Line 420: The method findWidget(Element, null) is undefined for the type Util

The erroes seem to pertain to Vaadin library. Shall I upgrade vaadin? Can anubody please provide a link to upgrade procedure (I could find only install instructions).

Thanks

I’m not sure if there is also another problem, but you certainly seem to have classes from two different Vaadin versions on your classpath - probably two different Vaadin versions. If not two different Vaadin JARs, check that any resources you have copied out from the Vaadin JAR are up to date. Also, server caches and working directories might contain copies of old classes.

In many cases, upgrading Vaadin is a matter of replacing the Vaadin JAR and recompiling your widgetset. If you have deployed resources (themes or widgetsets) outside the JAR, you need to update them as well.

Depending on the versions between which you are upgrading, there might be some additional steps to take - see the release notes on
the download page
or
the forum
.

Thank you very much Henry!

I have no different Vaadin versions, but I have two GWT installed in same Eclipse, this is probably the cause, I will clean-up everything next weekend and problem will probably disappear.

Thanks again for your quick help!

Hi Henry,

I tried all possibilities, I installed last Vaadin version (6.3.3), I even moved the project to NetBeans: same problem. But the problem does not depend on being remote as I initially thought, it is a problem of browser compatibility. What happens is that I am using Firefox 3.5 on my local machine and Firefox 3.6 on remote (Windows). To confirm I tested under Chrome (local and remote) and IE (remote) and got exactly the same problem : com.google.gwt.core.client.JavaScriptException: (TypeError): Object [object HTMLDocument]
has no method ‘getBoxObjectFor’ stack: TypeError: Object [object HTMLDocument]
has no method ‘getBoxObjectFor’

I could try to understand what happens but my GWT knowledge is limited and further complicated by the fact I don’t know Vaadin code (by the way I decided to try Vaadin to avoid the effort I had in a previous project that was pure GWT).

I use exclusively Vaadin native components and my project is not large. Do you have any other idea of what can be happening? My project was almost completed and I wouldn’t like to give up at this point, even because I liked very much Vaadin approach. As an alternative (if some reader is interested) , I would also be glad to pay for specific support to solve this problem, at least to evaluate (with application running) if this framework fits my needs.

My suspicion is still that you have a Vaadin version incompatibility problem. Even though you use only the standard components in the Vaadin library, you clearly had compiled a custom widgetset in your post on May 19th:

http://192.168.1.102:8080/ps-hzplan/VAADIN/widgetsets/net.cbsolution.ps.hzplan.widgetset.Ps_hzplanWidgetset/3742F86E2C3BD5E30E39097B9AC4B891.cache.html

Even if you don’t have custom widgets, you may have accidentally compiled a widget set, for example by clicking the “Compile Widgetset” button in Eclipse or somehow otherwise. Make sure that the [tt]
VAADIN/widgetsets
[/tt] directory is totally empty. It’s actually not needed at all if you don’t use custom widgets or add-ons. Also remove possible widgetset setting from web.xml.

Also make sure that there’s no “reindeer” or base theme in [tt]
VAADIN/themes/
[/tt], only your own theme if you have one. Notice that the chameleon theme is not a “widget”, but a theme. You should normally use it from the JAR at least during development, not extract it.

At least your earlier messages indicated that you might have both Vaadin 6.2.6 and 6.3.0 installed, which would obviously cause problems. Please check your project settings and classpath. See what the compilation says about the versions.

If you are working with a commercial/work project, you might want to check out
Vaadin support services
or make a contact. We try to help on the forum of course, but if you are in a hurry, you might find commercial support useful.

Marko,

Thanks really a lot for your ALMOST IMMEDIATE REPLY!!! That was indeed the problem, and I can now complete the project.

Yes, I had recompiled the widget set, trying to solve the problem. I will need some custom widgets in future but I can survive without them.

Thanks a lot,

franco

Using a custom widget set should not be a problem, you just need to remember to re-compile it whenever you upgrade Vaadin or other widgets (whether your own or from add-ons.