Closed MvanErp closed 4 years ago
I re-run the last version of the source code available on the git repository and I do not have the same error. I do not know why this error occurs to you. Do you have a stable internet connection?
@pippokill do you have the same error?
@federicarollo No. Yesterday, I was able to run the whole project and visualize the map.
I can imagine there being a slight hiccup in the connection, but it would be better if the tool didn't die or gave a more intuitive error message. When running the tool again, I'm back to:
Exception in thread "main" org.postgresql.util.PSQLException: ERROR: relation "crime_news.news" does not exist Position: 82 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2510) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2245) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:311) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:447) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:368) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:309) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:295) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:272) at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:225) at SPARQLHandler.findGeomWithSPARQL(SPARQLHandler.java:143) at Main.main(Main.java:78)
Which I seem to only be able to resolve by deleting the database, reimporting it, and then running the ingestion process again. I don't know if this is a Mac bug, or something else, but it is quite puzzling.
I have added a try-catch block for the first issue, in this way the program won't stop. About the second issue, please make sure that the parameters for the connection to the database are correct (file config.json as explained in the readme) and that you have created a schema called crime_news.
I'm still getting errors when trying to ingest data:
Inserito: https://gazzettadimodena.gelocal.it/modena/cronaca/2020/05/22/news/rivolta-in-carcere-due-esposti-contro-la-penitenziaria-accuse-di-pestaggi-1.38872494 Exception in thread "main" org.jsoup.UncheckedIOException: java.io.IOException: Premature EOF at org.jsoup.parser.CharacterReader.bufferUp(CharacterReader.java:60) at org.jsoup.parser.CharacterReader.(CharacterReader.java:35)
at org.jsoup.parser.CharacterReader.(CharacterReader.java:39)
at org.jsoup.parser.TreeBuilder.initialiseParse(TreeBuilder.java:35)
at org.jsoup.parser.HtmlTreeBuilder.initialiseParse(HtmlTreeBuilder.java:66)
at org.jsoup.parser.TreeBuilder.parse(TreeBuilder.java:44)
at org.jsoup.parser.Parser.parseInput(Parser.java:39)
at org.jsoup.helper.DataUtil.parseInputStream(DataUtil.java:151)
at org.jsoup.helper.HttpConnection$Response.parse(HttpConnection.java:832)
at org.jsoup.helper.HttpConnection.get(HttpConnection.java:289)
at NewsArticles.addNewsGM(NewsArticles.java:511)
at Main.main(Main.java:68)
Caused by: java.io.IOException: Premature EOF
at java.base/sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:565)
at java.base/sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:609)
at java.base/sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:696)
at java.base/java.io.FilterInputStream.read(FilterInputStream.java:133)
at java.base/sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3495)
at java.base/java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:243)
at java.base/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:159)
at java.base/java.util.zip.GZIPInputStream.read(GZIPInputStream.java:118)
at java.base/java.io.BufferedInputStream.fill(BufferedInputStream.java:252)
at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:292)
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:351)
at org.jsoup.internal.ConstrainableInputStream.read(ConstrainableInputStream.java:64)
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:185)
at java.base/java.io.BufferedReader.fill(BufferedReader.java:161)
at java.base/java.io.BufferedReader.read1(BufferedReader.java:212)
at java.base/java.io.BufferedReader.read(BufferedReader.java:287)
at java.base/java.io.Reader.read(Reader.java:229)
at org.jsoup.parser.CharacterReader.bufferUp(CharacterReader.java:54)
... 11 more