Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7904579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:08:39+00:00 2026-06-03T10:08:39+00:00

My GWT app is throwing this exception: Caused by: java.lang.ClassCastException: com.google.gwt.core.client.JavaScriptObject$ cannot be cast

  • 0

My GWT app is throwing this exception:

Caused by: java.lang.ClassCastException: com.google.gwt.core.client.JavaScriptObject$ cannot be cast to java.lang.String

When getting the String response of this function via JSNI:

public final native String data()/*-{
    return $wnd.getdata();
}-*/;

}

Here’s the Javascript code:

  function getdata(){
    var data = MyObject.data();
    console.log(data);
    return data;
  }

I’m logging the data output from Firebug and here’s the output (to check if the js function is actually returning something):

-0.00030517578125,0.00006103515625,0.00115966796875,0.00146484375,-0.00091552734375,-0.000946044921875,-0.001983642578125,-0.003997802734375,-0.005126953125,-0.00360107421875,-0.0032958984375,-0.004119873046875,-0.00433349609375,-0.0023193359375,-0.0008544921875,-0.003448486328125,-0.00347900390625,-0.0054931640625,-0.0067138671875,-0.005279541015625,-0.006072998046875,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:08:42+00:00Added an answer on June 3, 2026 at 10:08 am

    A simple solution is probably $wnd.getdata().toString(); but maybe you should try typeof $wnd.getdata() to see what the type really is — maybe it’s a bug lurking somewhere else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my GWT app I have the following model class: import com.google.gwt.user.client.rpc.IsSerializable; public class
Google Web Toolkit has a JSON library (com.google.gwt.json.client). The 'client' part of that name
I have a typical GWT app, in my module.xml, I have, <inherits name='com.google.gwt.user.theme.standard.Standard' />
I have this gwt app which say, runs on http://mygwtapp.com/ (which is actually: http://mygwtapp.com/index.html
I'm creating a GWT app in Google App Engine, and using Google data store.
So, I'm using google datastore for my GWT app and my coworker came up
I am trying to integrate a d3 script into gwt web-app. However I cannot
I've configured my GWT app with Guice as documented here . With this setup
I'm developing a GWT app running on the Google App Engine and wondering if
I am developing a GWT app for the Google Apps marketplace. I am using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.