[
https://issues.apache.org/jira/browse/JENA-1139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141233#comment-15141233
]
Stian Soiland-Reyes commented on JENA-1139:
-------------------------------------------
Note, in TAVERNA-892 we recreated this even when not running inside OSGi by
using only the jena-osgi 3.0.1 Maven dependency.
{code}
test(org.apache.taverna.robundle.validator.ValidatorTest) Time elapsed: 0.418
sec <<< ERROR!
java.lang.ExceptionInInitializerError: null
at
org.apache.jena.tdb.sys.EnvTDB.processGlobalSystemProperties(EnvTDB.java:33)
at org.apache.jena.tdb.TDB.init(TDB.java:250)
at org.apache.jena.tdb.sys.InitTDB.start(InitTDB.java:29)
at org.apache.jena.system.JenaSystem.lambda$init$40(JenaSystem.java:114)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:179)
at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:156)
at org.apache.jena.system.JenaSystem.init(JenaSystem.java:111)
at org.apache.jena.rdf.model.ModelFactory.<clinit>(ModelFactory.java:49)
at
org.apache.taverna.robundle.manifest.RDFToManifest.loadOntologyFromClasspath(RDFToManifest.java:315)
at
org.apache.taverna.robundle.manifest.RDFToManifest.loadDCT(RDFToManifest.java:262)
at
org.apache.taverna.robundle.manifest.RDFToManifest.loadOntologies(RDFToManifest.java:304)
at
org.apache.taverna.robundle.manifest.RDFToManifest.<init>(RDFToManifest.java:182)
at
org.apache.taverna.robundle.Bundle.readOrPopulateManifest(Bundle.java:114)
at org.apache.taverna.robundle.Bundle.getManifest(Bundle.java:87)
at
org.apache.taverna.robundle.validator.RoValidator.validate(RoValidator.java:88)
at
org.apache.taverna.robundle.validator.RoValidator.<init>(RoValidator.java:80)
at
org.apache.taverna.robundle.validator.ValidatorTest.test(ValidatorTest.java:47)
{code}
> jena-osgi does not initialize all modules
> -----------------------------------------
>
> Key: JENA-1139
> URL: https://issues.apache.org/jira/browse/JENA-1139
> Project: Apache Jena
> Issue Type: Bug
> Components: OSGi
> Affects Versions: Jena 3.0.1
> Reporter: Stian Soiland-Reyes
>
> As discovered in TAVERNA-892 the jena-osgi of Jena 3.0.1
> seems to have not merged correctly
> META-INF/services/org.apache.jena.system.JenaSubsystemLifecycle
> which breaks the new Jena initialization - only TDB is initialized - but TDB
> depends on ARQ already being initialized (to get its context).
> {code}
> stain@biggie:~/.m2/repository/org/apache/jena/jena-osgi$ unzip
> ./3.0.1/jena-osgi-3.0.1.jar
> META-INF/services/org.apache.jena.system.JenaSubsystemLifecycle
> Archive: ./3.0.1/jena-osgi-3.0.1.jar
> inflating: META-INF/services/org.apache.jena.system.JenaSubsystemLifecycle
> stain@biggie:~/.m2/repository/org/apache/jena/jena-osgi$ cat
> META-INF/services/org.apache.jena.system.JenaSubsystemLifecycle
> org.apache.jena.tdb.sys.InitTDB
> {code}
> So basically only the last JenaSubsystemLifecycle file survives when shading
> jena-core, jena-arq, jena-tdb, jena-iri with Embed-Dependency and inline=true.
> The equivalent of the Maven Shade plugin's ServicesResourceTransformer would
> be able to merge these.
> https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ServicesResourceTransformer
> but I'm not sure how this can be done with the bundle plugin. I guess it
> could be overridden with its own src/main/resources/META-INF/services/ file
> in jena-osgi as well - but then it needs maintenance.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)