Re: Second try: app works on Linux, but not on Windows (1.6.4 hosted mode)

2009-05-12 Thread mlgm

Scott,

thanks for the answer, I was giving up my hope!

I did the debugging you asked for and from what I found, I was able to
find the problem and a workaround myself :-). I'm not sure though if
it should work as it was before. At least with Firefox on Linux it
did, but I'm no browser and JavaScript expert.

What happened is this: I'm trying to build an application, where the
GWT module should react on an outside parameter. As a possibility for
doing this, I had found the following solution on the Internet. First,
I created a little JavaScript inside the host page (i.e. a host
servlet) with a variable for the parameter:

   script language=javascript
  var event=aa00aa00aa00aa00aa01;
   /script

Then this variable is read from inside the GWT module by using a small
native JavaScript method:

public native String getEventRID()/*-{
return $wnd.event;
}-*/;

The problem now seems to be, that I called my variable event (as in
performance). If I change the variable name to something else, it
works. As I said, I'm more of a Java expert and have nearly no
JavaScript knowledge and don't know if I'm not allowed to create a
variable named event, at least in Internet Explorer. BTW, I tested
it with IE6 and IE7, but not IE8.

In case you might want to analyze this further, here are the debugging
values:

In IDispatchImpl.callMethod()

   cl = com.google.gwt.dev.shell.compilingclassloa...@ea5140
   jthis = null
   params = [VT_BSTR{aa00aa00aa00aa00aa01}]
   method = static boolean com.google.gwt.user.client.DOM.previewEvent
(com.google.gwt.user.client.Event)

In SwtOleGlue.convertVariantsToObjects()

   i = 0

Thanks again and GWT rocks!

Best wishes

Michael

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



Second try: app works on Linux, but not on Windows (1.6.4 hosted mode)

2009-05-08 Thread mlgm

Hi,

I ported my app to GWT 1.6.4 and the Google Eclipse Plugin and it
worked on my Linux desktop. But when I checked out the project on my
Windows notebook and tried to run it in hosted mode, I started to
receive exceptions. See below for the first exception, which is a
ClassCastException in JsValueGlue. In the application it is thrown
inside Image(String filename).

This exception seems to be catched somewhere and the application
continues, but a similar exception seems to get thrown on each mouse
event in the event loop, so the application can't be used.

I need help, because I'm stuck with this problem. I already asked once
in this group but got no answer. As the application runs fine on Linux
(checked out from the same repository), I figure it might be a GWT bug
with Windows or Internet Explorer? I could provide further details
from the debugger, it you tell me what you need. Unfortunately the
application is rather complex and I can't provide a simple sample
showing the problem.

Thanks in advance for any help!

Best wishes

Michael



java.lang.ClassCastException
at java.lang.Class.cast(Unknown Source)
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:
125)
at
com.google.gwt.dev.shell.ie.SwtOleGlue.convertVariantsToObjects
(SwtOleGlue.java:57)
at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod
(IDispatchImpl.java:119)
at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke
(IDispatchProxy.java:155)
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.ole.win32.COM.VtblCall(Native
Method)
at org.eclipse.swt.internal.ole.win32.IDispatch.Invoke
(IDispatch.java:64)
at org.eclipse.swt.ole.win32.OleAutomation.invoke
(OleAutomation.java:493)
at org.eclipse.swt.ole.win32.OleAutomation.invoke
(OleAutomation.java:417)
at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvokeOnWindow
(ModuleSpaceIE6.java:68)
at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.doInvoke
(ModuleSpaceIE6.java:153)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative
(ModuleSpace.java:453)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid
(ModuleSpace.java:251)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid
(JavaScriptHost.java:107)
at com.google.gwt.dom.client.ImageSrcIE6.addTop
(ImageSrcIE6.java)
at com.google.gwt.dom.client.ImageSrcIE6.setImgSrc
(ImageSrcIE6.java:80)
at com.google.gwt.dom.client.DOMImplIE6.imgSetSrc
(DOMImplIE6.java:214)
at com.google.gwt.dom.client.ImageElement$.setSrc$
(ImageElement.java:120)
at com.google.gwt.user.client.ui.Image$UnclippedState.setUrl
(Image.java:275)
at com.google.gwt.user.client.ui.Image$UnclippedState.init
(Image.java:245)
at com.google.gwt.user.client.ui.Image.init(Image.java:356)
at test1.module.user.client.steps.StepLayouter2.getWidget
(StepLayouter2.java:116)
at test1.module.user.client.steps.StepV.getWidget(StepV.java:
122)
at test1.module.user.client.UserModule.showStep
(UserModule.java:198)
at test1.module.user.client.UserModule.onValueChange
(UserModule.java:178)
at test1.module.user.client.UserModule$1.onSuccess
(UserModule.java:136)
at test1.module.user.client.UserModule$1.onSuccess
(UserModule.java:1)
at
com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived
(RequestCallbackAdapter.java:215)
at
com.google.gwt.http.client.Request.fireOnResponseReceivedImpl
(Request.java:264)
at
com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch
(Request.java:236)
at com.google.gwt.http.client.Request.fireOnResponseReceived
(Request.java:227)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke
(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod
(IDispatchImpl.java:126)
at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke
(IDispatchProxy.java:155)
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 

ClassCastException in JsValueGlue.java:125

2009-04-29 Thread mlgm

Hi,

I'm developing a GWT application which I recently ported to GWT 1.6.4
and the Google Eclipse Plugin (Eclipse 3.4.2). The ported application
works fine under Linux (hosted and web mode), but when I start it in
hosted mode under Windows XP, I get the following stacktrace.

The application starts with an RPC call in onModuleLoad() and
depending on the answer it creates the user interface in onSuccess()
of the AsyncCallback. This seems to get finished, but afterwards, when
the event processing loop should take over, errors start to appear
immediately. It seems that an exception is created on each mouse
event, because when I just move the mouse over the window, I get one
Exception after the other.

I have no idea what could cause those exceptions, but figure as it
works ok in Linux it might be a GWT problem? Any ideas what I can do?
What information should I provide in an issue report?

Here's the stacktrace:

java.lang.ClassCastException
at java.lang.Class.cast(Unknown Source)
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:
125)
at
com.google.gwt.dev.shell.ie.SwtOleGlue.convertVariantsToObjects
(SwtOleGlue.java:57)
at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod
(IDispatchImpl.java:119)
at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke
(IDispatchProxy.java:155)
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)

Thanks

Michael

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