Clarity needs tempFile to be set in properties.xml
search cancel

Clarity needs tempFile to be set in properties.xml

book

Article ID: 281893

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

Error messages thrown in various areas of the application:

BG process XOG or jobs fail with errors on tempFile:

ERROR 2024-04-10 05:38:18,799 [https-jsse-nio2-8443-exec-5] niku.xog (clarity:none:none:none) (d6d22cca-768b-469b-aa18-6c64872f4a38) XOG POST failed
java.lang.NullPointerException: Cannot invoke "java.io.File.getAbsolutePath()" because "tempFile" is null

 

ERROR 2024-04-01 19:43:44,932 [Dispatch Tomcat access log import/analyze (tenant=clarity)] job.LogDiscoveryJob (clarity:admin:xxxxxxx__DC81B013-511C-48AB-B3F5-E4083257833A:Tomcat access log import/analyze) () 
java.io.IOException: The system cannot find the path specified
    at java.base/java.io.WinNTFileSystem.createFileExclusively(Native Method)
    at java.base/java.io.File.createTempFile(File.java:2170)
    at java.base/java.io.File.createTempFile(File.java:2216)
    at com.niku.content.loganalysis.job.LogDiscoveryJob.transferLogFileToLocal(LogDiscoveryJob.java:337)
    at com.niku.content.loganalysis.job.LogDiscoveryJob.autoDiscoverLogs(LogDiscoveryJob.java:277)
    at com.niku.content.loganalysis.job.LogDiscoveryJob.execute(LogDiscoveryJob.java:145)
    at com.niku.content.loganalysis.job.LogDiscoveryJob.scheduledEventFired(LogDiscoveryJob.java:96)
    at com.niku.njs.BGTask.run(BGTask.java:113)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)

 

Resolution

  1. Make sure the below parameter is set up correctly in the properties.xml:
    tempDir=""
  2. It should be set to a proper value, the folder has to be available and have write access to.
  3. The default value is a temp folder within Clarity (example):
    tempDir="C:\clarity\temp"
  4. Repeat on each server in cluster
  5. Restart all services and retry.

Additional Information

  • If Java tmpdir is set up in JVM in properties.xml, the folder should also exist and user has to have permissions to it.
  • It is not mandatory to set up java tmpdir if Clarity tempdir is set. If set, the parameter has to be set correctly
  • More information here: Setting -Djava.io.tmpdir on Clarity Java JVM parameters