I finally found a fix for this today. I had
looked into this before, but had not found a solution until today. It has to do with an inconsistency in the way UCDJ handles
relative paths. In our environment, we specify relative paths in the
uc4config.xml file, e.g., for the location where logs should be stored.
<logging count="10">logs\UCDJ_LOG_##.TXT</logging>
Normally, relative paths are relative to the
current working directory. And indeed, some parts of UCDJ use the
current working directory at the time when the program was launched when evaluating relative paths. However,
other parts of UCDJ, including the parts that download files, use the path specified in the
user.dir, Java system property if it is set.
If there is a mismatch between the two paths, downloading the log will usually fail.
UCDJ uses a directory called
downloads to store temporary downloaded files. This directory resides in the
logs directory specified in
logging element of the
uc4config.xml file.
- When you start UCDJ, it checks whether whether the logs directory specified in the uc4config.xml file exists, and creates it necessary. If this directory is specified using a relative path, UCDJ checks under the current working directory. The program completely ignores the user.dir system property.
- When you click on the Open or Open as text... buttons in the Directory tab of a Report window, UCDJ checks whether the logs/downloads directory exists, and creates it if necessary. If the user.dir system property is set, it looks in the directory specified in user.dir instead of in the current working directory.
- UCDJ downloads the requested file to the downloads directory.
- UCDJ opens the file.
Step #2 will fail if:
- The logs directory is specified with a relative path in uc4config.xml
and
- The current working directory differs from the directory specified with user.dir
and
- The logs directory does not already exist under the user.dir directory.
This is because although the program is able to create the
downloads sub-directory if it does not exist, it assumes that the
logging parent directory has already been created. And because the part of the program that creates the
logs directory always creates this director under the
current working directory, there may be no logs directory in the (different) directory specified by
user.dir.
Step #2 will also fail if:
- The logs directory resides on a UNC network path, even if it and the downloads sub-directory already exist.
So, this reveals two undocumented requirements:
- The current working directory when UCDJ is started must not be a UNC network path.
- If user.dir is specified, it should be set to the same path as the current working directory.
I will update the
UC4 User Interface startup script soon.