0

Has anyone ever seen an inconsistent FileInputStream.open Exception on Windows?

I have Oracle's coherence (coherence-3.6.1-p6.jar) com.tangosol.run.xml.XmlHelper.loadXml method getting an exception in java.io.FileInputStream.open (Native) (jdk1.6.0_29) INCONSISTENTLY for a given file:/// path. See logged stack trace (and success log 16 seconds after failure) below. The file and all directories up to / above it are world readable on unix.

The jvm intermittently seeing the error is running as a Windows service (under Local System Account) using jsl:

JSL Java Service Launcher by Michael Roeschter (Michael@Roeschter.com)
Version 0.99n September, 12th 2011

Stack trace of error followed by success(?!):

2012-09-12 14:23:48.730 -0400 ERROR ...
Caused by: (Wrapped: Failed to load cache configuration: file://///{unix nfs share}/{dir}/{file}.xml) (Wrapped) java.io.FileNotFoundException: \\{unix nfs share}\{dir}\{file}.xml (Access is denied)
        at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
        at com.tangosol.run.xml.XmlHelper.loadResourceInternal(XmlHelper.java:330)
        at com.tangosol.run.xml.XmlHelper.loadFileOrResource(XmlHelper.java:281)
        at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:396)
        at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:382)
        at com.tangosol.net.DefaultConfigurableCacheFactory.(DefaultConfigurableCacheFactory.java:148)
        ... 39 more
Caused by: (Wrapped) java.io.FileNotFoundException: \\{unix nfs share}\{dir}\{file}.xml (Access is denied)
        at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:159)
        at com.tangosol.run.xml.XmlHelper.loadResourceInternal(XmlHelper.java:320)
        ... 43 more
Caused by: java.io.FileNotFoundException: \\{unix nfs share}\{dir}\{file}.xml (Access is denied)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.(FileInputStream.java:120)
        at java.io.FileInputStream.(FileInputStream.java:79)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
        at java.net.URL.openStream(URL.java:1010)
        at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:155)
        ... 44 more
...
2012-09-12 14:24:04.839 -0400 INFO STDERR [Logger@11477911 3.6.1.6] cpratesdev:  2012-09-12 14:24:04.839/27.702 Oracle Coherence GE 3.6.1.6  (thread=app-main, member=n/a): Loaded cache configuration from "file://///{unix nfs share}/{dir}/{file}.xml"
MerlinMM
  • 31
  • 3
  • Can I recommend to you that applications should never use shared file systems. They are for users. The failure rate is too high and the failure modes are too numerous. – user207421 Sep 12 '12 at 23:34
  • You may. However the provider of the Coherence cache configuration does not report to me so I can't instruct em to make the configuration file available in a more reliable way. http GET - world readable on intranet would probably be my choice. The argument against this (which I sympathize with and maybe even agree with) is that it's just a single small ascii file so running a web server for it is a bit of overkill. – MerlinMM Sep 13 '12 at 12:34
  • The simple solution of just copying the configuration file is also problematic as by the time the configuration changes in a breaking way everyone who knows about the copy will have forgotten so then you have a major issue (inability of a Windows service to connect to the Oracle coherence cache) and a simple fix (re-copy the file) that may take some time for the people involved to figure out. – MerlinMM Sep 13 '12 at 12:40

0 Answers0