Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphDB: Incompatible format version: 2 #3899

Closed
maxstolze opened this issue May 16, 2022 · 7 comments
Closed

GraphDB: Incompatible format version: 2 #3899

maxstolze opened this issue May 16, 2022 · 7 comments
Labels
🐞 bug issue is a bug wontfix issue won't be fixed (close reason)

Comments

@maxstolze
Copy link
Contributor

Current Behavior

Can not communicate with RDF4J 4.0.1 and GraphDB 9.11.1 (based on RDF4J 3.7.6) due to: Transaction handling error: Incompatible format version: 2

[...]
Caused by: org.eclipse.rdf4j.repository.RepositoryException: Transaction handling error: Incompatible format version: 2
	at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.execute(SPARQLProtocolSession.java:1070) ~[rdf4j-http-client-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.http.client.SPARQLProtocolSession.executeNoContent(SPARQLProtocolSession.java:1024) ~[rdf4j-http-client-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.http.client.RDF4JProtocolSession.upload(RDF4JProtocolSession.java:1102) ~[rdf4j-http-client-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.http.client.RDF4JProtocolSession.upload(RDF4JProtocolSession.java:925) ~[rdf4j-http-client-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.http.client.RDF4JProtocolSession.removeData(RDF4JProtocolSession.java:910) ~[rdf4j-http-client-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.repository.http.HTTPRepositoryConnection.removeModel(HTTPRepositoryConnection.java:574) ~[rdf4j-repository-http-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.repository.http.HTTPRepositoryConnection.flushTransactionState(HTTPRepositoryConnection.java:594) ~[rdf4j-repository-http-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.repository.http.HTTPRepositoryConnection.add(HTTPRepositoryConnection.java:440) ~[rdf4j-repository-http-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.repository.base.RepositoryConnectionWrapper.add(RepositoryConnectionWrapper.java:151) ~[rdf4j-repository-api-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.repository.base.RepositoryConnectionWrapper.add(RepositoryConnectionWrapper.java:151) ~[rdf4j-repository-api-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.spring.resultcache.CachingRepositoryConnection.add(CachingRepositoryConnection.java:138) ~[rdf4j-spring-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.repository.base.RepositoryConnectionWrapper.add(RepositoryConnectionWrapper.java:151) ~[rdf4j-repository-api-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.spring.tx.TransactionalRepositoryConnection.add(TransactionalRepositoryConnection.java:74) ~[rdf4j-spring-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.repository.RepositoryConnection.add(RepositoryConnection.java:694) ~[rdf4j-repository-api-4.0.1.jar:4.0.1]
	at org.eclipse.rdf4j.spring.tx.TransactionalRepositoryConnection.add(TransactionalRepositoryConnection.java:181) ~[rdf4j-spring-4.0.1.jar:4.0.1]
[...]

Expected Behavior

Working communication with the GraphDB.

Steps To Reproduce

  1. RDF4J 4.0.1 + GraphDB 9.11.1 on Windows 10
  2. Try to establish a connection
  3. Receive error

Version

4.0.1

Are you interested in contributing a solution yourself?

No response

Anything else?

No response

@maxstolze maxstolze added the 🐞 bug issue is a bug label May 16, 2022
@github-actions github-actions bot added this to 📥 Inbox in Project Progress May 16, 2022
@hmottestad
Copy link
Contributor

@jeenbroekstra I know you mentioned something in your email, does this align with what you wrote? Is it something we should consider a bug, as in that we want to backwards compatible with older servers?

@maxstolze I'm not sure what your use case is, so I would like to ask if you are unable to upgrade the client and server versions in tandem and need to support both older and newer servers with the same client? The next major GraphDB release should use RDF4J 4.0.

@abrokenjester
Copy link
Contributor

It is yes, but I need to look a bit closer at what's going on here, and what's possible workarounds or fixes are.

@fkleedorfer
Copy link
Contributor

If there is anything we (@maxstolze is a colleague of mine) can do to shed more light on the issue, please let us know!

@abrokenjester
Copy link
Contributor

abrokenjester commented May 16, 2022

Probable cause is that the HTTPRepositoryConnection hardcodes use of the binary format for serializing a model that is being added/removed as part of a transaction. The problem is that the client-side binary format is a version ahead of the server, so the server can't parse the request.

Possible fix is to rely on the configured preferred RDF format instead, which would allow you to configure it to use another format for the serialization.

@abrokenjester abrokenjester moved this from 📥 Inbox to 📋 Backlog in Project Progress May 16, 2022
@abrokenjester
Copy link
Contributor

abrokenjester commented May 16, 2022

Actually @fkleedorfer and @maxstolze there is an easier/quicker workaround you could try: the Binary RDF Writer can be explicitly configured to use the older format. In your client application, try setting the system property org.eclipse.rdf4j.rio.binary.format_version to 1. See https://rdf4j.org/javadoc/latest/org/eclipse/rdf4j/rio/helpers/BinaryRDFWriterSettings.html#VERSION

@maxstolze
Copy link
Contributor Author

Workaround seems to work here. Thx!

@abrokenjester
Copy link
Contributor

I'll close this with a "won't fix" then as there is an acceptable workaround for this situation. Thanks!

Project Progress automation moved this from 📋 Backlog to 🥳 Done May 16, 2022
@abrokenjester abrokenjester added the wontfix issue won't be fixed (close reason) label May 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug issue is a bug wontfix issue won't be fixed (close reason)
Projects
No open projects
Development

No branches or pull requests

4 participants