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

[BUG] Sporadically TurtleLoader.loadTurtle fails #411

Closed
external-Bogdan-Toma opened this issue Aug 11, 2023 · 2 comments · Fixed by #429
Closed

[BUG] Sporadically TurtleLoader.loadTurtle fails #411

external-Bogdan-Toma opened this issue Aug 11, 2023 · 2 comments · Fixed by #429
Labels
acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. bug Something isn't working

Comments

@external-Bogdan-Toma
Copy link

external-Bogdan-Toma commented Aug 11, 2023

Describe the bug
Using TurtleLoader.loadTurtle fails sometime in a multi threading setup due to registering TURTLE language and this is not a thread safe operation. This can occur not only when loading a custom ttl, but also when loading meta-model files (e.g calling SammAspectMetaModelResourceResolver.mergeMetaModelIntoRawModel)

RDFParserRegistry.registerLangTriples( Lang.TURTLE, ReaderRIOTTurtle.factory );

java.lang.IllegalStateException: Expect to find '[text/turtle]'. The full stacktrace is attached at end.

Where
esmf-aspect-meta-model-resolver:2.3.1

Additional context

  • The test proves the problem (maybe there is a need to change number of threads)
    org.example.turtleloader.zip
  • Stacktrace:
    java.lang.IllegalStateException: Expect to find '[text/turtle]'
    at org.apache.jena.riot.RDFLanguages.register(RDFLanguages.java:280)
    at org.apache.jena.riot.RDFParserRegistry.registerLang(RDFParserRegistry.java:130)
    at org.apache.jena.riot.RDFParserRegistry.registerLangTriples(RDFParserRegistry.java:140)
    at org.eclipse.esmf.aspectmodel.resolver.services.TurtleLoader.loadTurtle(TurtleLoader.java:65)
    at example.TurtleLoaderTest.lambda$turtleLoaderTest$0(TurtleLoaderTest.java:23)
    at java.base/java.lang.Thread.run(Thread.java:833)
  • Idea: implement maybe something similar to org.eclipse.esmf.aspectmodel.resolver.services.DataType.setupTypeMapping
@external-Bogdan-Toma external-Bogdan-Toma added the bug Something isn't working label Aug 11, 2023
@chris-volk chris-volk added the acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. label Aug 14, 2023
@soriniov
Copy link

@chris-volk , @atextor, is there any update regarding this issue?

@github-actions
Copy link

Release v2.4.0 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged Has been viewed by one of the maintainers and is ready for further work, discussion or other steps. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants