× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello,

I am running into a strange problem here. I am getting the error
"com.ibm.as400.access.ExtendedIOException: Sharing violation occurred"
when I open an IFSOutputStream. The file doesn't exist beforehand, and
an empty file gets created when the call is made, but it ends with that
error.

Here is the full exception:
com.xxx.xxx.util.FileIO - com.ibm.as400.access.ExtendedIOException:
Sharing violation occurred
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
com/ibm/as400/access/ExtendedIOException.<init>(ExtendedIOException.java
:211)
at
com/ibm/as400/access/IFSFileOutputStreamImplRemote.open(IFSFileOutputStr
eamImplRemote.java:317)
at
com/ibm/as400/access/IFSFileOutputStreamImplRemote.connectAndOpen(IFSFil
eOutputStreamImplRemote.java:114)
at
com/ibm/as400/access/IFSFileOutputStream.connectAndOpen(IFSFileOutputStr
eam.java:539)
at
com/ibm/as400/access/IFSFileOutputStream.myConstructor(IFSFileOutputStre
am.java:331)
at
com/ibm/as400/access/IFSFileOutputStream.<init>(IFSFileOutputStream.java
:131)
at com/xxx/xxx/util/FileIO.copyFileIFS(FileIO.java:403)
at com/xxx/xxx/util/FileIO.copyFileIFS(FileIO.java:350)
at com/xxx/xxx/model/FileExport.exportToText(FileExport.java:171)
at com/xxx/xxx/model/FileExport.export(FileExport.java:105)
at com/xxx/xxx/tasks/FileExportTask.performTask(FileExportTask.java:69)
at com/xxx/xxx/controller/XXXProxy.performTask(XXXProxy.java:77)

Here is my JTOpen version information:
$
> java utilities.AboutToolbox

IBM Toolbox for Java:

Open Source Software, JTOpen 4.1, codebase 5722-JC1 V5R3M0
$

Here is the method call it dies on:

outStream = new BufferedOutputStream(new
IFSFileOutputStream(as400,toFilePath), BUF_SIZE);

The as400 object is for *CURRENT, and BUF_SIZE is for buffering in the
BufferedOutputStream (4096).

This same code works fine on another iSeries, with the same version of
JTOpen. I am not sure what would cause this. Nothing else is using the
file. What else would cause this particular error?

If more code/information is needed, let me know. Thanks for your help!

Dan Feather
Silhouette/PinPoint R&D Programmer
Jack Henry & Associates, Inc.
dfeather@xxxxxxxxxxxxx



NOTICE: This electronic mail message and any files transmitted with it are 
intended exclusively for the individual or entity to which it is addressed. The 
message, together with any attachment, may contain confidential and/or 
privileged information. Any unauthorized review, use, printing, saving, 
copying, disclosure or distribution is strictly prohibited. If you have 
received this message in error, please immediately advise the sender by reply 
email and delete all copies.





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.