hello world,
i am using jonas 2.1.1 over rmi with jdk 1.2.2 on a linux box.
my problem is, that i want to pass an large string from server to
client. This works fine until the size of the string exceeds
approximatly 80kByte. From this size i get following exception on the
client':
java.rmi.UnmarshalException: error unmarshalling return; nested
exception is:
java.io.UTFDataFormatException
java.io.UTFDataFormatException
at java.io.DataInputStream.readUTF(DataInputStream.java:537)
at java.io.DataInputStream.readUTF(DataInputStream.java:494)
at
java.io.ObjectInputStream.readUTF(ObjectInputStream.java:1667)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:319)
at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:228)
at
sb.ao.search.JOnASSearchRemote_Stub.findBySqlExprXML(JOnASSearchRemote_Stub.java:275)
at sb.ao.search.SearchClient.search2(SearchClient.java:138)
at sb.ao.search.SearchClient.main(SearchClient.java:82)
The String is created with this code and the code is used within an
stateful session-bean.
public String toString()
{
String xml;
try {
StringWriter o = new StringWriter();
for (int i = 0; i<=50000; i++)
o.write('a');
xml=o.toString();
System.out.println(o);
o.close();
} catch ( java.io.IOException iox ) { iox.printStackTrace(); xml =
iox.toString(); }
return xml;
}
Decreasing the size to 50000 will let the code work.
Is this a known Bug ?
If Yes
a) is there a workaround
b) is there a better approach to solve this problem. ( I do not neet to
pass a string if there is a other possibility which guides me to
succsess.)
wbr
Reinhard Ruiner
begin:vcard
n:Ruiner;Reinhard
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
note:
x-mozilla-cpt:;0
fn:Reinhard Ruiner
end:vcard