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

  • Home
  • SEARCH
  • 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 6193969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:12:52+00:00 2026-05-24T03:12:52+00:00

I am coding in GWT 2.3 using Eclipse. While I have had coding experience,

  • 0

I am coding in GWT 2.3 using Eclipse. While I have had coding experience, it has been limited to client-side. My current project involves creating a mapping program, which takes a list of points from an Excel sheet and places them on a predefined image. Now, I have my servlet and my client code connected, and I already have some idea how to read the Excel file.

My current problem: I get the following error when I load my application on Firefox using Development Mode:

Something other than an int was returned from JSNI method ‘@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::readInt()‘: JS value of type undefined, expected int

Development Mode’s console doesn’t give me any errors when I run, those it does tell me there is a [WARN] with two things I’m not using (images which I misnamed, but do not load ever).

Currently, my code is as follows:

In my Floor.java client side code:

 MyServiceAsync service = (MyServiceAsync) GWT.create(MyService.class);
    AsyncCallback<String> callback = new AsyncCallback<String>() {
        public void onFailure(Throwable caught) {
            printerModel.setText("FAILED");
            String details = caught.getMessage();
            printerModel.setText(details);
        }
        @Override
        public void onSuccess(String result) {
            //I purposefully have this as an empty method so I could figure out the error

        }
    };

    service.readFile("PrinterList.xls", callback);

In my MyService.java:

>public String readFile(String s);

In `MyServiceImpl.java`:

>public String readFile(String s) {

        // TODO Auto-generated method stub
        try {
           } catch (Exception e) {
        }
        return "foo";
    }

My AsyncCallback type is String, which seems to be causing the error. The method my client code calls returns a single String at this point, “fubar” (for simplicity). I thought that Strings were automatically serializable, but I am not sure. So, how do I get this error to go away? And how do I make the server code serialized?

  • 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-05-24T03:12:52+00:00Added an answer on May 24, 2026 at 3:12 am

    What the exception says is basically this:

    Client was trying to read an object from the data stream. Based on the signature of called method (or some other hint) the stream reader was expecting an int but found undefined instead.

    As for the serializability of String, your assumption is correct. They are serializable without any effort on your part.

    Without looking at the code and/or exception trace, it’s difficult to say anything more.


    EDIT:

    Your code seems fine to me. Is there a chance that you are mixing GWT versions? That is you compiled your GWT application with 2.3, but the server classpath contains an older GWT jar (or vice versa). Take a look at:

    1. Project GWT version settings. Project-> Properties -> Google -> Web Toolkit. Which version of GWT is selected there?
    2. Compare the GWT settings with Project -> Properties -> Java Build Path -> Libraries. How many GWT related jars do you see there? Which version? Are there more than one gwt-servlet-x.y.jar?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Iam coding a solution for web automation, I have been using the default web
I had been happily coding along on a decent sized solution (just over 13k
I am starting a project for which we will have a thin client, sending
I´m coding in C# and using Windows Forms. I have a textfile and want
In coding a traditional MVC application, what is the best practice for coding server-side
When coding, what in your experience is a better approach? Break the problem down
The coding is done using VS2008 There are two divs in my page namely
During coding I frequently encounter this situation: I have several objects ( ConcreteType1 ,
I've been coding alot of web-stuff all my life, rails lately. And i can
I have some experience in AJAX development, mostly on .NET and MooTools. However, I

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.