AS400 dataqueue read error-Array index outof bound

Hi ,
I am using AS400 adapter ,In that i am get error while reading data queue.
It says array index out of bound( when i looked at the administrator for error logs).I was not getting this error every time this happens once in 10 times .
I really appreciate any inputs , thanks to uall


You might need to provide more information…

What version of the AS400 Adapter? Also a bit more information on what your code is attempting to do would be useful…

The version is AS400 1.0 and my code trying to read data from the read queue

I’m assuming by version 1.0 you are referring to the “Field Adapter” that was developed by webMethods PS. There are a ton of fixes for this adapter - make sure you are at build 12 (or higher, but build 12 has the most stable connection pool - IMO).

Is your code erroring out or are you just seeing an error in the server log?
Sounds to me like an issue with the connection pool. So I would look at that.

Also, I know of no build of the version 1.0 AS400 adapter that does not have some sort of issues with the connection pool. At best the connection pool will start to leak connections if a thread attempts to retrieve a connection from the pool when there are none available. In the worst case (depending upon build) I’ve seen the adapter leak connections rapidly under heavy load.

I would start there. You might also look at your metadata to ensure that it is correct.

Without more information about your code (beyond - it’s doing a read), I don’t think I can help much.

Also, if this is a new implementation, then I would seriously consider looking at the version 6.0.1 AS400 adapter. This one is built atop ART and may provide a better connection pool - but I’ve not had time to investigate.

I am currently using AS400 adapter services to write message to the DataQueue to AS400 system and in return will read the response message from the DataQueue.

I am facing this difficulty: for both writeDataQ & readDataQ service, it is mandatory to provide the recordMetaData (DataName, DataType, DataLength) as the message definition.

For writting into Dataqueue is no issue. However, when reading the response message, I cannot pre-defined the data length that I will be reading. Because the response message could be of error message or other message format.

I tried to make if flexible by giving the bigger number of length but getting error ArrayIndexOutofBound.Exception. If I do not provide any length, the system complaint Manadatory field not fill