hbz / laser-ygor

A spare hand when needed ..
0 stars 1 forks source link

Problem with DateNormalizer #277

Closed hornmo closed 4 years ago

hornmo commented 4 years ago

Date normalization will cause an exception while processing (occuring in f828f072718edc92ba920fcead6206c2b475a6b1):

| Error 2020-08-18 15:22:02,083 [Thread-19] ERROR normalizers.DateNormalizer  - Could not parse anfangs as Date. Exception: Cannot invoke method parse() on null object
| Error 2020-08-18 15:22:02,092 [Thread-19] ERROR normalizers.DateNormalizer  - Could not parse -2015 as Date. Exception: Cannot invoke method parse() on null object
| Error Exception in thread "Thread-19" 
| Error groovy.lang.GroovyRuntimeException: Could not find matching constructor for: java.time.YearMonth(java.lang.String, java.time.Month)
| Error         at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1737)
| Error         at groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1537)
| Error         at groovy.lang.ExpandoMetaClass.invokeConstructor(ExpandoMetaClass.java:681)
| Error         at org.codehaus.groovy.runtime.callsite.MetaClassConstructorSite.callConstructor(MetaClassConstructorSite.java:49)
| Error         at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
| Error         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
| Error         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:255)
| Error         at de.hbznrw.ygor.normalizers.DateNormalizer.completeEndDate(DateNormalizer.groovy:69)
| Error         at de.hbznrw.ygor.normalizers.DateNormalizer.normalizeDate(DateNormalizer.groovy:54)
| Error         at de.hbznrw.ygor.normalizers.DateNormalizer$normalizeDate.call(Unknown Source)
| Error         at de.hbznrw.ygor.normalizers.CommonNormalizer.normalize(CommonNormalizer.groovy:30)
| Error         at de.hbznrw.ygor.normalizers.CommonNormalizer$normalize.call(Unknown Source)
| Error         at ygor.field.MultiField.normalize(MultiField.groovy:154)
| Error         at ygor.field.MultiField$normalize$7.call(Unknown Source)
| Error         at ygor.Record.normalize(Record.groovy:144)
| Error         at ygor.Record$normalize$6.call(Unknown Source)
| Error         at ygor.Enrichment.classifyAllRecords(Enrichment.groovy:393)
| Error         at ygor.Enrichment$classifyAllRecords$8.call(Unknown Source)
| Error         at de.hbznrw.ygor.processing.MultipleProcessingThread.run(MultipleProcessingThread.groovy:123)

Occured for multiple files with ZDB referencing, for example: TaylorandFrancisOnline_Global_LibraryandInformationScience_2020-08-18.txt