Tutorial - Excel import not working when Timezone CEST nicolas fenwick  2019-02-28 01:42
Status: Active
 

Hi LabKey team,

I am going through the tutorials and noticed that the import of the Excel dataset is not working in my local instance of Labkey (which I find really amazing by the way, congratulations).

I live in France (CEST timezone).

The error message is attached.

As I was debugging I noticed that CEST was not correctly handled in DateUtil.java

resolveDatePartEnum(s) (line 297) returns null as CEST is not in the TimeZone list (line 252):

z("UTC"),gmt("UTC"),ut("UTC"),utc("UTC"),
// North America
est(-5*60),edt(-4*60),cst(-6*60),cdt(-5*60),mst(-7*60),mdt(-6*60),pst(-8*60),pdt(-7*60),
// Europe
cet("CET"), wet("WET")
;

Now if you did add it, TimeZone.java translates it automatically to "CET" which causes another issue in DateUtil.java (line 292):

return (null != entry && StringUtils.startsWithIgnoreCase(entry.getKey(), s)) ? entry.getValue() : null;

this returns null and another process starts to try and recognise CEST thanks to TimeZone.getTimeZone(s).

Unfortunately TimeZone.getTimeZone(s) does not recognise CEST and translates it to GST.
resolveDatePartEnum(String s) will return null which will raise an exception.

That issue was raised by Christine Rousseau:
https://www.labkey.org/e545879c-dd5d-1032-a3b5-e5ac4624956c/announcements-thread.view?entityId=414cafa3-6e2f-1035-b86e-fe851e083e48&_docid=thread%3A414cafa3-6e2f-1035-b86e-fe851e083e48

I am not sure whether it has been fixed but I thought I would let you know about my investigations before it gets lost. I hope that helps.

Cheers,
Nico

 
 
Jon (LabKey DevOps) responded:  2019-03-15 13:47
Status: Closed
Hi Nico,

Thank you for your additional details.

Unfortunately, we never got a response back to continue the troubleshooting with Christine in that other post you referenced and since we couldn't reproduce the problem on our end, our troubleshooting progress was halted.

Is it possible for you to re-trigger the error, but with the Google Developer Console running? If it can capture a stack error from the pop-up message, we can continue our investigation and possibly get a fix for it.

Regards,

Jon
 
nicolas fenwick responded:  2019-03-15 22:07
Status: Active
Hi Jon,

I am using OSX with Central European Standard Time and a PostgreSQL db.

I believe that you want me to show you the logs on the client side gathered from Google Chrome Developer Console. Unfortunately there is nothing interesting in them. Please have a look at the screenshot attached.

In fact, the error is neatly added. Please see the dump underneath.

"http-nio-8080-exec-7@9512" daemon prio=5 tid=0x2c nid=NA runnable
  java.lang.Thread.State: RUNNABLE
      at org.labkey.api.dataiterator.SimpleTranslator.addConversionException(SimpleTranslator.java:136)
      at org.labkey.api.dataiterator.SimpleTranslator$SimpleConvertColumn.get(SimpleTranslator.java:397)
      at org.labkey.api.dataiterator.SimpleTranslator.next(SimpleTranslator.java:1236)
      at org.labkey.api.dataiterator.ValidatorIterator.next(ValidatorIterator.java:157)
      at org.labkey.api.dataiterator.StatementDataIterator._next(StatementDataIterator.java:291)
      at org.labkey.api.dataiterator.StatementDataIterator.next(StatementDataIterator.java:261)
      at org.labkey.api.dataiterator.Pump.run(Pump.java:72)
      at org.labkey.study.model.DatasetDefinition.insertData(DatasetDefinition.java:1951)
      at org.labkey.study.model.DatasetDefinition.importDatasetData(DatasetDefinition.java:1866)

I have also attached a screenshot of my dev environment in debug so you see where this is happening.

I hope it helps.

Cheers,
Nico
 
Jon (LabKey DevOps) responded:  2019-03-29 13:45
Status: Closed
Hi Nico,

Thanks for supplying us with the screenshots.

I've asked our developers to take a closer look at that part of the code.

Thank you for your patience as we continue to investigate the issue.

Regards,

Jon