Compilation failing

6 views
Skip to first unread message

Rahul

unread,
Aug 17, 2009, 1:18:30 PM8/17/09
to Google Web Toolkit
Hi,
My web application was working fine when it was running in hosted
mode, as soon as i compiled it, i got this error

[ERROR] Uncaught exception escaped
java.lang.StringIndexOutOfBoundsException: String index out of range:
16
at java.lang.String.substring(Unknown Source)
at com.example.test10.client.Test10$4.onResponseReceived(Test10.java:
330)
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 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)


any suggestions how to remove this error ?

Rahul

unread,
Aug 17, 2009, 2:06:44 PM8/17/09
to Google Web Toolkit
Hi,
Some more information,
when i compile the project i am getting succesful output i.e.
Compiling module com.example.test10.Test10
Compiling 6 permutations
Permutation compile succeeded
Linking into war
Link succeeded
Compilation succeeded -- 22.428s

but now when i run it i am gettin the error. And it was working fine
in the hosted mode

Ian Bambury

unread,
Aug 17, 2009, 2:16:01 PM8/17/09
to Google-We...@googlegroups.com
What OS are you developing in? What browser are you testing the compiled code in?

I suspect that you are not developing in Windows and are testing compiled code in IE. IE will report errors that other browsers don't (yeah I know 'typical IE', but there again if it didn't report errors when it should that would be 'typical IE' too).

If that is the case, then you need to compile with the  -PRETTY option and find out where the error is. Or try it on a Windows machine where you will get a proper error report.

If not, then more information would be useful.

Rahul

unread,
Aug 17, 2009, 2:22:11 PM8/17/09
to Google Web Toolkit
Hi thanks for the reply

I am using an Windows XP machine and i am developing in Eclipse using
the GWT toolkit. I am using the default google explorer which one gets
while using the hosted mode. Everything was running perfectly while i
was running it. But when i clicked on the Compile/Browse button the
application gave me this error.

The error is happenning in the following part of functionality. I am
parsing an xml document and storing its attributes in a string.Then i
am reading an substring from the main string. The line says string out
of index ( from searching on google) says that there is no character
of the string on that place. When checked now, the is no value being
stored presently in the string variable, which is odd, because i
created backup of the application before hitting on compile/browse
button and its still working fine with no errors.

any ideas how should i proceed.

On Aug 17, 2:16 pm, Ian Bambury <ianbamb...@gmail.com> wrote:
> What OS are you developing in? What browser are you testing the compiled
> code in?
> I suspect that you are not developing in Windows and are testing compiled
> code in IE. IE will report errors that other browsers don't (yeah I know
> 'typical IE', but there again if it didn't report errors when it should that
> would be 'typical IE' too).
>
> If that is the case, then you need to compile with the  -PRETTY option and
> find out where the error is. Or try it on a Windows machine where you will
> get a proper error report.
>
> If not, then more information would be useful.
>
> Ian
>
> http://examples.roughian.com
>
> 2009/8/17 Rahul <coolrahul18...@gmail.com>

Rahul

unread,
Aug 17, 2009, 2:53:40 PM8/17/09
to Google Web Toolkit
Hi
Some more information

I just checked that whenever i am compiling my application all the xml
files which i have stored war directory are deleted. So there are no
xml files and this is why i am getting the error. also is there any
way that those xml files are not deleted when i compiling?

But now i am hosting it on the tomcat server, where should i paste my
xml files. I pasted them C:\cbesb-2.1\tomcat\webapps\test10\test10,
( test 10 being my application name) but its not showing on the
browser.

any suggestions?

Lucas Neves Martins

unread,
Aug 17, 2009, 3:23:44 PM8/17/09
to Google Web Toolkit
You can try a debug from the entry point,

check all the places where you replace layouts onto the html page.

I don't know if your app contains sensitive data or information, but
if not, post some code - or the whole code - so I can help you.

Best if luck!

Rahul

unread,
Aug 17, 2009, 3:40:57 PM8/17/09
to Google Web Toolkit
thanks for the reply
i just checked that my application is running on IE
but its not running on firefox

Ian Bambury

unread,
Aug 17, 2009, 4:10:10 PM8/17/09
to Google-We...@googlegroups.com
Everything in the war file (or the rename-to in the gwt.xml file if you have one) gets deleted. Put them somewhere else outside of it, or in the public directory.
Reply all
Reply to author
Forward
0 new messages