Project and Portfolio Management Practitioners Forum
cancel

kTMDataConversion.sh Problem

SOLVED
Go to solution
Highlighted
Marc Canovas
Valued Contributor.

kTMDataConversion.sh Problem

Hi,

 

I'm trying to load Time Sheets automatically using this kTMDataConversion.sh script, but the java process invoked with the script (sh kTMDataConversion.sh -user admin -pwd admin -xmlLocation /opt/ppm/tmp -checkPolicyAndDefaultCC true -testMode true -languageCode ES) finds an error, which is the following:

 

STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.609 CET: com.mercury.itg.exceptions.InfrastructureException: java.lang.Exception: TMPeriod cuya fecha de inicio es Thu Nov 01 01:00:00 CET 2012 no existe, como se ha especificado en el parte de horas del recurso Thu Nov 01 01:00:00 CET 2012 y la secuencia admin.(TMLDR-80059)
GUID=33EA76F6-1FBE-70BD-9C91-B82B2C092717
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.609 CET:   at com.mercury.itg.util.HibernateTemplate.doRun(HibernateTemplate.java:215)
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.609 CET:   at com.mercury.itg.tm.util.dataLoader.TimeSheetCreator.run(TimeSheetCreator.java:167)
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.609 CET: Caused by: java.lang.Exception: TMPeriod cuya fecha de inicio es Thu Nov 01 01:00:00 CET 2012 no existe, como se ha especificado en el parte de horas del recurso Thu Nov 01 01:00:00 CET 2012 y la secuencia admin.(TMLDR-80059)
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.609 CET:   at com.mercury.itg.tm.util.dataLoader.TimeSheetCreator.insertTimesheet(TimeSheetCreator.java:245)
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.610 CET:   at com.mercury.itg.tm.util.dataLoader.TimeSheetCreator.access$200(TimeSheetCreator.java:102)
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.610 CET:   at com.mercury.itg.tm.util.dataLoader.TimeSheetCreator$1.run(TimeSheetCreator.java:145)
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.610 CET:   at com.mercury.itg.util.HibernateTemplate.doRun(HibernateTemplate.java:200)
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.610 CET:   ... 1 more
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.610 CET:
        Filtered Out 4 Stack Trace Lines.
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.619 CET: java.lang.Exception: java.lang.Exception: TMPeriod cuya fecha de inicio es Thu Nov 01 01:00:00 CET 2012 no existe, como se ha especificado en el parte de horas del recurso Thu Nov 01 01:00:00 CET 2012 y la secuencia admin.(TMLDR-80059)
GUID=33EA76F6-1FBE-70BD-9C91-B82B2C092717
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.619 CET:   at com.mercury.itg.tm.util.dataLoader.TimeSheetCreator.logFailure(TimeSheetCreator.java:1070)
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.619 CET:   at com.mercury.itg.tm.util.dataLoader.TimeSheetCreator.run(TimeSheetCreator.java:198)
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.619 CET:   at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
STATUS server:Thread-7:SystemErr:2012/11/15-12:03:17.619 CET:   at java.lang.Thread.run(Thread.java:662)
STATUS server:main:SystemOut:2012/11/15-12:03:17.622 CET:
*******************OVERALL STATISTICS*******************

STATUS server:main:SystemOut:2012/11/15-12:03:17.623 CET:
Total No of Timesheets that will be successfully imported : 0

 

 

I traduce the error message: java.lang.Exception: TMPeriod whose start date is Thu Nov 01 01:00:00 CET 2012 doesn't exist, as specified in the time sheet of the resource Thu Nov 01 01:00:00 CET 2012 and the sequence admin.

 

As I understand, it seems like the tag <periodStartDate> (which is filled with 2012-11-01T00:00:00Z, the correct format), it's being decodified as "Thu Nov 01 01:00:00 CET 2012", instead of "01/11/12", which is the format that appears in the KTMG_PERIODS database table.

 

Maybe it's a problem of the language being used, but I can't do anything to solve this issue, and I need this script to work.

 

Some help?

 

Regards,

 

 

Marc

 

 

1 REPLY
Oscar_Pereira
Honored Contributor.
Solution

Re: kTMDataConversion.sh Problem

Hello Marc,

 

I have seeing a similar error when the xml for the data loader is using period type name (Weekly, Bi-Weekly, Semi-Monthly, Monthly) when it should be using duration_code (WEEKLY, BI_WEEKLY, SEMI_MONTHLY, MONTHLY).

If you have it as lower case, can you please change the codes accordingly in the xml and try?

 

Other two observations:

 

1-The creationDate could be missing the ending Z.

 

i.e    2012-08-01T08:00:00Z


2- The Date format should be using 2 digits for the number of day. If it's the second of November, it should be 02 and not just 2.

 

Please do the following.
1. Select * from ktmg_period_types

check the duration_code for weekly.


2. In the xml file, put the duration code for WEEKLY in the periodTypeCode.
3. Try import again.

 

Also you may want to attach the XML file and the ktmg_period_types

 

Regards

Oscar P