(rdf4j-stardog) NoSuchMethodError... ParsedURI.toString(...StringBuilder))


(Miguel Aragón) #1

While trying to update to the latest rdf4j-stardog version (6.0.1 at the moment), I'm getting the following exception as soon as I try to query something:

Caused by: com.stardog.stark.query.QueryExecutionFailure: java.lang.NoSuchMethodError: org.eclipse.rdf4j.common.net.ParsedURI.toString(Ljava/lang/StringBuilder;)Ljava/lang/String;
	at com.complexible.common.rdf.query.IteratorAsGraphQueryResult.hasNext(IteratorAsGraphQueryResult.java:97) ~[stardog-utils-rdf-6.0.1.jar:?]
	at com.stardog.stark.query.impl.ForwardingGraphQueryResult.hasNext(ForwardingGraphQueryResult.java:60) ~[stardog-stark-query-api-6.0.1.jar:?]
	at com.complexible.stardog.api.impl.AbstractConnection$OnCloseQueryResult.hasNext(AbstractConnection.java:732) ~[stardog-api-6.0.1.jar:?]
	at com.complexible.stardog.api.impl.AbstractConnection$ConnectionQueryResult.hasNext(AbstractConnection.java:675) ~[stardog-api-6.0.1.jar:?]
	at com.complexible.stardog.rdf4j.APIMapping$RDF4jGraphQueryResult.hasNext(APIMapping.java:520) ~[stardog-rdf4j-6.0.1.jar:?]
	at org.eclipse.rdf4j.common.iteration.IterationSpliterator.tryAdvance(IterationSpliterator.java:43) ~[rdf4j-client-2.4.2.jar:2.4.2+015fa81]
	at java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681) ~[?:1.8.0_192]
	at com.complexible.stardog.rdf4j.StardogRepositoryConnection$SesameIterationAdapter.hasNext(StardogRepositoryConnection.java:620) ~[stardog-rdf4j-6.0.1.jar:?]
	at org.eclipse.rdf4j.repository.RepositoryResult.hasNext(RepositoryResult.java:52) ~[rdf4j-client-2.4.2.jar:2.4.2+015fa81]
	... 113 more
Caused by: java.lang.NoSuchMethodError: org.eclipse.rdf4j.common.net.ParsedURI.toString(Ljava/lang/StringBuilder;)Ljava/lang/String;
	at com.stardog.stark.io.ParserContext.resolveURI(ParserContext.java:151) ~[stardog-stark-io-api-6.0.1.jar:?]
	at com.stardog.stark.io.turtle.TurtleParser.parseURI(TurtleParser.java:485) ~[stardog-stark-io-turtle-6.0.1.jar:?]
	at com.stardog.stark.io.turtle.TurtleParser.parseValue(TurtleParser.java:408) ~[stardog-stark-io-turtle-6.0.1.jar:?]
	at com.stardog.stark.io.trig.TrigParser.parseGraph(TrigParser.java:123) ~[stardog-stark-io-trig-6.0.1.jar:?]
	at com.stardog.stark.io.trig.TrigParser.parseStatement(TrigParser.java:71) ~[stardog-stark-io-trig-6.0.1.jar:?]
	at com.stardog.stark.io.turtle.TurtleParser.parse(TurtleParser.java:93) ~[stardog-stark-io-turtle-6.0.1.jar:?]
	... 3 more

It seems like the library is using the now non-existent signature ParsedUtil::toString( StringBuilder ). Looking at the history of rdf4j I can't seem to find on which version that method was still present (the class was deprecated a long time ago).

Since our application is using the RDF4J library to work (not just to integrate with Stardog) we can't downgrade to an old version of RDF4J.

Environment

  • Stardog 6.0.1
  • rdf4j-stardog 6.0.1
  • rdf4j 2.4.2

(stephen) #2

Thanks for this bug report. We've tracked down the cause of the error and it will be fixed for 6.0.2.