You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Reto Bachmann-Gmür <re...@wymiwyg.com> on 2013/11/02 18:39:19 UTC
ext.jena-* and its imports
Hello
Trying to parsing some XML I got a "java.lang.NoClassDefFoundError:
org/apache/xerces/util/XMLChar".
While the error could be avoided by adding
org.apache.servicemix.bundles.xmlresolver and
org.apache.servicemix.bundles.xerces to my launcher I'm wondering about the
imports in the manifest of ext.jena-core.
- Why are all the packages in Import-Package marked as
resolution:=optional?
- Why is the DynamicImport-Package directive used for 3 packages?
The only case I've encountered so far which required DynamicImport-Package
was for bundles providing scripting engines that require access to the full
class path.
Cheers,
Reto
Re: ext.jena-* and its imports
Posted by Reto Bachmann-Gmür <re...@wymiwyg.com>.
Hi Minto
Thanks for your explanation. The specific dynamic-import seems indeed to be
the best way to deal with this cycle.
As for the optional resolution I hink it might be good to be a bit more
constraining there. As without many of those dependencies users will run
into ClassNotFoundExceptions very quickly.
Cheers,
Reto
On Mon, Nov 4, 2013 at 9:05 AM, Minto van der Sluis <mi...@xup.nl> wrote:
> Hi,
>
> See my remarks below.
>
> regards,
>
> Minto
>
>
> Reto Bachmann-Gmür schreef op 2-11-2013 18:39:
> > Hello
> >
> > Trying to parsing some XML I got a "java.lang.NoClassDefFoundError:
> > org/apache/xerces/util/XMLChar".
> >
> > While the error could be avoided by adding
> > org.apache.servicemix.bundles.xmlresolver and
> > org.apache.servicemix.bundles.xerces to my launcher I'm wondering about
> the
> > imports in the manifest of ext.jena-core.
> >
> > - Why are all the packages in Import-Package marked as
> > resolution:=optional?
> Hmm, I have no clue.
> > - Why is the DynamicImport-Package directive used for 3 packages?
> Jena heavily uses dynamic class loading. As I understand
> DynamicImport-Package is typically used for that. Using using normal
> Import-Package would result in cyclic bundle dependencies ext.jena-core
> <--> ext.jena-arq.
> Also I prefer to be specific. That's why I didn't use "*" instead of
> these 3 packages.
>
> However, I am all ears if there is a better way of doing this.
> >
> > The only case I've encountered so far which required
> DynamicImport-Package
> > was for bundles providing scripting engines that require access to the
> full
> > class path.
> >
> > Cheers,
> > Reto
> >
>
>
> --
> ir. ing. Minto van der Sluis
> Software innovator / renovator
> Xup BV
>
> Mobiel: +31 (0) 626 014541
>
>
Re: ext.jena-* and its imports
Posted by Minto van der Sluis <mi...@xup.nl>.
Hi,
See my remarks below.
regards,
Minto
Reto Bachmann-Gmür schreef op 2-11-2013 18:39:
> Hello
>
> Trying to parsing some XML I got a "java.lang.NoClassDefFoundError:
> org/apache/xerces/util/XMLChar".
>
> While the error could be avoided by adding
> org.apache.servicemix.bundles.xmlresolver and
> org.apache.servicemix.bundles.xerces to my launcher I'm wondering about the
> imports in the manifest of ext.jena-core.
>
> - Why are all the packages in Import-Package marked as
> resolution:=optional?
Hmm, I have no clue.
> - Why is the DynamicImport-Package directive used for 3 packages?
Jena heavily uses dynamic class loading. As I understand
DynamicImport-Package is typically used for that. Using using normal
Import-Package would result in cyclic bundle dependencies ext.jena-core
<--> ext.jena-arq.
Also I prefer to be specific. That's why I didn't use "*" instead of
these 3 packages.
However, I am all ears if there is a better way of doing this.
>
> The only case I've encountered so far which required DynamicImport-Package
> was for bundles providing scripting engines that require access to the full
> class path.
>
> Cheers,
> Reto
>
--
ir. ing. Minto van der Sluis
Software innovator / renovator
Xup BV
Mobiel: +31 (0) 626 014541