[jira] [Created] (JENA-1820) GeometryWrapper::asLiteral throws NullPointerException for GMLDatatype, malformed lexicalForm

2020-01-18 Thread Philipp Neuschwander (Jira)
Philipp Neuschwander created JENA-1820:
--

 Summary: GeometryWrapper::asLiteral throws NullPointerException 
for GMLDatatype, malformed lexicalForm
 Key: JENA-1820
 URL: https://issues.apache.org/jira/browse/JENA-1820
 Project: Apache Jena
  Issue Type: Bug
  Components: Spatial
Affects Versions: Jena 3.13.1
Reporter: Philipp Neuschwander


GML-Literal of MultiPolygon/Polygon is malformed (generated by GMLWriter).

Under the gml:exterior and gml:interior node, there should be a linear ring 
that contains the posList. But the posList is generated as a direct child to 
gml:exterior/interior:
{code:java}
http://www.opengis.net/ont/gml; 
srsName="http://www.opengis.net/def/crs/OGC/1.3/CRS84;>http://www.opengis.net/def/crs/OGC/1.3/CRS84;>0
 0 10 0 10 10 0 10 0 05 
5 7 7 7 5 5 54 4 4 5 5 
5 4 
4

{code}
The missing linearRing leads to NullPointerException when trying to call
{code:java}
geometryWrapper.asLiteral(GMLDatatype.INSTANCE)
{code}
as the GMLReader (I have no clue why it is called as part of the 
asLiteral-call) tries to access the linearRing and it's posList child. 

Stackstrace:


{code}
java.lang.NullPointerException: null
at 
org.apache.jena.geosparql.implementation.parsers.gml.GMLReader.extractPosList(GMLReader.java:223)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.parsers.gml.GMLReader.buildLinearRing(GMLReader.java:503)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.parsers.gml.GMLReader.buildPolygon(GMLReader.java:477)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.parsers.gml.GMLReader.buildMultiSurface(GMLReader.java:644)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.parsers.gml.GMLReader.buildGeometry(GMLReader.java:199)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.parsers.gml.GMLReader.(GMLReader.java:108)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.parsers.gml.GMLReader.extract(GMLReader.java:707)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.datatype.GMLDatatype.read(GMLDatatype.java:84)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.index.GeometryLiteralIndex.retrieveMemoryIndex(GeometryLiteralIndex.java:77)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.index.GeometryLiteralIndex.retrieve(GeometryLiteralIndex.java:51)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.datatype.GeometryDatatype.parse(GeometryDatatype.java:57)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.datatype.GeometryDatatype.parse(GeometryDatatype.java:50)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.datatype.GeometryDatatype.parse(GeometryDatatype.java:32)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
at 
org.apache.jena.graph.impl.LiteralLabelImpl.setValue(LiteralLabelImpl.java:217) 
~[jena-core-3.13.1.jar:3.13.1]
at 
org.apache.jena.graph.impl.LiteralLabelImpl.setLiteralLabel_1(LiteralLabelImpl.java:111)
 ~[jena-core-3.13.1.jar:3.13.1]
at 
org.apache.jena.graph.impl.LiteralLabelImpl.(LiteralLabelImpl.java:100) 
~[jena-core-3.13.1.jar:3.13.1]
at 
org.apache.jena.graph.impl.LiteralLabelFactory.create(LiteralLabelFactory.java:50)
 ~[jena-core-3.13.1.jar:3.13.1]
at 
org.apache.jena.graph.NodeFactory.createLiteral(NodeFactory.java:171) 
~[jena-core-3.13.1.jar:3.13.1]
at 
org.apache.jena.rdf.model.ResourceFactory$Impl.createTypedLiteral(ResourceFactory.java:313)
 ~[jena-core-3.13.1.jar:3.13.1]
at 
org.apache.jena.rdf.model.ResourceFactory.createTypedLiteral(ResourceFactory.java:148)
 ~[jena-core-3.13.1.jar:3.13.1]
at 
org.apache.jena.geosparql.implementation.GeometryWrapper.asLiteral(GeometryWrapper.java:986)
 ~[jena-geosparql-3.13.1.jar:3.13.1]
{code}




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


[jira] [Resolved] (JENA-1819) Updating from 3.12 to 3.13 breaks

2020-01-18 Thread Andy Seaborne (Jira)


 [ 
https://issues.apache.org/jira/browse/JENA-1819?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andy Seaborne resolved JENA-1819.
-
Resolution: Information Provided

> Updating from 3.12 to 3.13 breaks
> -
>
> Key: JENA-1819
> URL: https://issues.apache.org/jira/browse/JENA-1819
> Project: Apache Jena
>  Issue Type: Bug
>Reporter: xia0c
>Priority: Major
>
> When I try to upgrade jena-arq from 3.12 to 3.13. The following code breaks.
> {code:java}
> public class TestJena {
>   
>   private static FastDateFormat timestamp = 
> FastDateFormat.getInstance("HH:mm:ss.SSS") ;
>   
>   private void printQuery(Query query, QuerySolution initialBinding) {
> String time = DateTimeUtils.nowAsString(timestamp); 
> System.err.print("~~ ");
> System.err.print(time);
> System.err.println(" ~~");
> System.err.println(initialBinding);
> System.err.print(query);
>   }
> }
> {code}
> The code should pass, but it throws an error:
> {code:java}
> TestJena.java:[13,36] no suitable method found for 
> nowAsString(org.apache.commons.lang3.time.FastDateFormat)
> [ERROR] method 
> org.apache.jena.atlas.lib.DateTimeUtils.nowAsString(java.lang.String) is not 
> applicable
> [ERROR] (argument mismatch; org.apache.commons.lang3.time.FastDateFormat 
> cannot be converted to java.lang.String)
> [ERROR] method 
> org.apache.jena.atlas.lib.DateTimeUtils.nowAsString(java.time.format.DateTimeFormatter)
>  is not applicable
> [ERROR] (argument mismatch; org.apache.commons.lang3.time.FastDateFormat 
> cannot be converted to java.time.format.DateTimeFormatter)
> {code}



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


[jira] [Commented] (JENA-1819) Updating from 3.12 to 3.13 breaks

2020-01-18 Thread Andy Seaborne (Jira)


[ 
https://issues.apache.org/jira/browse/JENA-1819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17018549#comment-17018549
 ] 

Andy Seaborne commented on JENA-1819:
-

Hi [~lingchao] - thanks for the feedback.

We try to migrate gracefully, and it is a compile time error. There is a 
balance between compatibility and building up technical debt. Change away from 
use of {{FastDateFormat}} was forced on the code (staying at the old version 
forever is not an option).

Sometimes, our understanding of what users do, and do not use, is incomplete. 
Formatting code is a case in point. 
Java modules might help if it were combined with a reorganisation of the code.

The removed code is a one liner: {{dateFormat.format(new Date())}}.



> Updating from 3.12 to 3.13 breaks
> -
>
> Key: JENA-1819
> URL: https://issues.apache.org/jira/browse/JENA-1819
> Project: Apache Jena
>  Issue Type: Bug
>Reporter: xia0c
>Priority: Major
>
> When I try to upgrade jena-arq from 3.12 to 3.13. The following code breaks.
> {code:java}
> public class TestJena {
>   
>   private static FastDateFormat timestamp = 
> FastDateFormat.getInstance("HH:mm:ss.SSS") ;
>   
>   private void printQuery(Query query, QuerySolution initialBinding) {
> String time = DateTimeUtils.nowAsString(timestamp); 
> System.err.print("~~ ");
> System.err.print(time);
> System.err.println(" ~~");
> System.err.println(initialBinding);
> System.err.print(query);
>   }
> }
> {code}
> The code should pass, but it throws an error:
> {code:java}
> TestJena.java:[13,36] no suitable method found for 
> nowAsString(org.apache.commons.lang3.time.FastDateFormat)
> [ERROR] method 
> org.apache.jena.atlas.lib.DateTimeUtils.nowAsString(java.lang.String) is not 
> applicable
> [ERROR] (argument mismatch; org.apache.commons.lang3.time.FastDateFormat 
> cannot be converted to java.lang.String)
> [ERROR] method 
> org.apache.jena.atlas.lib.DateTimeUtils.nowAsString(java.time.format.DateTimeFormatter)
>  is not applicable
> [ERROR] (argument mismatch; org.apache.commons.lang3.time.FastDateFormat 
> cannot be converted to java.time.format.DateTimeFormatter)
> {code}



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


[jira] [Comment Edited] (JENA-1819) Updating from 3.12 to 3.13 breaks

2020-01-18 Thread Andy Seaborne (Jira)


[ 
https://issues.apache.org/jira/browse/JENA-1819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17018399#comment-17018399
 ] 

Andy Seaborne edited comment on JENA-1819 at 1/18/20 9:41 AM:
--

This is due to JENA-1756.

Apache Commons Lang3 moving from v3.4 to v3.9) made a change in the way 
{{FastDateFormat}} works. 3.9 does not handle timezones - it always outputs UTC.

We changed to using the JDK {{java.time.format.DateTimeFormatter}}, leaving 
"nowAsString(String)" (using {{FastDateFormat}} internally) to aid migration. 
Using {{DateTimeFormatter}} does handle timezones as necessary.

Presumably, class {{TestJena}} has not been recompiled with 3.13 - it's a 
compile time change.

{{FastDateFormat}} and {{DateTimeFormatter}} don't have quite the same syntax 
but 

{{DateTimeFormatter timestamp  = DateTimeFormatter.ofPattern("HH:mm:ss.SSS");}}

should work.


was (Author: andy.seaborne):
This is due to JENA-1756.

Apache Commons Lang3 moving from v3.4 to v3.9) made a change in the way 
{{FastDateFormat}} works. 3.9 does not handle timezones - it always outputs UTC.

We changed to using the JDK {{java.time.format.DateTimeFormatter}}, leaving 
"nowAsString(String)" (using {{FastDateFormat}} internally) to aid migration. 
Using {{DateTimeFormatter}} does handle timezones as necessary.

Presumably, class {{TestJena}} has not been recompiled with 3.13 - it's a 
compile time change.

{{FastDateFormat}} and {DateTimeFormatter}} don't have quite the same syntax 
but 

{{DateTimeFormatter timestamp  = DateTimeFormatter.ofPattern("HH:mm:ss.SSS");}}

should work.

> Updating from 3.12 to 3.13 breaks
> -
>
> Key: JENA-1819
> URL: https://issues.apache.org/jira/browse/JENA-1819
> Project: Apache Jena
>  Issue Type: Bug
>Reporter: xia0c
>Priority: Major
>
> When I try to upgrade jena-arq from 3.12 to 3.13. The following code breaks.
> {code:java}
> public class TestJena {
>   
>   private static FastDateFormat timestamp = 
> FastDateFormat.getInstance("HH:mm:ss.SSS") ;
>   
>   private void printQuery(Query query, QuerySolution initialBinding) {
> String time = DateTimeUtils.nowAsString(timestamp); 
> System.err.print("~~ ");
> System.err.print(time);
> System.err.println(" ~~");
> System.err.println(initialBinding);
> System.err.print(query);
>   }
> }
> {code}
> The code should pass, but it throws an error:
> {code:java}
> TestJena.java:[13,36] no suitable method found for 
> nowAsString(org.apache.commons.lang3.time.FastDateFormat)
> [ERROR] method 
> org.apache.jena.atlas.lib.DateTimeUtils.nowAsString(java.lang.String) is not 
> applicable
> [ERROR] (argument mismatch; org.apache.commons.lang3.time.FastDateFormat 
> cannot be converted to java.lang.String)
> [ERROR] method 
> org.apache.jena.atlas.lib.DateTimeUtils.nowAsString(java.time.format.DateTimeFormatter)
>  is not applicable
> [ERROR] (argument mismatch; org.apache.commons.lang3.time.FastDateFormat 
> cannot be converted to java.time.format.DateTimeFormatter)
> {code}



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


Re: [VOTE] Apache Jena 3.14.0 RC 2

2020-01-18 Thread Bruno P. Kinoshita
   [x] +1 Approve the release


Build passing OK from tag on


Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 
2018-06-18T06:33:14+12:00)
Maven home: /opt/apache-maven-3.5.4
Java version: 1.8.0_232, vendor: Private Build, runtime: 
/usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_NZ, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-74-generic", arch: "amd64", family: "unix"


Bruno

On Friday, 17 January 2020, 6:35:05 am NZDT, Andy Seaborne 
 wrote:  
 
 Hi,

Here is a vote on the release of Apache Jena 3.14.0
This is the second proposed release candidate.

The deadline is only 72hours in case there are enough +1 votes and I can 
do the final stage on Sunday - otherwise, it is likely to be mid next week.

 Changes from RC1:

Fix for JENA-1817
https://github.com/apache/jena/commit/08ca0b83

 Changes for 3.14.0:

https://s.apache.org/jena-3.14.0-jira

 Release Vote

Everyone, not just committers, is invited to test and vote.
Please download and test the proposed release.

Staging repository:
  https://repository.apache.org/content/repositories/orgapachejena-1036

Proposed dist/ area:
  https://dist.apache.org/repos/dist/dev/jena/

Keys:
  https://svn.apache.org/repos/asf/jena/dist/KEYS

Git commit (browser URL):
  https://github.com/apache/jena/commit/d0abcd14

Git Commit Hash:
  d0abcd14f82c36045a3c047941a6518f3bdb56ce

Git Commit Tag:
  jena-3.14.0

Please vote to approve this release:

        [ ] +1 Approve the release
        [ ]  0 Don't care
        [ ] -1 Don't release, because ...

This vote will be open until at least

    Sunday, 19th January 2020 at 18:00 UTC

If you expect to check the release but the time limit does not work
for you, please email within the schedule above with an expected time
and we can extend the vote period.

Thanks,

      Andy

Checking needed:

+ are the GPG signatures fine?
+ are the checksums correct?
+ is there a source archive?

+ can the source archive really be built?
          (NB This requires a "mvn install" first time)
+ is there a correct LICENSE and NOTICE file in each artifact
          (both source and binary artifacts)?
+ does the NOTICE file contain all necessary attributions?
+ have any licenses of dependencies changed due to upgrades?
            if so have LICENSE and NOTICE been upgraded appropriately?
+ does the tag/commit in the SCM contain reproducible sources?