[BUG] Sporadically TurtleLoader.loadTurtle fails #411
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
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)
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
org.example.turtleloader.zip
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)
The text was updated successfully, but these errors were encountered: