File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Why this stand alone app cannot communicate with servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Why this stand alone app cannot communicate with servlet" Watch "Why this stand alone app cannot communicate with servlet" New topic
Author

Why this stand alone app cannot communicate with servlet

arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
Hello,
I was trying to communicate from a stand alone application to servlet through URL connections. but while retrieving back the information it gives me error that Stream is not seralized.
where i am wrong? pl help.
regards,
Arun
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Going to move this to the servlets forum.
Probably get a better response there


Dave
arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
Oh Dave where you have moved me? There seems no taker for this question....Please help me..
regards,
arun
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
What is the exact exception and where is it thrown?
Bill
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16101
    
  21

It's very likely that the serializer of the client isn't compatible with the serializer on the server.
Try transmitting the data in text format instead of using writeObject.


Customer surveys are for companies who didn't pay proper attention to begin with.
arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
The exact Error is:
java.io.StreamCorruptedException: Caught EOFException while reading the stream h
eader
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:727
)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:165)
at LogoServer.test.NewServer.readLocal(Compiled Code)
at LogoServer.test.NewServer.run(NewServer.java:46)
Gerry Giese
Ranch Hand

Joined: Aug 02, 2001
Posts: 247
A little more info, please: + Is the client app or the servlet throwing the exception? I don't think that when you write your objects you should cast them as (Object). See The Java Tutorial: Serializing Objects.


CJP (Certifiable Java Programmer), AMSE (Anti-Microsoft Software Engineer)
Author of Posts in the Saloon
arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
Server application is giving me this error. In any case I will look into the given link and will let you know how much helpful it is.
regards,
arun
 
wood burning stoves
 
subject: Why this stand alone app cannot communicate with servlet