Hi,

I would like to reply to the issue about Operation not supported. Map
failed on an iSeries/AS400.

 
http://itext-general.2136553.n4.nabble.com/Operation-Not-Supported-td216
5596.html

The cause of the problem could be that the IFS file is being journaled.

iText is using the FileChannel map method on the journaled IFS file.

Under the covers the IBM Java FileChannel map method uses the "C" mmap()
function.

You could stop journaling on the file

or

You could set the iText static field
com.lowagie.text.Document.plainRandomAccess=true,
to stop iText from using the MappedRandomAccessFile class.

=====================================================================

Journaling integrated file system objects

Restrictions for journaling integrated file system objects are as
follows:

You cannot journal files which are memory mapped.

The Memory Map a File (mmap()) API documentation has information about
memory mapping.

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/r
zaki/rzakistrjrn.htm

mmap()--Memory Map a File

The mmap() function will fail with ENOTSUP if the file is journaled.

Unix/C error code [ENOTSUP] Not supported.

=====================================================================

This simple Test program was used on a journaled file to prove the above
scenario.

  File file = new File ( filename ) ;

  FileInputStream inputStream = new FileInputStream ( file ) ;

  FileChannel channel = inputStream.getChannel () ;

  long size = channel.size () ;

  channel.map ( FileChannel.MapMode.READ_ONLY, 0L, size ) ;

  inputStream.close () ;

Exception

java.io.IOException: Operation not supported. Map failed
        at java.lang.Throwable.<init>(Throwable.java:195) 
        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:731)
        at Test.main(Test.java:29)

=====================================================================

regards

Alick Buckley
LANSA Pty Ltd 
Web: http://www.lansa.com
Blog: http://blog.lansa.com
Twitter: http://twitter.com/lansa
Mail: [email protected]
Phone: +61289070243



------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to