You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Jan Thomä <ko...@insomnia-hq.de> on 2008/04/14 12:16:20 UTC

NoClassDefFoundError for org.w3c.dom.Node

Hi,

i have a problem when using Spring with Apache Felix. Spring is deployed as
a Bundle into felix and requires the org.w3c.dom package. I have also
packaged the xml-apis.jar (containing said package) into a bundle using the
bnd tool. Both bundles install and activate without a problem, however when
Spring is trying to instanciate a context, i get a NoClassDefFoundError for
org.w3c.dom.Node. I tried deploying without Spring and using
org.w3c.dom.Node in my own Bundle, and yielded the exact same error. What
did i do wrong here?

Best regards,
Jan
-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError-for-org.w3c.dom.Node-tp16675534p16675534.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: NoClassDefFoundError for org.w3c.dom.Node

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Jan Thomä wrote:
>   
>>>    1. Misconfigured environment (e.g., not exporting it from the system
>>>       bundle).
>>>       
> How do i know what packages i have to export from the system bundle. Is
> there a special rule like "when X and Y and Z, you have to put this package
> into FRAMEWORK_PACKAGES" ? I've come up with:
>
>  * put in there, what the framework (== felix) would need to start up, that
> is org.osgi.***
>  * put in there packages from the JDK that will not be provided as bundles,
> such as javax.swing
>
> However org.w3c.dom.Node doesn't fit in there. Given these rules, i have: 
>
>    configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES,
>                 "org.osgi.framework; version=1.3.0," +
>                         "org.osgi.service.packageadmin; version=1.2.0," +
>                         "org.osgi.service.startlevel; version=1.0.0," +
>                         "org.osgi.service.url; version=1.0.0," +
>                         "org.osgi.util.tracker; version=1.3.2," +
>                         "javax.swing");
>
>
> Any other rules? 
>   

That seems reasonable. Since you have a bundle that exports org.w3c.dom, 
then it won't need to be exported by the system bundle.

>   
>>>    2. Improperly packaged bundle (e.g., either not actually contained in
>>>       the exporter or not being imported by the consumer).
>>>       
>
> Export Bundle Definition in xml-apis.jar:
>
> Manifest-Version: 1.0
> Created-By: 1.5.0_14 (Sun Microsystems Inc.)
> Import-Package: javax.xml.parsers;resolution:=optional,javax.xml.trans
>  form;resolution:=optional,javax.xml.transform.dom;resolution:=optiona
>  l,javax.xml.transform.sax;resolution:=optional,javax.xml.transform.st
>  ream;resolution:=optional,license;resolution:=optional,org.apache.xml
>  commons;resolution:=optional,org.w3c.dom;resolution:=optional,org.w3c
>  .dom.css;resolution:=optional,org.w3c.dom.events;resolution:=optional
>  ,org.w3c.dom.html;resolution:=optional,org.w3c.dom.ranges;resolution:
>  =optional,org.w3c.dom.stylesheets;resolution:=optional,org.w3c.dom.tr
>  aversal;resolution:=optional,org.w3c.dom.views;resolution:=optional,o
>  rg.xml.sax;resolution:=optional,org.xml.sax.ext;resolution:=optional,
>  org.xml.sax.helpers;resolution:=optional
> Originally-Created-By: 1.2.2 (Sun Microsystems Inc.)
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: xml-apis-1.0.b2
> Tool: Bnd-0.0.254
> Bnd-LastModified: 1207856724281
> Export-Package: org.xml.sax,org.w3c.dom.views,org.w3c.dom.stylesheets;
>  uses:="org.w3c.dom",org.w3c.dom.html;uses:="org.w3c.dom",org.w3c.dom,
>  org.w3c.dom.events;uses:="org.w3c.dom.views,org.w3c.dom",javax.xml.tr
>  ansform,javax.xml.transform.dom;uses:="org.w3c.dom,javax.xml.transfor
>  m",license,org.w3c.dom.traversal;uses:="org.w3c.dom",javax.xml.transf
>  orm.sax;uses:="org.xml.sax,org.xml.sax.ext,javax.xml.transform.stream
>  ,javax.xml.transform",org.w3c.dom.css;uses:="org.w3c.dom.views,org.w3
>  c.dom.stylesheets,org.w3c.dom",org.xml.sax.ext;uses:="org.xml.sax",or
>  g.w3c.dom.ranges;uses:="org.w3c.dom",org.xml.sax.helpers;uses:="org.x
>  ml.sax",javax.xml.parsers;uses:="org.xml.sax,org.xml.sax.helpers,org.
>  w3c.dom",org.apache.xmlcommons,javax.xml.transform.stream;uses:="java
>  x.xml.transform"
> Bundle-Version: 0
>
> And the definition in the consumer's jar:
>
> Manifest-Version: 1.0
> Built-By: Kork
> Created-By: Apache Maven Bundle Plugin
> Bundle-Activator: de.insomniahq.peroxide.core.Activator
> Import-Package: de.insomniahq.peroxide.core,de.insomniahq.peroxide.cor
>  e.api.beans,de.insomniahq.peroxide.core.api.services,de.insomniahq.pe
>  roxide.core.gui,javax.swing,org.apache.xerces.impl.xs.opti,org.osgi.f
>  ramework;version="1.3",org.slf4j;version="1.5",org.w3c.dom
> Spring-Context: application-context.xml
> Bnd-LastModified: 1208296674093
> Export-Package: de.insomniahq.peroxide.core.api.services,de.insomniahq
>  .peroxide.core;uses:="de.insomniahq.peroxide.core.gui,org.slf4j,org.o
>  sgi.framework,javax.swing",de.insomniahq.peroxide.core.api.beans;uses
>  :="javax.swing",de.insomniahq.peroxide.core.gui;uses:="org.apache.xer
>  ces.impl.xs.opti,org.slf4j,org.w3c.dom,javax.swing"
> Bundle-Version: 1.0.0.SNAPSHOT
> Bundle-Name: peroxIDE Core Application
> Build-Jdk: 1.5.0_14
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: de.insomniahq.peroxide.core
> Tool: Bnd-0.0.238
>
> To me it looks pretty good, one exports org.w3c.dom, the other one imports
> it.
>   

Yes, that looks good. Just make sure that the .class files are actually 
in the exporter bundle.

>>>    3. Improper integration into OSGi (e.g., some libraries try to load
>>>       classes from the context class loader, so this does not work in
>>>       OSGi unless someone explicitly sets the context class loader
>>>       before calling into the library bundle).
>>>       
> Hmm, how could i debug into this? Logging wont help me out and setting a
> breakpoint on Class.forName is probably not useful either...
>
> Thanks again for showing that much patience with me :)
>   

Assuming that all of the above are correct and that the wiring debug 
messages look correct, then this is the tricky one to debug. You 
actually have to look to see when the from org.w3c.dom is being loaded 
and by whom. Once you know this, you will know if it is using the 
correct class loader (i.e., the exporting bundle's class loader). If 
not, that is your issue.

-> richard

> Best regards,
> Jan
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: NoClassDefFoundError for org.w3c.dom.Node

Posted by Jan Thomä <ko...@insomnia-hq.de>.

Richard S. Hall wrote:
> 
> Ultimately, it is still likely that you have one of the errors that I 
> mention below. Without more detailed debugging, it is hard to know which.
> 

Okay, thanks so far for your help, i really hope we get this cracked
together (and for my own sake i hope it doesn't turn out to be a totally
stupid mistake of mine).


>>    1. Misconfigured environment (e.g., not exporting it from the system
>>       bundle).
How do i know what packages i have to export from the system bundle. Is
there a special rule like "when X and Y and Z, you have to put this package
into FRAMEWORK_PACKAGES" ? I've come up with:

 * put in there, what the framework (== felix) would need to start up, that
is org.osgi.***
 * put in there packages from the JDK that will not be provided as bundles,
such as javax.swing

However org.w3c.dom.Node doesn't fit in there. Given these rules, i have: 

   configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES,
                "org.osgi.framework; version=1.3.0," +
                        "org.osgi.service.packageadmin; version=1.2.0," +
                        "org.osgi.service.startlevel; version=1.0.0," +
                        "org.osgi.service.url; version=1.0.0," +
                        "org.osgi.util.tracker; version=1.3.2," +
                        "javax.swing");


Any other rules? 


>>    2. Improperly packaged bundle (e.g., either not actually contained in
>>       the exporter or not being imported by the consumer).

Export Bundle Definition in xml-apis.jar:

Manifest-Version: 1.0
Created-By: 1.5.0_14 (Sun Microsystems Inc.)
Import-Package: javax.xml.parsers;resolution:=optional,javax.xml.trans
 form;resolution:=optional,javax.xml.transform.dom;resolution:=optiona
 l,javax.xml.transform.sax;resolution:=optional,javax.xml.transform.st
 ream;resolution:=optional,license;resolution:=optional,org.apache.xml
 commons;resolution:=optional,org.w3c.dom;resolution:=optional,org.w3c
 .dom.css;resolution:=optional,org.w3c.dom.events;resolution:=optional
 ,org.w3c.dom.html;resolution:=optional,org.w3c.dom.ranges;resolution:
 =optional,org.w3c.dom.stylesheets;resolution:=optional,org.w3c.dom.tr
 aversal;resolution:=optional,org.w3c.dom.views;resolution:=optional,o
 rg.xml.sax;resolution:=optional,org.xml.sax.ext;resolution:=optional,
 org.xml.sax.helpers;resolution:=optional
Originally-Created-By: 1.2.2 (Sun Microsystems Inc.)
Bundle-ManifestVersion: 2
Bundle-SymbolicName: xml-apis-1.0.b2
Tool: Bnd-0.0.254
Bnd-LastModified: 1207856724281
Export-Package: org.xml.sax,org.w3c.dom.views,org.w3c.dom.stylesheets;
 uses:="org.w3c.dom",org.w3c.dom.html;uses:="org.w3c.dom",org.w3c.dom,
 org.w3c.dom.events;uses:="org.w3c.dom.views,org.w3c.dom",javax.xml.tr
 ansform,javax.xml.transform.dom;uses:="org.w3c.dom,javax.xml.transfor
 m",license,org.w3c.dom.traversal;uses:="org.w3c.dom",javax.xml.transf
 orm.sax;uses:="org.xml.sax,org.xml.sax.ext,javax.xml.transform.stream
 ,javax.xml.transform",org.w3c.dom.css;uses:="org.w3c.dom.views,org.w3
 c.dom.stylesheets,org.w3c.dom",org.xml.sax.ext;uses:="org.xml.sax",or
 g.w3c.dom.ranges;uses:="org.w3c.dom",org.xml.sax.helpers;uses:="org.x
 ml.sax",javax.xml.parsers;uses:="org.xml.sax,org.xml.sax.helpers,org.
 w3c.dom",org.apache.xmlcommons,javax.xml.transform.stream;uses:="java
 x.xml.transform"
Bundle-Version: 0

And the definition in the consumer's jar:

Manifest-Version: 1.0
Built-By: Kork
Created-By: Apache Maven Bundle Plugin
Bundle-Activator: de.insomniahq.peroxide.core.Activator
Import-Package: de.insomniahq.peroxide.core,de.insomniahq.peroxide.cor
 e.api.beans,de.insomniahq.peroxide.core.api.services,de.insomniahq.pe
 roxide.core.gui,javax.swing,org.apache.xerces.impl.xs.opti,org.osgi.f
 ramework;version="1.3",org.slf4j;version="1.5",org.w3c.dom
Spring-Context: application-context.xml
Bnd-LastModified: 1208296674093
Export-Package: de.insomniahq.peroxide.core.api.services,de.insomniahq
 .peroxide.core;uses:="de.insomniahq.peroxide.core.gui,org.slf4j,org.o
 sgi.framework,javax.swing",de.insomniahq.peroxide.core.api.beans;uses
 :="javax.swing",de.insomniahq.peroxide.core.gui;uses:="org.apache.xer
 ces.impl.xs.opti,org.slf4j,org.w3c.dom,javax.swing"
Bundle-Version: 1.0.0.SNAPSHOT
Bundle-Name: peroxIDE Core Application
Build-Jdk: 1.5.0_14
Bundle-ManifestVersion: 2
Bundle-SymbolicName: de.insomniahq.peroxide.core
Tool: Bnd-0.0.238

To me it looks pretty good, one exports org.w3c.dom, the other one imports
it.

>>    3. Improper integration into OSGi (e.g., some libraries try to load
>>       classes from the context class loader, so this does not work in
>>       OSGi unless someone explicitly sets the context class loader
>>       before calling into the library bundle).
Hmm, how could i debug into this? Logging wont help me out and setting a
breakpoint on Class.forName is probably not useful either...

Thanks again for showing that much patience with me :)

Best regards,
Jan

-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError-for-org.w3c.dom.Node-tp16675534p16712749.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: NoClassDefFoundError for org.w3c.dom.Node

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Ultimately, it is still likely that you have one of the errors that I 
mention below. Without more detailed debugging, it is hard to know which.

-> richard

Jan Thomä wrote:
> Richard S. Hall wrote:
>   
>> Jan Thomä wrote:
>>     
>>> What
>>> I don't get is, when a bundle provides the classes needed
>>> (org.w3c.dom.Node
>>> in this case), why do i get this Error in the first place - i mean the
>>> bundle is there, the class is there, what is the problem? Do I have some
>>> severe misunderstanding of how the bundles work? 
>>>   
>>>       
>> Well, without the JAR it definitely wouldn't work, because your 
>> configuration above does not include "org.w3c.dom" in the system 
>> packages property, so even if this package were on the class path, it 
>> wouldn't be exported to bundles importing it.
>>
>> You do not necessarily have a misunderstanding. Usually these types of 
>> errors come down to three issues:
>>
>>    1. Misconfigured environment (e.g., not exporting it from the system
>>       bundle).
>>    2. Improperly packaged bundle (e.g., either not actually contained in
>>       the exporter or not being imported by the consumer).
>>    3. Improper integration into OSGi (e.g., some libraries try to load
>>       classes from the context class loader, so this does not work in
>>       OSGi unless someone explicitly sets the context class loader
>>       before calling into the library bundle).
>>
>> There are probably other reasons for errors that I am forgetting, but 
>> these are the big ones.
>>
>>     
>
> Okay, thanks for the clarification. However I still fail to find the reason
> for the exact error. I can suppress it by adding org.w3c.dom to the system
> packages, but i would really like to understand why i have to do this. Given
> i have library A and bundle this with the BND tool (which usually yields
> usable results), then deploy it, shouldn't the packages from that said
> Library be available then?  Why would I have to additionally add these
> packages to the System Bundle's package list? IMHO this defeats the whole
> idea of bundles. I would end up writing all the packages I use into the
> system bundle's package list, which is neither maintainable nor desirable
> from my point of view. 
>
> Or rephrasing the question: why do i need to put org.w3c.dom to the System
> Bundle's packages while e.g. some helper jar that i wrote, works without
> doing so? Shouldn't packaging and deploying the library be enough? Any
> insights would be greatly appreciated.
>
> Thanks and best regards,
> Jan
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: NoClassDefFoundError for org.w3c.dom.Node

Posted by Jan Thomä <ko...@insomnia-hq.de>.

Richard S. Hall wrote:
> 
> Jan Thomä wrote:
>> What
>> I don't get is, when a bundle provides the classes needed
>> (org.w3c.dom.Node
>> in this case), why do i get this Error in the first place - i mean the
>> bundle is there, the class is there, what is the problem? Do I have some
>> severe misunderstanding of how the bundles work? 
>>   
> 
> Well, without the JAR it definitely wouldn't work, because your 
> configuration above does not include "org.w3c.dom" in the system 
> packages property, so even if this package were on the class path, it 
> wouldn't be exported to bundles importing it.
> 
> You do not necessarily have a misunderstanding. Usually these types of 
> errors come down to three issues:
> 
>    1. Misconfigured environment (e.g., not exporting it from the system
>       bundle).
>    2. Improperly packaged bundle (e.g., either not actually contained in
>       the exporter or not being imported by the consumer).
>    3. Improper integration into OSGi (e.g., some libraries try to load
>       classes from the context class loader, so this does not work in
>       OSGi unless someone explicitly sets the context class loader
>       before calling into the library bundle).
> 
> There are probably other reasons for errors that I am forgetting, but 
> these are the big ones.
> 

Okay, thanks for the clarification. However I still fail to find the reason
for the exact error. I can suppress it by adding org.w3c.dom to the system
packages, but i would really like to understand why i have to do this. Given
i have library A and bundle this with the BND tool (which usually yields
usable results), then deploy it, shouldn't the packages from that said
Library be available then?  Why would I have to additionally add these
packages to the System Bundle's package list? IMHO this defeats the whole
idea of bundles. I would end up writing all the packages I use into the
system bundle's package list, which is neither maintainable nor desirable
from my point of view. 

Or rephrasing the question: why do i need to put org.w3c.dom to the System
Bundle's packages while e.g. some helper jar that i wrote, works without
doing so? Shouldn't packaging and deploying the library be enough? Any
insights would be greatly appreciated.

Thanks and best regards,
Jan
-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError-for-org.w3c.dom.Node-tp16675534p16696399.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: NoClassDefFoundError for org.w3c.dom.Node

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Jan Thomä wrote:
> Karl Pauls wrote:
>   
>> org.w3c.dom should be exported by the system bundle. In other words,
>> you should not need to bundle it yourself. Try without the xml-api
>> bundle. Furthermore, what are you doing exactly? Are you creating
>> something yourself or are you using some kind of tool?
>>
>>     
>
>
> Karl,
>
> thanks for the answer. I am developing a script editor for some specialized
> scripting language. I intend to use felix embedded in my application and
> using bundles to extend the editor with new functionality (aka plugins). I
> am using JDK 1.6 and Maven 2 for building. I bundled all maven dependencies
> of my project using BND and installed + activated those bundles. The start
> code is as such:
>
>  Map<String, String> configMap = new HashMap<String, String>();
>         configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES,
>                 "org.osgi.framework; version=1.3.0," +
>                         "org.osgi.service.packageadmin; version=1.2.0," +
>                         "org.osgi.service.startlevel; version=1.0.0," +
>                         "org.osgi.service.url; version=1.0.0," +
>                         "org.osgi.util.tracker; version=1.3.2,"+
>                         "org.apache.commons.logging," +
>                                 "org.apache.log4j,"+
>                         "javax.swing");
>
>         configMap.put(FelixConstants.LOG_LEVEL_PROP, "4");
>         configMap.put(FelixConstants.EMBEDDED_EXECUTION_PROP, "true");
>         configMap.put(BundleCache.CACHE_PROFILE_DIR_PROP,
> cachedir.getAbsolutePath());
>
>         try {
>             // Now create an instance of the framework.
>             felix = new Felix(configMap, list);
>             felix.start();
>         }
>         catch (Exception ex) {
>             log.error("Could not create framework: ", ex);
>             System.exit(-1);
>         }
>
> (more or less copied from the felix tutorials).
>
> I tried without the xml-apis.jar but it yielded the exact same problem. What
> I don't get is, when a bundle provides the classes needed (org.w3c.dom.Node
> in this case), why do i get this Error in the first place - i mean the
> bundle is there, the class is there, what is the problem? Do I have some
> severe misunderstanding of how the bundles work? 
>   

Well, without the JAR it definitely wouldn't work, because your 
configuration above does not include "org.w3c.dom" in the system 
packages property, so even if this package were on the class path, it 
wouldn't be exported to bundles importing it.

You do not necessarily have a misunderstanding. Usually these types of 
errors come down to three issues:

   1. Misconfigured environment (e.g., not exporting it from the system
      bundle).
   2. Improperly packaged bundle (e.g., either not actually contained in
      the exporter or not being imported by the consumer).
   3. Improper integration into OSGi (e.g., some libraries try to load
      classes from the context class loader, so this does not work in
      OSGi unless someone explicitly sets the context class loader
      before calling into the library bundle).

There are probably other reasons for errors that I am forgetting, but 
these are the big ones.

-> richard


> Best regards,
> Jan
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: NoClassDefFoundError for org.w3c.dom.Node

Posted by Jan Thomä <ko...@insomnia-hq.de>.

Karl Pauls wrote:
> 
> org.w3c.dom should be exported by the system bundle. In other words,
> you should not need to bundle it yourself. Try without the xml-api
> bundle. Furthermore, what are you doing exactly? Are you creating
> something yourself or are you using some kind of tool?
> 


Karl,

thanks for the answer. I am developing a script editor for some specialized
scripting language. I intend to use felix embedded in my application and
using bundles to extend the editor with new functionality (aka plugins). I
am using JDK 1.6 and Maven 2 for building. I bundled all maven dependencies
of my project using BND and installed + activated those bundles. The start
code is as such:

 Map<String, String> configMap = new HashMap<String, String>();
        configMap.put(Constants.FRAMEWORK_SYSTEMPACKAGES,
                "org.osgi.framework; version=1.3.0," +
                        "org.osgi.service.packageadmin; version=1.2.0," +
                        "org.osgi.service.startlevel; version=1.0.0," +
                        "org.osgi.service.url; version=1.0.0," +
                        "org.osgi.util.tracker; version=1.3.2,"+
                        "org.apache.commons.logging," +
                                "org.apache.log4j,"+
                        "javax.swing");

        configMap.put(FelixConstants.LOG_LEVEL_PROP, "4");
        configMap.put(FelixConstants.EMBEDDED_EXECUTION_PROP, "true");
        configMap.put(BundleCache.CACHE_PROFILE_DIR_PROP,
cachedir.getAbsolutePath());

        try {
            // Now create an instance of the framework.
            felix = new Felix(configMap, list);
            felix.start();
        }
        catch (Exception ex) {
            log.error("Could not create framework: ", ex);
            System.exit(-1);
        }

(more or less copied from the felix tutorials).

I tried without the xml-apis.jar but it yielded the exact same problem. What
I don't get is, when a bundle provides the classes needed (org.w3c.dom.Node
in this case), why do i get this Error in the first place - i mean the
bundle is there, the class is there, what is the problem? Do I have some
severe misunderstanding of how the bundles work? 

Best regards,
Jan
-- 
View this message in context: http://www.nabble.com/NoClassDefFoundError-for-org.w3c.dom.Node-tp16675534p16678798.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: NoClassDefFoundError for org.w3c.dom.Node

Posted by Karl Pauls <ka...@gmail.com>.
> > > Yes, but this is depend on version of JDK are you using...
> > >  Look config.properties, property "org.osgi.framework.system.packages".
> > >
> >
> > True. In case you are using java 1.3 then they are not exported.
> > Again, please give us a little more inside in what you are trying to
> > do.
> >
> >
>  Instead of relying on the xml stuff comming from the jdk, I personally
> would
>  suggest to use the xml-apis bundle from Felix commons. This gives you the
> control to use exactly that version of xml stuff, regardless of which jdk
> you're using and what your endorsed libs might contain or not contain.
> Especially for every jdk before 1.5 it's the better option.

Right, but this is not the issue. The question is why does he see a
NCDF. Oh wait ....

Please re-run on trunk if you haven't done so. I just recently fixed
something for the spring guys that might be related...

regards,

Karl

>  Carsten
>  --
>  Carsten Ziegeler
>  cziegeler@apache.org
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>  For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: NoClassDefFoundError for org.w3c.dom.Node

Posted by Carsten Ziegeler <cz...@apache.org>.
Karl Pauls schrieb:
>> Yes, but this is depend on version of JDK are you using...
>>  Look config.properties, property "org.osgi.framework.system.packages".
> 
> True. In case you are using java 1.3 then they are not exported.
> Again, please give us a little more inside in what you are trying to
> do.
> 
Instead of relying on the xml stuff comming from the jdk, I personally would
suggest to use the xml-apis bundle from Felix commons. This gives you 
the control to use exactly that version of xml stuff, regardless of 
which jdk you're using and what your endorsed libs might contain or not 
contain. Especially for every jdk before 1.5 it's the better option.

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: NoClassDefFoundError for org.w3c.dom.Node

Posted by Karl Pauls <ka...@gmail.com>.
> Yes, but this is depend on version of JDK are you using...
>  Look config.properties, property "org.osgi.framework.system.packages".

True. In case you are using java 1.3 then they are not exported.
Again, please give us a little more inside in what you are trying to
do.

regards,

Karl

>  2008/4/14, Karl Pauls <ka...@gmail.com>:
>
>
> >
>  > org.w3c.dom should be exported by the system bundle. In other words,
>  > you should not need to bundle it yourself. Try without the xml-api
>  > bundle. Furthermore, what are you doing exactly? Are you creating
>  > something yourself or are you using some kind of tool?
>  >
>  > regards,
>  >
>  > Karl
>  >
>  > On Mon, Apr 14, 2008 at 12:16 PM, Jan Thomä <ko...@insomnia-hq.de> wrote:
>  > >
>  > >  Hi,
>  > >
>  > >  i have a problem when using Spring with Apache Felix. Spring is
>  > deployed as
>  > >  a Bundle into felix and requires the org.w3c.dom package. I have also
>  > >  packaged the xml-apis.jar (containing said package) into a bundle using
>  > the
>  > >  bnd tool. Both bundles install and activate without a problem, however
>  > when
>  > >  Spring is trying to instanciate a context, i get a NoClassDefFoundError
>  > for
>  > >  org.w3c.dom.Node. I tried deploying without Spring and using
>  > >  org.w3c.dom.Node in my own Bundle, and yielded the exact same error.
>  > What
>  > >  did i do wrong here?
>  > >
>  > >  Best regards,
>  > >  Jan
>  > >  --
>  > >  View this message in context:
>  > http://www.nabble.com/NoClassDefFoundError-for-org.w3c.dom.Node-tp16675534p16675534.html
>  > >  Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>  > >
>  > >
>  > >  ---------------------------------------------------------------------
>  > >  To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>  > >  For additional commands, e-mail: users-help@felix.apache.org
>  > >
>  > >
>  >
>  >
>  >
>  >
>  > --
>  > Karl Pauls
>  > karlpauls@gmail.com
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>  > For additional commands, e-mail: users-help@felix.apache.org
>  >
>  >
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: NoClassDefFoundError for org.w3c.dom.Node

Posted by Алексей Курган <iz...@gmail.com>.
Yes, but this is depend on version of JDK are you using...
Look config.properties, property "org.osgi.framework.system.packages".


2008/4/14, Karl Pauls <ka...@gmail.com>:
>
> org.w3c.dom should be exported by the system bundle. In other words,
> you should not need to bundle it yourself. Try without the xml-api
> bundle. Furthermore, what are you doing exactly? Are you creating
> something yourself or are you using some kind of tool?
>
> regards,
>
> Karl
>
> On Mon, Apr 14, 2008 at 12:16 PM, Jan Thomä <ko...@insomnia-hq.de> wrote:
> >
> >  Hi,
> >
> >  i have a problem when using Spring with Apache Felix. Spring is
> deployed as
> >  a Bundle into felix and requires the org.w3c.dom package. I have also
> >  packaged the xml-apis.jar (containing said package) into a bundle using
> the
> >  bnd tool. Both bundles install and activate without a problem, however
> when
> >  Spring is trying to instanciate a context, i get a NoClassDefFoundError
> for
> >  org.w3c.dom.Node. I tried deploying without Spring and using
> >  org.w3c.dom.Node in my own Bundle, and yielded the exact same error.
> What
> >  did i do wrong here?
> >
> >  Best regards,
> >  Jan
> >  --
> >  View this message in context:
> http://www.nabble.com/NoClassDefFoundError-for-org.w3c.dom.Node-tp16675534p16675534.html
> >  Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> >
> >
> >  ---------------------------------------------------------------------
> >  To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >  For additional commands, e-mail: users-help@felix.apache.org
> >
> >
>
>
>
>
> --
> Karl Pauls
> karlpauls@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: NoClassDefFoundError for org.w3c.dom.Node

Posted by Karl Pauls <ka...@gmail.com>.
org.w3c.dom should be exported by the system bundle. In other words,
you should not need to bundle it yourself. Try without the xml-api
bundle. Furthermore, what are you doing exactly? Are you creating
something yourself or are you using some kind of tool?

regards,

Karl

On Mon, Apr 14, 2008 at 12:16 PM, Jan Thomä <ko...@insomnia-hq.de> wrote:
>
>  Hi,
>
>  i have a problem when using Spring with Apache Felix. Spring is deployed as
>  a Bundle into felix and requires the org.w3c.dom package. I have also
>  packaged the xml-apis.jar (containing said package) into a bundle using the
>  bnd tool. Both bundles install and activate without a problem, however when
>  Spring is trying to instanciate a context, i get a NoClassDefFoundError for
>  org.w3c.dom.Node. I tried deploying without Spring and using
>  org.w3c.dom.Node in my own Bundle, and yielded the exact same error. What
>  did i do wrong here?
>
>  Best regards,
>  Jan
>  --
>  View this message in context: http://www.nabble.com/NoClassDefFoundError-for-org.w3c.dom.Node-tp16675534p16675534.html
>  Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>  For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Karl Pauls
karlpauls@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org