Mike,

Following up on this thread, I created the following Jira issue and pull
request to address the problem for future builds on Java 17:

https://issues.apache.org/jira/browse/NIFI-9968
https://github.com/apache/nifi/pull/6000

Regards,
David Handermann

On Mon, Apr 25, 2022 at 4:32 PM David Handermann <
exceptionfact...@apache.org> wrote:

> Mike,
>
> I observed the same behavior when attempting to build on Java 17. The
> problem appears specific to Java 17, and does not appear on Java 8 or 11.
> The root cause appears to be that the `user.timezone` System property is
> not set by default on Java 17, causing System.setProperty() to fail with
> the NPE. I was able to work around the problem by adding
> "-DargLine=user.timezone=SomeTimeZone" to the Maven build command.  This
> does not impact GitHub Java 17 builds since those builds set user.timezone.
>
> Since this is a build problem specific to Java 17, it does not seem to be
> a blocking issue, in my opinion.
>
> Regards,
> David Handermann
>
> On Mon, Apr 25, 2022 at 4:10 PM Mike Thomsen <mikerthom...@gmail.com>
> wrote:
>
>> This laptop can be a little wonky at times because of the corporate
>> lockdowns, so I wanted to see if any other committers/PMC members have
>> seen this in nifi-record-path:
>>
>> [INFO] Running org.apache.nifi.record.path.util.TestFieldValueWalker
>>
>> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
>> 0.083 s - in org.apache.nifi.record.path.util.TestFieldValueWalker
>>
>> [INFO] Running
>> org.apache.nifi.record.path.util.TestFieldValueLogicalPathBuilder
>>
>> [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed:
>> 0.007 s - in
>> org.apache.nifi.record.path.util.TestFieldValueLogicalPathBuilder
>>
>> [INFO] Running org.apache.nifi.record.path.TestRecordPath
>>
>> [ERROR] Tests run: 76, Failures: 0, Errors: 1, Skipped: 0, Time
>> elapsed: 0.336 s <<< FAILURE! - in
>> org.apache.nifi.record.path.TestRecordPath
>>
>> [ERROR] org.apache.nifi.record.path.TestRecordPath  Time elapsed:
>> 0.336 s  <<< ERROR!
>>
>> java.lang.NullPointerException
>>
>> at
>> java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
>>
>> at
>> java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
>>
>> at java.base/java.util.Properties.put(Properties.java:1301)
>>
>> at java.base/java.util.Properties.setProperty(Properties.java:229)
>>
>> at java.base/java.lang.System.setProperty(System.java:999)
>>
>> at
>> org.apache.nifi.record.path.TestRecordPath.setSystemTimezone(TestRecordPath.java:82)
>>
>> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>> Method)
>>
>> at
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
>>
>> at
>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>
>> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
>>
>

Reply via email to