The issue is about java.lang.IndexOutOfBoundsException when getting Json Message

Dear ,
I write a java service and want to get the Json message from another Server. We used hessian function to transfer the Json message, I used the jar hessian-4.0.38.jar to get the returned message,At first i wirte the java coed in eclipse and the code runs normal and get the json message is OK , the json is a big data, but when i put the java code to webMethods as Java service, these has happend some strange things,Json Message seem to like a length limit, if the length is more than 32882, it’s has some issue:java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
There png has two Json message,the first one message, it can return OK by webMehods and Eclispse ,but the second one is only more than “errorCode”:“OK” ,it can’t return Json message by webMethods,but it can return normal by Eclipse.

WebMethosd version is about 9.0.1.0 for Linux, i used the hessian-4.0.38.jar .
When the json length is more than 32882, this line code has issue:


jsonString=sftpq.queryJson(custCode,operateType,date,AuthorizationCode,queryType); 

The issue detail as below:


java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
	at java.util.ArrayList.rangeCheck(ArrayList.java:604)
	at java.util.ArrayList.get(ArrayList.java:382)
	at com.caucho.hessian.io.HessianDebugState$ObjectState.<init>(HessianDebugState.java:1621)
	at com.caucho.hessian.io.HessianDebugState$State.nextObject(HessianDebugState.java:548)
	at com.caucho.hessian.io.HessianDebugState$CompactListState.next(HessianDebugState.java:2025)
	at com.caucho.hessian.io.HessianDebugState.next(HessianDebugState.java:113)
	at com.caucho.hessian.io.HessianDebugInputStream.read(HessianDebugInputStream.java:148)
	at java.io.InputStream.read(InputStream.java:179)
	at com.caucho.hessian.io.Hessian2Input.readBuffer(Hessian2Input.java:2844)
	at com.caucho.hessian.io.Hessian2Input.read(Hessian2Input.java:2816)
	at com.caucho.hessian.io.Hessian2Input.parseUTF8Char(Hessian2Input.java:2631)
	at com.caucho.hessian.io.Hessian2Input.parseChar(Hessian2Input.java:2576)
	at com.caucho.hessian.io.Hessian2Input.readString(Hessian2Input.java:1360)
	at com.caucho.hessian.io.BasicDeserializer.readObject(BasicDeserializer.java:181)
	at com.caucho.hessian.io.Hessian2Input.readObject(Hessian2Input.java:1835)
	at com.caucho.hessian.io.Hessian2Input.readReply(Hessian2Input.java:382)
	at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:195)
	at com.sun.proxy.$Proxy102.queryJson(Unknown Source)

Add some:
I used the WebMethosd version is about 9.0.1.0 for windows ,the Java Service is running normal,the Json message returned OK, what happend in these webMethods of different OS ?

If you do some tweaks in memory settings, you can resolve it. Give a try.

Thanks,

Thanks for your help, I set the memory settings but it still don’t work , and then i try it in the same webMethods version for the OS: windows, it’s work OK and return the right result, i think the webMethods for linux version don’t match the Hessian function and the version for windows is match it.