I'm passing very large objects (up to 1MByte approx) from the server to the
client, with no problems.
But I haven't tried passing large strings. You might want to try writing a
wrapper class for your string, making it serializable, and passing that
instead.
Joe
-----Original Message-----
From: Reinhard Ruiner [SMTP:[EMAIL PROTECTED]]
Sent: Monday, December 11, 2000 6:52 PM
To: [EMAIL PROTECTED]
Subject: passing large objects from server 2 client
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_S
tub.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
<< File: r.ruiner.vcf >>
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".