I am having a problem with some Java NIO code running in the iSeries kernel (JDK 1.5). Basically, the code breaks the file into fragments of a part of the file into other smaller files. The same code has been running in other iSeries mailboxes for some time without any problems. Here's the code snippet:
long startPos = dataFile.length() - remaining;
long transferSize = maxSizeBytes - size;
size += inChannel.transferTo(startPos, transferSize, outChannel);
remaining -= size;
Here's the stack trace:
Caused by: java.io.IOException: Operation not supported. Map failed
at java.lang.Throwable.<init>(Throwable.java:196)
at java.lang.Exception.<init>(Exception.java:41)
at java.io.IOException.<init>(IOException.java:40)
at sun.nio.ch.FileChannelImpl.map0(Native Method)
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:742)
at sun.nio.ch.FileChannelImpl.transferToTrustedChannel(FileChannelImpl.java:448)
at sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java:521)
... 11 more
I did some investigation and the reasons so far (access rights to the parent directory, from memory, QSHRMEMCTL shared memory management are disabled, use of SAN) have all been unsuccessful.
Does anyone have experience with this particular problem?
Thanks, Brad.
source
share