Tomcat access log import/analyze job does not import any record. bg-ca.log shows Encountered error: java.text.ParseException: Unparseable date: "02/Aug/2017:00:06:56 -0700"
search cancel

Tomcat access log import/analyze job does not import any record. bg-ca.log shows Encountered error: java.text.ParseException: Unparseable date: "02/Aug/2017:00:06:56 -0700"

book

Article ID: 17162

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction



I encountered the following problem.

The PPM services were not running in English OS, Tomcat access log import/analyze job was completed but no record was imported. I detected "Unparseable date" warning. 

Why such warning messages are generated? How do I resolve it?

Warning messages in bg-ca.log

WARN  2017-08-02 21:28:51,086 [Dispatch Tomcat access log import/analyze : [email protected] (tenant=clarity)] loganalysis.LogDiscovery (clarity:[email protected]:9115082__6BC710E3-6D94-49C1-BA3B-F57367408380:Tomcat access log import/analyze) Encountered error: java.text.ParseException: Unparseable date: "02/Aug/2017:00:06:56 -0700"

 

 

Environment

PPM 15.2PPM 15.3

Resolution

I investigated SimpleDateFormat class and it generated "Unparseable date" messages. 

 

I checked format date from SimpleDateFormat("yyyy/MMM/dd",Locale.XXXXX) for following locale. 

It returned different Month format like as Okt for Germany, 10 for Japan, ott for Italy, etc...

It caused [Unparseable date] and no data was imported by [Tomcat access log import/analyze] job.

It should be Oct like as US locale.

 

----------------

US      = 2017/Oct/02

Germany = 2017/Okt/02

Japan   = 2017/10/02

Italy   = 2017/ott/02

France  = 2017/oct./02

Canada  = 2017/Oct/02

-------------------

 

Work Around:

Set environment parameter [_JAVA_OPTIONS] with [-Duser.country=US -Duser.language=en]

 

Ex) For windows OS

_JAVA_OPTIONS=-Duser.country=US -Duser.language=en