leonardcser opened a new issue, #635:
URL: https://github.com/apache/incubator-baremaps/issues/635

   ## Description
   When using the Berlin map 
(http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf) in the 
basemap, I get an error from PostgreSQL.
   
   ## Reproduce
   - Modify the `basemap/config.js` `osmPbfUrl` key to the url above.
   - Modify the `basemap/workflow.js` by commenting out the first step of id 
`natural-earth`
   - Execute the workflow with `baremaps workflow execute --file workflow.js`
   
   ## Stacktrace
   ```bash
   java.util.concurrent.ExecutionException: 
org.apache.baremaps.workflow.WorkflowException: 
org.apache.baremaps.workflow.WorkflowException: java.lang.RuntimeException: 
java.io.IOException: Ending write to copy failed.
        at 
java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
        at 
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
        at org.apache.baremaps.cli.workflow.Execute.call(Execute.java:48)
        at org.apache.baremaps.cli.workflow.Execute.call(Execute.java:29)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at 
picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at 
picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at org.apache.baremaps.cli.Baremaps.main(Baremaps.java:83)
   Caused by: org.apache.baremaps.workflow.WorkflowException: 
org.apache.baremaps.workflow.WorkflowException: java.lang.RuntimeException: 
java.io.IOException: Ending write to copy failed.
        at 
org.apache.baremaps.workflow.WorkflowExecutor.lambda$createFutureStep$3(WorkflowExecutor.java:162)
        at 
java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787)
        at 
java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
   Caused by: org.apache.baremaps.workflow.WorkflowException: 
java.lang.RuntimeException: java.io.IOException: Ending write to copy failed.
        at 
org.apache.baremaps.workflow.tasks.ImportShapefile.execute(ImportShapefile.java:42)
        at 
org.apache.baremaps.workflow.WorkflowExecutor.lambda$createFutureStep$3(WorkflowExecutor.java:157)
        ... 5 more
   Caused by: java.lang.RuntimeException: java.io.IOException: Ending write to 
copy failed.
        at 
org.apache.baremaps.storage.postgres.PostgresStore.add(PostgresStore.java:177)
        at 
org.apache.baremaps.workflow.tasks.ImportShapefile.execute(ImportShapefile.java:39)
        ... 6 more
   Caused by: java.io.IOException: Ending write to copy failed.
        at 
org.postgresql.copy.PGCopyOutputStream.close(PGCopyOutputStream.java:115)
        at 
java.base/java.io.FilterOutputStream.close(FilterOutputStream.java:188)
        at 
java.base/java.io.FilterOutputStream.close(FilterOutputStream.java:188)
        at 
org.apache.baremaps.database.copy.CopyWriter.close(CopyWriter.java:344)
        at 
org.apache.baremaps.storage.postgres.PostgresStore.add(PostgresStore.java:175)
        ... 7 more
   Caused by: org.postgresql.util.PSQLException: ERROR: Polygon must have 
closed rings
     Where: COPY water_polygons_shp, line 6, column geometry
        at 
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
        at 
org.postgresql.core.v3.QueryExecutorImpl.processCopyResults(QueryExecutorImpl.java:1264)
        at 
org.postgresql.core.v3.QueryExecutorImpl.endCopy(QueryExecutorImpl.java:1069)
        at org.postgresql.core.v3.CopyInImpl.endCopy(CopyInImpl.java:49)
        at 
org.postgresql.copy.PGCopyOutputStream.endCopy(PGCopyOutputStream.java:183)
        at 
org.postgresql.copy.PGCopyOutputStream.close(PGCopyOutputStream.java:113)
        ... 11 more
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to