Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Getting a weird error in a GWT-generated function.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dmitri V  
View profile  
 More options May 16 2008, 9:25 pm
From: Dmitri V <dmitri...@gmail.com>
Date: Fri, 16 May 2008 18:25:08 -0700 (PDT)
Local: Fri, May 16 2008 9:25 pm
Subject: Getting a weird error in a GWT-generated function.
Hi all,

A bit of quick background info: I'm using the compiled JavaScript to
develop a Firefox extension (which is a simple login app). It's been
working relatively well so far, but I've come across a problem when I
implemented Remote Procedure Call (RPC) mechanism. The Java code
compiled without any problems, but when I ran it, I got an error when
executing the (Java) function that actually makes the RPC call.
Surprisingly, the error is not in what I wrote (as far as I can see),
but rather in one of the GWT-generated helper functions. Here's the
function itself:

function java_lang_StringBuffer_
$append__Ljava_lang_StringBuffer_2Ljava_lang_String_2(this$static,
toAppend){
  if (toAppend === null) {
    toAppend = 'null';
  }
  var last = this$static.js.length - 1;
  var lastLength = this$static.js[last].length;
  if (this$static.length > lastLength * lastLength) {
    this$static.js[last] = this$static.js[last] + toAppend;
  }
   else {
    this$static.js.push(toAppend);
  }
  this$static.length += toAppend.length;
  return this$static;

}

At some point in execution, toAppend is undefined, which generates an
error when toAppend.length is called.

I'm really having trouble tracking down the source of this problem.
Part of me thinks that my code is not initializing a variable or
something like that correctly, and another part of me wonders why the
GWT-generated code doesn't check that toAppend is undefined and handle
it appropriately.

Can anyone shed any light on this problem? Would be greatly
appreciated.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Olivier Monaco  
View profile  
 More options May 17 2008, 6:13 am
From: Olivier Monaco <olivier.mon...@free.fr>
Date: Sat, 17 May 2008 03:13:40 -0700 (PDT)
Local: Sat, May 17 2008 6:13 am
Subject: Re: Getting a weird error in a GWT-generated function.
Hi,

Which version of GWT do you use? Did you try to run your project in
Hosted mode? Did you call setServiceEntryPoint? If you have FireBug
installed you may try to check where the toAppend value come from...

Olivier.

On 17 mai, 03:25, Dmitri V <dmitri...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jeya.balaji  
View profile  
 More options May 19 2008, 2:41 am
From: "jeya.balaji" <jeya.bal...@gmail.com>
Date: Sun, 18 May 2008 23:41:35 -0700 (PDT)
Local: Mon, May 19 2008 2:41 am
Subject: Re: Getting a weird error in a GWT-generated function.
I am facing the similar issue.   I dont get the append error thou.
The apps is working in hosted env.  The screen is blank in a browser.

I commented the portion that has rpc call and I am seeing colorful
panels in the browser.

Upon analyzing through firebug, it looks like only rpc data fetch is
executed.  I could see the data pulled from the db and they are valid
data.  After the data is fetched, the screen is empty, as thou the rpc
didnt return the control to the screen painting modules.  (there is no
error reported by firebug)

setServiceEntryPoint is set as the apps is working in hosted env.
Using gwt 1.4.62

Thanks
Balaji

On May 17, 3:13 pm, Olivier Monaco <olivier.mon...@free.fr> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitri V  
View profile  
 More options May 28 2008, 1:49 pm
From: Dmitri V <dmitri...@gmail.com>
Date: Wed, 28 May 2008 10:49:51 -0700 (PDT)
Local: Wed, May 28 2008 1:49 pm
Subject: Re: Getting a weird error in a GWT-generated function.
Hi, thanks for replying.

I use GWT 1.4.61.

setServiceEntryPoint() is set, and I tried running it in Hosted mode,
and it actually ran in the sense that the prodecure call executed and
then the onFailure callback method was called. I'm having other issues
with exceptions in Hosted mode (thread here:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...)
right now, so I haven't even tried running the new code in non-hosted
mode. When I do, I'll bump this thread with whether or not the error
persists.

On May 17, 6:13 am, Olivier Monaco <olivier.mon...@free.fr> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmitri V  
View profile  
 More options May 30 2008, 4:23 pm
From: Dmitri V <dmitri...@gmail.com>
Date: Fri, 30 May 2008 13:23:28 -0700 (PDT)
Local: Fri, May 30 2008 4:23 pm
Subject: Re: Getting a weird error in a GWT-generated function.
Yeah, tried the new code in non-hosted mode and still get same
error....

On May 28, 1:49 pm, Dmitri V <dmitri...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sumit Chandel  
View profile  
 More options Jun 2 2008, 6:02 pm
From: Sumit Chandel <sumitchan...@google.com>
Date: Mon, 2 Jun 2008 15:02:35 -0700 (PDT)
Local: Mon, Jun 2 2008 6:02 pm
Subject: Re: Getting a weird error in a GWT-generated function.
Hi Dmitri,

The errors you described here and in the linked thread seem
symptomatic of something I've seen before. Specifically, problems like
this sometimes occur when there is a version conflict with the JARs
that were used during the GWT compilation process and the JARs that
are deployed on the server where the servlets are defined.

Can you double-check that you compiled your application with the same
GWT version as the gwt-servlet.jar that's deployed on your server?
Also, check that the shell script or run configuration you're using to
start hosted mode has the right version of the gwt-servlet.jar on its
classpath.

As for trying to identify if this problem also has something to do
with the extension you're working on itself, you can try creating a
simple JavaScript function that sends an XHR out to your server, and
check to see if the request makes it through.

Try it out and let us know how it goes.

Hope that helps,
-Sumit Chandel

On May 30, 1:23 pm, Dmitri V <dmitri...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
todd.seiber@gmail.com  
View profile  
 More options Jun 2 2008, 6:32 pm
From: "todd.sei...@gmail.com" <todd.sei...@gmail.com>
Date: Mon, 2 Jun 2008 15:32:44 -0700 (PDT)
Local: Mon, Jun 2 2008 6:32 pm
Subject: Re: Getting a weird error in a GWT-generated function.
I had a similar error awhile back. I did something silly like creating
an object that extended HashSet. This is typically fine but I was
experimenting in my IDE and accidentally overrode something like
iterator() with the default return null. It took a long time to track
down.

Are you by chance overriding a method in StringBuffer like what I
discribed?

On Jun 2, 6:02 pm, Sumit Chandel <sumitchan...@google.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google