I am reading in a file, parsing it on the server, then storing data
into an object.  I then pass the object back to the client, but i keep
getting an error:

com.google.gwt.dev.shell.HostedModeException: 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

I dont have any int values in the object.  Both classes are serialized
because i am using RPC calls.

I add an array of doubles to a list that is part of the object, if i
remove List.add(doubles[]) it works successfully, but doesnt return
any data from my object.

Here is an excerpt from my code, where the issue is happening (server
Side) -> returning to client

           while ((inputLine = in.readLine()) != null)
                                        {
                                        String[] fName = new String[1];
                                        double[] newPolygonCoords = new 
double[8];
                                        if(inputLine.equals("<coordinates>") == 
true)
                                        {
                                                String newPolyLine = 
in.readLine();
                                                String[] one = 
newPolyLine.split(",");
                                                fName[0] = one[0];
                                                System.out.println(fName[0]);

                                                String newPolyLine1 = 
in.readLine();
                                                String[] two = 
newPolyLine1.split(",");
                                                newPolygonCoords[0] = 
Double.parseDouble(two[0]);
                                                
System.out.println(newPolygonCoords[0]);
                                                newPolygonCoords[1] = 
Double.parseDouble(two[1]);
                                                
System.out.println(newPolygonCoords[1]);

                                                String newPolyLine2 = 
in.readLine();
                                                String[] three = 
newPolyLine2.split(",");
                                                newPolygonCoords[2] = 
Double.parseDouble(three[0]);
                                                
System.out.println(newPolygonCoords[2]);
                                                newPolygonCoords[3] = 
Double.parseDouble(three[1]);
                                                
System.out.println(newPolygonCoords[3]);

                                                String newPolyLine3 = 
in.readLine();
                                                String[] four = 
newPolyLine3.split(",");
                                                newPolygonCoords[4] = 
Double.parseDouble(four[0]);
                                                
System.out.println(newPolygonCoords[4]);
                                                newPolygonCoords[5] = 
Double.parseDouble(four[1]);
                                                
System.out.println(newPolygonCoords[5]);

                                                String newPolyLine4 = 
in.readLine();
                                                String[] five = 
newPolyLine4.split(",");
                                                newPolygonCoords[6] = 
Double.parseDouble(five[0]);
                                                
System.out.println(newPolygonCoords[6]);
                                                newPolygonCoords[7] = 
Double.parseDouble(five[1]);
                                                
System.out.println(newPolygonCoords[7]);


                                        }
                                        newFileList.add(fName);                 
            the
error goes away if i remove these two lines
                                        newPolyList.add(newPolygonCoords);

                                        }
                                in.close();

                         srv.setPolyList(newPolyList);          the error goes 
away
if i remove these two lines
                         srv.setFNameList(newFileList);



                                        return srv;


Thanks for any advivce

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to