Application logging throws SaxParseException Premature end of file
This issue occurs in the following circumstances:
- The vFunction Sudo or Sudoless Controller Installation TGZ is installed in a Linux environment
- An Application Server is used to run the JVM
- The user running the Application Server is a different user than has completed the installation
- After adding the vFunction Agent Startup Parameters into the JVM, the Application is rebooted and the following error occurs
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1014)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at vfrtshadow.org.aspectj.weaver.loadtime.definition.DocumentParser.saxParsing(DocumentParser.java:157)
at vfrtshadow.org.aspectj.weaver.loadtime.definition.DocumentParser.parse(DocumentParser.java:122)
This issue can be resolved by taking the following steps:
- SSH to the Application Server running the JVM
- Change the permissions of the temp directory that the VF Agent tries to write to or change ownership of this directory. For example:
chmod -R 777 /etc/sysconfig/vfunction/agent/instances/default/temp/
chown -R tomcat:tomcat /etc/sysconfig/vfunction
chown -R tomcat:tomcat /opt/vfunction
- Restart the JVM