[
https://issues.apache.org/jira/browse/MARMOTTA-674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17023034#comment-17023034
]
Andrea Gazzarini commented on MARMOTTA-674:
-------------------------------------------
Hi [~bjo], I met the same issue and after finding your ticket, I've tried to
reproduce it.
After digging a bit in the code, I believe the failure reason is here, in the
Postgresql JDBC drivers:
{code:java}
/**
* Is the server we are connected to running at least this version?
* This comparison method will fail whenever a major or minor version
* goes to two digits (10.3.0) or (7.10.1).
*/
public boolean haveMinimumServerVersion(String ver)
{
return (dbVersionNumber.compareTo(ver) >= 0);
}{code}
Version numbers are strings, so the comparison is using the _String::compareTo_
method determining if the SavePoints are supported.
Unfortunately, the "dbVersionNumber" in the snippets above is "10.x" (where x
is your version, mine is "10.6"), the "ver" parameter is set to "8.0" so as
consequence of that
{code:java}
"10.6".compareTo("8.0") = -7 {code}
That is because the method compares two strings lexicographically. In other
words, the bundled drivers are supposed to target a Postgresql 9.x instance and
10.x is not (fully) supported.
You could try the following:
* build Marmotta from source, but first changing the JDBC Postgresql driver
library version here [2]
* move to a previous Postgresql version (I guess this is valid only if we are
talking about a development context)
----
[1] [https://marmotta.apache.org/installation.html#source]
[2]
[https://git-wip-us.apache.org/repos/asf?p=marmotta.git;a=blob;f=parent/pom.xml;h=62dafff1735c0ce2db76f90c3dfa3cdf7a6e0726;hb=HEAD#l50]
> Impossible to import 256MB TTL or RDF/XML file
> ----------------------------------------------
>
> Key: MARMOTTA-674
> URL: https://issues.apache.org/jira/browse/MARMOTTA-674
> Project: Marmotta
> Issue Type: Bug
> Components: KiWi Triple Store
> Affects Versions: 3.4.0
> Environment: Ubuntu 18.04
> last Marmota release 3.4.0 default settings
> H2 database or Postgres 10 database
> Reporter: Jonathan Bisson
> Priority: Critical
> Attachments: marmotta_bug.txt, marmotta_pgsql.txt, test_fail.ttl
>
>
> Trying to import a file (TTL or RDF/XML), I always have errors during import
> (and at different lines in the file everytime I try the import).
>
> See the log file attached with two successive tries for the same file...
>
> Tried with PGSQL and I get different errors (see the log file
> marmotta_pgsql.txt).
>
> The error says that " Server versions prior to 8.0 do not support
> savepoints." but I'm using Postgres 10…
>
> Looking at the database, it seems that some data is imported in the database
> as the nodes table contains some of my nodes but dataview doesn't show
> anything, SPARQL queries don't show anything either.
>
> Trying to load the attached ttl fails too using the following command (same
> errors in the logs and answers a HTTP 500):
> curl -sfS -X POST -H "Content-Type: text/turtle; charset=utf-8" -d
> @/tmp/test_fail.ttl http://127.0.0.1:8080/marmotta/import/upload
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)