You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Jerven Bolleman <je...@sib.swiss> on 2019/10/23 11:24:17 UTC
Fixed Re: On Java 11 we sometimes get a
java.lang.ExceptionInInitializerError from NodeFactoryExtra for a specific
test case we have
I just want to report that it no longer seems to happen with jena 3.13.1
Thank you!
Regards,
Jerven
On 9/20/19 5:09 PM, Andy Seaborne wrote:
>>> For 3.13.0 it switches to java.time
>>> https://github.com/apache/jena/blob/master/jena-base/src/main/java/org/apache/jena/atlas/lib/DateTimeUtils.java
>>>
>>> JENA-1756 - the behaviour of FastDateParser has changed.
>> I will build local copy from master and see if it fixes my issue.
>
> The nightly development not-a-release is maven repo:
>
> https://repository.apache.org/content/repositories/snapshots/
>
>>
>> I suspect in the end it is more an issue with FastDateParser than with
>> Jena.
>>>
>>> The GregorianCalendar used is left as it's public methods and some
>>> old code
>>> in Jena uses hands out Calendar.
>>>
>>> I've (slowly) been looking at java.time for other use in ARQ -- its all
>>> about details. java.time is ISO 8601 and not exactly XSD; e.g.
>>> duration/period is different and the support for xsd:g* isn't there
>>> exactly.
>> It is quite annoying and the XSD changed their time behavior in XSD
>> 1.1 as well. Time is always so much more complicated than one imagines.
>
> Yep.
>
> It is looking good - use javax.xml.datatype.Duration as the parser, and
> use java.time.Duration/java.time.Period for the values.
>
> "P1D" is ambiguous in java.time!
>
> Andy
>
>>
>> Regards,
>> Jerven
>>>
>>> Andy
>>>
>>>
>>>
>>>
>>>
>>>
>>>>
>>>> Regards,
>>>> Jerven
>>>>
>>>>
>>>> java.lang.ExceptionInInitializerError
>>>> at
>>>>
>>>> org.apache.jena.sparql.util.NodeFactoryExtra.nowAsDateTime(NodeFactoryExtra.java:232)
>>>>
>>>> at
>>>> org.apache.jena.sparql.util.Context.setupContextExec(Context.java:365)
>>>> at
>>>>
>>>> org.apache.jena.sparql.engine.QueryExecutionBase.<init>(QueryExecutionBase.java:107)
>>>>
>>>> at
>>>>
>>>> org.apache.jena.query.QueryExecutionFactory.make(QueryExecutionFactory.java:631)
>>>>
>>>> at
>>>>
>>>> org.apache.jena.query.QueryExecutionFactory.make(QueryExecutionFactory.java:614)
>>>>
>>>> at
>>>>
>>>> org.apache.jena.query.QueryExecutionFactory.make(QueryExecutionFactory.java:600)
>>>>
>>>> at
>>>>
>>>> org.apache.jena.query.QueryExecutionFactory.create(QueryExecutionFactory.java:146)
>>>>
>>>> at
>>>>
>>>> org.expasy.unirules.tools.BasicSparqlTest.testPureSparql(BasicSparqlTest.java:506)
>>>>
>>>> at
>>>>
>>>> org.expasy.unirules.tools.BasicSparqlTest.positionMatchingTest(BasicSparqlTest.java:485)
>>>>
>>>> at
>>>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>> Method)
>>>> at
>>>>
>>>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>>>>
>>>> at
>>>>
>>>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>
>>>> Caused by: java.lang.NullPointerException
>>>> at
>>>>
>>>> java.base/java.lang.String$CaseInsensitiveComparator.compare(String.java:1224)
>>>>
>>>> at
>>>>
>>>> java.base/java.lang.String$CaseInsensitiveComparator.compare(String.java:1218)
>>>>
>>>> at
>>>> java.base/java.util.TreeMap.getEntryUsingComparator(TreeMap.java:374)
>>>> at java.base/java.util.TreeMap.getEntry(TreeMap.java:343)
>>>> at java.base/java.util.TreeMap.containsKey(TreeMap.java:231)
>>>> at
>>>>
>>>> org.apache.commons.lang3.time.FastDateParser$TimeZoneStrategy.<init>(FastDateParser.java:784)
>>>>
>>>> at
>>>>
>>>> org.apache.commons.lang3.time.FastDateParser.getLocaleSpecificStrategy(FastDateParser.java:570)
>>>>
>>>> at
>>>>
>>>> org.apache.commons.lang3.time.FastDateParser.getStrategy(FastDateParser.java:539)
>>>>
>>>> at
>>>> org.apache.commons.lang3.time.FastDateParser.init(FastDateParser.java:174)
>>>>
>>>> at
>>>>
>>>> org.apache.commons.lang3.time.FastDateParser.<init>(FastDateParser.java:145)
>>>>
>>>> at
>>>>
>>>> org.apache.commons.lang3.time.FastDateFormat.<init>(FastDateFormat.java:395)
>>>>
>>>> at
>>>>
>>>> org.apache.commons.lang3.time.FastDateFormat.<init>(FastDateFormat.java:379)
>>>>
>>>> at
>>>>
>>>> org.apache.commons.lang3.time.FastDateFormat$1.createInstance(FastDateFormat.java:101)
>>>>
>>>> at
>>>>
>>>> org.apache.commons.lang3.time.FastDateFormat$1.createInstance(FastDateFormat.java:98)
>>>>
>>>> at
>>>> org.apache.commons.lang3.time.FormatCache.getInstance(FormatCache.java:82)
>>>>
>>>> at
>>>>
>>>> org.apache.commons.lang3.time.FastDateFormat.getInstance(FastDateFormat.java:129)
>>>>
>>>> at
>>>> org.apache.jena.atlas.lib.DateTimeUtils.<clinit>(DateTimeUtils.java:34)
>>>>
>>>
>>