Errors in logfile when running OCV in CLI mode

These are just related to the application trying to log stuff to the preferred log location. if you validation report looks ok, then i would ignore these for now

Thanks very much for confirming :slight_smile:

You can update Apache Log4j settings in the components\lib\properties folder to avoid this issue.

This should work for 2.0.1 to output log to stdout:

log4j2.xml:

<?xml version="1.0" encoding="UTF-8"?>

log4j.properties:

log4j.rootLogger=INFO, stdout
log4j.logger.org.opencdisc=DEBUG

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.File=System.out
log4j.appender.stdout.Append=false
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d |%-5p |%-30F:%4L |%m%n

Thanks Dmitry. This is the more comprehensive solution. A quick test will confirm

Hi, I was wondering if anyone could point me in the right direction.

I have the following command string when running OCV using CLI on ADaM xpt files:

/opt/java6/bin/java -Xms256m -Xmx3072m -jar /opt/ocv/components/lib/validator-cli-2.0.1.jar -task=“validate” -type=“ADaM” -source=“/<path>/*.xpt” -config=“/<path>/ADaM 1.0.xml” -config:cdisc=“2014-09-26” -config:meddra=“18.1” -output:overwrite=yes -report=“/<path>/report_adam_20160302-183054.xlsx” -report:type=“excel” > “/<path>/ocv_log_adam_20160302-183054.log” 2>&1

The report looks totally fine. However, i get several error messages in the ocv_log_adam_20160302-183054.log file. These errors are as follows:

    • ERROR FileManager (components/logs/desktop.log4j2.log) java.io.FileNotFoundException: components/logs/desktop.log4j2.log (No such file or directory (errno:2))
    • ERROR Unable to invoke factory method in class class org.apache.logging.log4j.core.appender.FileAppender for element File. java.lang.reflect.InvocationTargetException
  • ERROR Null object returned for File in Appenders.

  • ERROR Unable to locate appender Primary for logger

  • log4j:ERROR setFile(null,false) call failed.

I assume these errors are all linked to the issue with the components/logs/desktop.log4j2.log. I have looked online and cannot find any solution.

Any ideas anyone?

Thanks in advance for any advice.

Paul