Google Groups Home
Help | Sign in
Any one know what this exception means?
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
  6 messages - Collapse all
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
David Goodenough  
View profile
 More options Aug 16 2006, 5:58 pm
From: David Goodenough <david.goodeno...@btconnect.com>
Date: Wed, 16 Aug 2006 22:58:31 +0100
Local: Wed, Aug 16 2006 5:58 pm
Subject: Any one know what this exception means?
I am using a slightly modified version of HTTPRequest (so that I can set the
ContentType to text/xml as the pre-existing host application I am talking to
requires).  That is the only functional change, but obviously I had to make
a view changes to invoke the right HTTPRequestImpl (and I had to have my own
copies).  When this comes to call back to the response handler I get:-

Error: [Exception... "'java.lang.ClassCastException' when calling method:
[nsIOnReadyStateChangeHandler::handleEvent]"  nsresult: "0x8057001c
(NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "<unknown>"  data: no]

in the Javascript console (of Firefox).  

The modified code reads:-

  private native boolean asyncPostImpl(String user, String pwd, String url,
String postData, ResponseTextHandler handler) /*-{
    var xmlHttp =
th...@uk.co.dga.epod.client.XmlHTTPRequestImpl::doCreateXmlHTTPRequest()();
    try {
      xmlHttp.open("POST", url, true);
      xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
      xmlHttp.onreadystatechange = function() {
        if (xmlHttp.readyState == 4) {
          delete xmlHttp.onreadystatechange;
          var localHandler = handler;
          var responseText = xmlHttp.responseText;
          handler = null;
          xmlHttp = null;

localHandl...@com.google.gwt.user.client.ResponseTextHandler::onCompletion(Ljava/lang/St ring;)
(responseText);
        }
      };
      xmlHttp.send(postData);
      return true;
    }
    catch (e) {
      delete xmlHttp.onreadystatechange;
      handler = null;
      xmlHttp = null;
      return false;
    }
  }-*/;

and I guess that the localHandl...@com.google.gwt... line is one causing the
problem.  I know it gets into the readyState == 4 block, and I know it does
not get into my handler onCompletion method (which does exist, which does have
a void return and a single String arguement.  I have not modified the
ResponseTextHandler code, nor taken a private copy (there was no need).

I am using GWT 1.1.0 on a Linux box, with the app served by Tomcat and Firefox
as the browser.

Any help greatfully received.

David


    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.
David Goodenough  
View profile
 More options Aug 17 2006, 6:35 am
From: David Goodenough <david.goodeno...@btconnect.com>
Date: Thu, 17 Aug 2006 11:35:37 +0100
Local: Thurs, Aug 17 2006 6:35 am
Subject: Re: Any one know what this exception means?
Turns out I get exactly the same if I stop using my modified HTTPRequest and
use the standard one.  So I guess this is nothing to do with my modification.

Anyone met this before?

David

On Wednesday 16 August 2006 22:58, David Goodenough 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.
Scott Blum  
View profile
 More options Aug 17 2006, 10:24 pm
From: "Scott Blum" <sco...@google.com>
Date: Thu, 17 Aug 2006 22:24:42 -0400
Local: Thurs, Aug 17 2006 10:24 pm
Subject: Re: Any one know what this exception means?

Hi David,

Never seen anything like this!  Is it happening in hosted mode or web mode?
What browser version are you using.

Scott

On 8/17/06, David Goodenough <david.goodeno...@btconnect.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.
David Goodenough  
View profile
 More options Aug 18 2006, 4:50 am
From: David Goodenough <david.goodeno...@btconnect.com>
Date: Fri, 18 Aug 2006 09:50:35 +0100
Local: Fri, Aug 18 2006 4:50 am
Subject: Re: Any one know what this exception means?
Scott,

As it says at the bottom, this was Firefox (1.5.0.4) served from Linux.  It
turned out that this was not a problem where I thought it was at all, but
was a problem in the way I was using the XML code (the removeWhiteSpace
problem I think).

BTW, running Firefox (which I have to as Konqueror is not yet supported) I
notice that it reports lots of Javascript warnings.  Some look benign, but
is there a bug tracking their resolution and making sure they are benign?

Talking of Konqueror why is it not supported?  Under the skin both Safari
and Konqueror use the same engine (khtml), and although old Konqueror was
not much use in the Javascript/AJAX world since Safari's fixes were put
back into it, it has been much better (exactly like Safari in fact).  Could
it be recognised as an alias for Safari?  If you want some help testing
I would be happy to help.

David

On Friday 18 August 2006 03:24, Scott Blum 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.
Scott Blum  
View profile
 More options Aug 18 2006, 5:01 pm
From: "Scott Blum" <sco...@google.com>
Date: Fri, 18 Aug 2006 17:01:45 -0400
Local: Fri, Aug 18 2006 5:01 pm
Subject: Re: Any one know what this exception means?
Glad you found the problem, I wouldn't have had a clue where to start
on that. :D

As far as the FF warnings.. I'm pretty sure a basic GWT app can and
should run without warnings if everything is in a good state.  I would
see if I can track those down.  In hosted mode, exceptions escaping to
the browser should show up as red logged items in the tree log. In web
mode, as you observed, they go to the FF console.  For the windows
users, with Visual Studio installed and the right settings in IE, you
can debug from the point of failure.

With regards to Konqueror, I don't think there's any reason we
wouldn't eventually support it, but there are a lot of high priority
items.  If you'd like to play around with it, you can modify
UserAgent.gwt.xml to recognize Konqueror's user agent string and
return a new "konqueror" property value.  Then you'd need to go into
the other gwt.xml's in gwt-user.jar that depend on UserAgent.gwt.xml
and setup rebind rules for "konqueror".  As an initial pass you could
probably just set it to return the Safari implementations and then
fork off from Safari when you run into incompatibilities.

Scott


    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.
David Goodenough  
View profile
(1 user)  More options Aug 18 2006, 5:44 pm
From: David Goodenough <david.goodeno...@btconnect.com>
Date: Fri, 18 Aug 2006 22:44:40 +0100
Local: Fri, Aug 18 2006 5:44 pm
Subject: Re: Any one know what this exception means?
On Friday 18 August 2006 22:01, Scott Blum wrote:
> Glad you found the problem, I wouldn't have had a clue where to start
> on that. :D

> As far as the FF warnings.. I'm pretty sure a basic GWT app can and
> should run without warnings if everything is in a good state.  I would
> see if I can track those down.  In hosted mode, exceptions escaping to
> the browser should show up as red logged items in the tree log. In web
> mode, as you observed, they go to the FF console.  For the windows
> users, with Visual Studio installed and the right settings in IE, you
> can debug from the point of failure.

I am trying to use Firebug, but I have not got it going yet.  The warnings
only happen in "strict Javascript" mode as far as I can tell.

> With regards to Konqueror, I don't think there's any reason we
> wouldn't eventually support it, but there are a lot of high priority
> items.  If you'd like to play around with it, you can modify
> UserAgent.gwt.xml to recognize Konqueror's user agent string and
> return a new "konqueror" property value.  Then you'd need to go into
> the other gwt.xml's in gwt-user.jar that depend on UserAgent.gwt.xml
> and setup rebind rules for "konqueror".  As an initial pass you could
> probably just set it to return the Safari implementations and then
> fork off from Safari when you run into incompatibilities.

I will give it a go.


    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
©2008 Google