1

I'm facing some problem using JBoss 7 here, i don't know why, but after i do the lookup i try to send a collection to my server and then turn the xml files into DB data. But, as soon as the lookup is made and i try to send the collections i receive this error msg:

Exception in thread "main" java.io.StreamCorruptedException: Unexpected byte found when reading an object: 0
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:755)
at org.jboss.marshalling.river.BlockUnmarshaller.readToEndBlockData(BlockUnmarshaller.java:124)
at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1613)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1273)
at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)
at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:437)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:202)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:181)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:144)
at $Proxy0.importXml(Unknown Source)
at principal.FeedClientDB.processArq(FeedClientDB.java:116)
at principal.FeedClientDB.processArq(FeedClientDB.java:101)
at principal.FeedClientDB.main(FeedClientDB.java:58)
Caused by: an exception which occurred:
in object of type xml.XmlDoc
in object of type xml.XmlDoc
in object of type xml.XmlDoc
in object of type xml.XmlDoc
in object of type xml.XmlDoc
in object of type xml.XmlDoc
in object of type xml.XmlDoc
in object of type xml.XmlDoc
in element at index [0] of size [49]

The element which i'm trying to send is an object that contains an attribute transient inputStream. I don't know if it should act this way or not.

  • There is probably an exception in the server.log as well. Can you post that as well? I'm assuming the above is the client side output? – Steve C Sep 25 '14 at 13:45
  • Nop, no exception on the server side. It breaks after you build the lookup and before the method to send the xml file is called. – Yuji Tashiro Sep 25 '14 at 13:48
  • $Proxy0.importXml(Unknown Source) <- that unknown sourse should be my object collection – Yuji Tashiro Sep 25 '14 at 13:51
  • Exactly which version of JBoss 7 are you using? Are you sure you're using the corresponding jboss-client.jar? – Steve C Sep 25 '14 at 14:09
  • Jboss EAP 6.1 + runtime server, and i believe it's the right jboss-client! – Yuji Tashiro Sep 25 '14 at 15:31
  • Well, `$Proxy0.importXml` looks like your remote method was invoked, and the stack trace looks like it has failed while reading the response. Do your request parameters and return value all implement java.io.Serializable correctly? – Steve C Sep 25 '14 at 15:49
  • I believe the problem might be with this variable were i set the xml **private transient InputStream fileData;**, but the major problem is, it used to work with the JBoss 5, but now it's not working at all. – Yuji Tashiro Sep 25 '14 at 15:55

2 Answers2

1

I have seen this error whenever the client and server are running different versions of java. For example, client running on java6 and server running on java7. Check https://developer.jboss.org/message/820070

If you have a redhat account, try https://access.redhat.com/solutions/167873

mendieta
  • 3,470
  • 2
  • 20
  • 23
1

Solved, i just changed the place where a did the xml conversion! Before, i was doing it inside the class with the main, where i called the lookup. But as i was doing it locally i changed the parameters from a xml object to a string and treated it in the Bean.