exception - java.io.EOFException When trying to read a serialized object -
i have serialized data object file , tried read object inside servelet.im getting below exception
java.io.eofexception @ java.io.objectinputstream$peekinputstream.readfully(unknown source) @ java.io.objectinputstream$blockdatainputstream.readshort(unknown source) @ java.io.objectinputstream.readstreamheader(unknown source) @ java.io.objectinputstream.<init>(unknown source)
my code is
fileinputstream fin; try { fin = new fileinputstream( "g:\\search\\webapp\\datamanager\\wslist" ); objectinputstream ois = new objectinputstream( fin ); inforpc newobj = ( inforpc ) ois.readobject(); newobj.getcategories(); ois.close(); return newobj; } catch ( filenotfoundexception e ) { e.printstacktrace(); } catch ( ioexception e ) { e.printstacktrace(); } catch ( classnotfoundexception e ) { e.printstacktrace(); }
any idea ?
Comments
Post a Comment