Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

StreamCorruptedException from Java Client calling Stateless EJBs

10 views
Skip to first unread message

William Poitras

unread,
Mar 14, 2003, 2:59:17 PM3/14/03
to
When calling an EJB from a command line client machine I get the
following exception. This works in one of my environments, but the same
software doesn't in another. I can't find the differences between the
two environments. Anybody have any ideas where to look? I've made sure
both machines are running the same versions

Java:
java version "1.3.1_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_03-b03)
Java HotSpot(TM) Client VM (build 1.3.1_03-b03, mixed mode)

Solaris:
SunOS lakeville 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-80

Weblogic, 2 machines in a cluster: (WLS 7.0)
Machine1: WebLogic Temporary Patch for CR087872 10/14/2002 11:13:13
Machine2: WebLogic Temporary Patch for CR087872 10/14/2002 11:13:13

The client is running on Machine1 doing its Bean lookups on Machine1

main:Exception ->failed to unmarshal interface java.util.Collection;
nested exception is:
java.io.StreamCorruptedException: Type code out of range, is 103
java.rmi.UnmarshalException: failed to unmarshal interface
java.util.Collection; nested exception is:
java.io.StreamCorruptedException: Type code out of range, is 103
java.io.StreamCorruptedException: Type code out of range, is 103
at java.io.ObjectInputStream.peekCode(ObjectInputStream.java:1551)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:287)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1181)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
at
java.io.ObjectInputStream.skipToEndOfBlockData(ObjectInputStream.java:1489)
at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1211)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
at java.util.ArrayList.readObject(ArrayList.java:526)
at java.lang.reflect.Method.invoke(Native Method)
at
java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2209)
at
java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1406)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:381)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:231)
at
weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:140)
at
weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:91)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:56)
at
weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:161)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:263)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:229)
at
com.tfn.autex.ejb.support.impl.FFGroupManagerBean_97vaby_EOImpl_WLStub.getGroups(Unknown
Source)
at com.tfn.autex.util.ASCClient.getClusterMap(ASCClient.java:583)
at com.tfn.autex.util.ASCClient.getAllSessions(ASCClient.java:262)
at
com.tfn.autex.util.ASCClient.displayAllHelper(ASCClient.java:339)
at com.tfn.autex.util.ASCClient.displayAll(ASCClient.java:406)
at com.tfn.autex.util.ASCClient.<init>(ASCClient.java:132)
at com.tfn.autex.util.ASCClient.main(ASCClient.java:552)

Ryan LeCompte

unread,
Mar 17, 2003, 6:28:09 PM3/17/03
to

Hello William,

I would suggest comparing the CLASSPATH variables of the two environments. Try
to figure out if there is something in the CLASSPATH of the machine that's throwing
the exception that could be blocking the actual API that you wish to use. For
example, I have seen this error occur when trying to use java.sql.Blob instead
of using WebLogic's OracleBlob in weblogic.jar. I'm not sure if you are working
with BLOBs at all, but I'm sure that this could be a CLASSPATH issue. If the CLASSPATH's
are the same, then please provide further information about what your code is
actually doing so that we may further investigate the problem.

Also, see the following link for more possible causes of the problem:

https://lists.xcf.berkeley.edu/lists/advanced-java/2002-June/018895.html


Best regards,

Ryan LeCompte
ryanle...@louisiana.edu
http://www.louisiana.edu/~rml7669

William Poitras

unread,
Mar 18, 2003, 1:30:26 PM3/18/03
to
Thanks for the reply.

My Java client resolves the home from the clustered machines (which has
the beans built with clustered homes) and calls the EJB and expects an
object implimenting the Collection interface in return.

The Stateless session bean queries a Sybase database, puts the result
set into an ArrayList of value objects. The value object class is
externalizable and only uses primitive types or object versions of those
primitive types. The EJB returns the ArrayList.

The classpath for both environments is the same for both the WLS servers
and the Java client.

0 new messages