java.lang.NoSuchFieldError: ACCEPT_TURTLESTAR

19 views
Skip to first unread message

rdf 4j

unread,
Mar 12, 2021, 10:21:53 AMMar 12
to RDF4J Users

Hi there, i try to add a turtle file as an input stream to a repo and get the exception:

Caused by: java.lang.NoSuchFieldError: ACCEPT_TURTLESTAR
    at org.eclipse.rdf4j.rio.turtle.TurtleParser.parseValue(TurtleParser.java:549)
    at org.eclipse.rdf4j.rio.turtle.TurtleParser.parseSubject(TurtleParser.java:384)
    at org.eclipse.rdf4j.rio.turtle.TurtleParser.parseTriples(TurtleParser.java:325)
    at org.eclipse.rdf4j.rio.turtle.TurtleParser.parseStatement(TurtleParser.java:194)
    at org.eclipse.rdf4j.rio.turtle.TurtleParser.parse(TurtleParser.java:156)
    at org.eclipse.rdf4j.rio.turtle.TurtleParser.parse(TurtleParser.java:119)
    at org.eclipse.rdf4j.repository.util.RDFLoader.loadInputStreamOrReader(RDFLoader.java:241)
    at org.eclipse.rdf4j.repository.util.RDFLoader.load(RDFLoader.java:168)
    at org.eclipse.rdf4j.repository.base.AbstractRepositoryConnection.add(AbstractRepositoryConnection.java:283)
    at org.eclipse.rdf4j.repository.RepositoryConnection.add(RepositoryConnection.java:737)

I have no idea what the problem is and i'm almost sure, yesterday it was working ,-)
Fredy

bart.h...@bosa.fgov.be

unread,
Mar 12, 2021, 10:27:56 AMMar 12
to RDF4J Users
Hi,


could you perhaps share a little more detail, like which RDF4J version(s) you are using ?
Might be a mix of versions in your pom/gradle...

Best regards

Bart

rdf 4j

unread,
Mar 12, 2021, 10:29:48 AMMar 12
to RDF4J Users
Ha, i currently working on my rdf playground to provide the code and there it works !
One Moment.

rdf 4j

unread,
Mar 12, 2021, 10:45:44 AMMar 12
to RDF4J Users

i cannot reproduce it out of my big project.
I'm using rdf4j 3.5.0

The dependencies of my effective pom are:

  <dependencies>
    <dependency>
      <groupId>xxxxxxxxxxxxxxxxxxxxxxx</groupId>
      <artifactId>activitypub-domain</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>xxxxxxxxxxxxxxxxxxxxxxx</groupId>
      <artifactId>xxx-rdf-schemas</artifactId>
      <version>0.0.1-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <version>2.3.6.RELEASE</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>5.2.11.RELEASE</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.14</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.rdf4j</groupId>
      <artifactId>rdf4j-storage</artifactId>
      <version>3.5.0</version>
      <type>pom</type>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.rdf4j</groupId>
      <artifactId>rdf4j-model</artifactId>
      <version>3.5.0</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
Message has been deleted

rdf 4j

unread,
Mar 12, 2021, 10:55:05 AMMar 12
to RDF4J Users

Even in my junit test in the same context it works, the problem occurs only if the code is executed when i start the spring-boot app.

!! The code above is executed while spring context initialization !!

Fredy

bart.h...@bosa.fgov.be

unread,
Mar 12, 2021, 2:17:25 PMMar 12
to RDF4J Users
Hmz, strange... Perhaps try to clean and rebuild everything ? 

As a little side note: any reason why you're using 3.5.0 ? The latest version is 3.6.1, so you might want to give that version a try
If you want to use 3.5, I'd recommend to use 3.5.1 (which includes a few bug fixes, but they have nothing to do with  turtle...)

Bart

rdf 4j

unread,
Mar 13, 2021, 9:23:51 AMMar 13
to RDF4J Users
Hi,
3.5.0 -> the reason is: "too much other tasks" ;-o
i will switch to 3.5.1 and set me a 3.6.1 reminder!

I moved the code out of the sprint boot initialization "zone" and now it works.

Thanks!
Fredy
Reply all
Reply to author
Forward
0 new messages