You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Otto Fowler (Jira)" <ji...@apache.org> on 2020/08/25 18:36:00 UTC

[jira] [Commented] (NIFI-7766) Getting initialize class org.apache.nifi.util.text.RegexDateTimeMatcher error in jsontreereader

    [ https://issues.apache.org/jira/browse/NIFI-7766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17184665#comment-17184665 ] 

Otto Fowler commented on NIFI-7766:
-----------------------------------

From the documentation: 
"The value returned is a two-dimensional array of strings of size n by m, where m is at least 5. Each of the n rows is an entry containing the localized names for a single TimeZone. Each such row contains (with i ranging from 0..n-1):
zoneStrings[i][0] - time zone ID
zoneStrings[i][1] - long name of zone in standard time
zoneStrings[i][2] - short name of zone in standard time
zoneStrings[i][3] - long name of zone in daylight saving time
zoneStrings[i][4] - short name of zone in daylight saving time
The zone ID is not localized; it’s one of the valid IDs of the TimeZone class that are not custom IDs. All other entries are localized names. If a zone does not implement daylight saving time, the daylight saving time names should not be used."

We are looping through all the names, without checking for null, that is incorrect in principle.
Will add null checks

> Getting initialize class org.apache.nifi.util.text.RegexDateTimeMatcher error in jsontreereader
> -----------------------------------------------------------------------------------------------
>
>                 Key: NIFI-7766
>                 URL: https://issues.apache.org/jira/browse/NIFI-7766
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.12.0
>            Reporter: Lucas Read
>            Assignee: Otto Fowler
>            Priority: Minor
>         Attachments: nifi-app.log
>
>
> Setting the date formats in the jsontreereader causes an error. Server time was set for UTC and has since been changed to ETC but the issue still persists. 
> {code:java}
> Could not initialize class org.apache.nifi.util.text.RegexDateTimeMatcher$Compiler
> {code}
> {code:java}
>     0174-1000-e2c7-552f72fd9f08], versionedComponentId=null, processGroup=StandardProcessGroup[identifier=20fdafa4-0174-1000-7885-3f4547c81e71,name=test], active=true]           Failed to invoke @OnEnabled method due to java.lang.ExceptionInInitializerError: {}
>  1098 java.lang.ExceptionInInitializerError: null
>  1099   at org.apache.nifi.util.text.DateTimeMatcherCompiler.compile(DateTimeMatcherCompiler.java:25)
>  1100   at org.apache.nifi.util.text.DateTimeMatcher.compile(DateTimeMatcher.java:66)
>  1101   at org.apache.nifi.schema.inference.TimeValueInference.<init>(TimeValueInference.java:39)
>  1102   at org.apache.nifi.json.JsonTreeReader.lambda$getSchemaAccessStrategy$1(JsonTreeReader.java:96)
>  1103   at org.apache.nifi.schema.inference.SchemaInferenceUtil.getSchemaAccessStrategy(SchemaInferenceUtil.java:47)
>  1104   at org.apache.nifi.json.JsonTreeReader.getSchemaAccessStrategy(JsonTreeReader.java:98)
>  1105   at org.apache.nifi.serialization.SchemaRegistryService.storeSchemaAccessStrategy(SchemaRegistryService.java:108)
>  1106   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  1107   at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  1108   at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  1109   at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>  1110   at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:142)
>  1111   at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:130)
>  1112   at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:75)
>  1113   at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:52)
>  1114   at org.apache.nifi.controller.service.StandardControllerServiceNode$2.run(StandardControllerServiceNode.java:432)
>  1115   at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
>  1116   at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
>  1117   at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
>  1118   at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
>  1119   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
>  1120   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>  1121   at java.base/java.lang.Thread.run(Thread.java:834)
>  1122 Caused by: java.lang.NullPointerException: null
>  1123   at java.base/java.util.regex.Pattern.quote(Pattern.java:1352)
>  1124   at org.apache.nifi.util.text.RegexDateTimeMatcher$Compiler.<clinit>(RegexDateTimeMatcher.java:134)
>  1125   ... 23 common frames omitted
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)