After “overcoming” with a workaround the issue that (probably) the classifier produces making it unable to resolve the aspose dependency: Aspose.Words as OSGI . Dependency cannot be resolved
i was able to start my bundle which includes Aspose.Words dependency on Apache Karaf (4.0.9). I declared aspose in my features.xml in the following way:
<bundle>wrap:mvn:com.aspose/aspose-words/18.6-jdk16$Bundle-SymbolicName=com.aspose.words&Export-Package=com.aspose.words.*;version=18.6&overwrite=merge</bundle>
Unfortunately when i try to convert a document, i get the following error:
java.lang.NoClassDefFoundError: javax/xml/namespace/NamespaceContext
at asposewobfuscated.zzP.(Unknown Source)
at asposewobfuscated.zzP.(Unknown Source)
at com.aspose.words.zz7R.zz8(Unknown Source)
at com.aspose.words.zz18.zzZVO(Unknown Source)
at com.aspose.words.zz18.zzY(Unknown Source)
at com.aspose.words.Document.zzY(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
The headers for aspose on karaf resolve following:
Aspose.Words for Java (155)
Application-Name = Aspose.Words for Java
Bnd-LastModified = 1530621699281
Codebase = *
Created-By = 1.8.0_91 (Oracle Corporation)
Generated-By-Ops4j-Pax-From = wrap:file:/C:/Users/steph/.m2/repository/com/aspose/aspose-words/18.6-jdk16/aspose-words-18.6-jdk16.jar$Bundle-SymbolicName=com.aspose.words&Export-Package=com.aspose.words.*;version=18.6&overwrite=merge
Implementation-Title = Aspose.Words for Java
Implementation-Vendor = Aspose Pty Ltd
Implementation-Version = 18.6
Manifest-Version = 1.0
Permissions = all-permissions
Release-Date = 2018.06.01
Specification-Title = Aspose.Words for Java
Specification-Vendor = Aspose Pty Ltd
Specification-Version = 18.6
Tool = Bnd-2.3.0.201405100607Bundle-ManifestVersion = 2
Bundle-Name = Aspose.Words for Java
Bundle-SymbolicName = com.aspose.words
Bundle-Version = 18.6Require-Capability =
osgi.ee;filter:=(&(osgi.ee=JavaSE)(version=1.6))Export-Package =
com.aspose.words;uses:=“com.aspose.words.net.System.Data,com.aspose.words.ref,javax.print.attribute”;version=18.6,
com.aspose.words.net.System;version=18.6,
com.aspose.words.net.System.Data;uses:=com.aspose.words.net.System.Data.Common;version=18.6,
com.aspose.words.net.System.Data.Common;uses:=com.aspose.words.net.System.Data;version=18.6,
com.aspose.words.ref;version=18.6
Import-Package =
javax.crypto;resolution:=optional,
javax.crypto.spec;resolution:=optional,
javax.imageio;resolution:=optional,
javax.imageio.metadata;resolution:=optional,
javax.imageio.spi;resolution:=optional,
javax.imageio.stream;resolution:=optional,
javax.print;resolution:=optional,
javax.print.attribute;resolution:=optional,
javax.print.attribute.standard;resolution:=optional,
javax.swing;resolution:=optional,
javax.xml.parsers;resolution:=optional,
javax.xml.transform;resolution:=optional,
javax.xml.transform.dom;resolution:=optional,
javax.xml.transform.stream;resolution:=optional,
javax.xml.xpath;resolution:=optional,
org.w3c.dom;resolution:=optional,
org.xml.sax;resolution:=optional,
javax.swing.text;resolution:=optional
Private-Package =
asposewobfuscated,
resources,
resources.OleIcons,
resources.PageBorderArt
Is there something extra i need to export in order Aspose to find the NamespaceContext class ? Do i need to wrap another required dependency by Aspose.Words ?