Thanks Cliff for the hint on changing the log level. I was just too much
into finding the bug to think of reconsidering the log info! It turned out
that I was checking the dependencies on the wrong bundle. I did some
manipulations to the other bundle that was the source of the issue and the
issue is gone.

thanks again,
-Nima

On Tue, Feb 16, 2010 at 1:57 PM, Clifford H. James <cja...@proteuseng.com>wrote:

> Try turning the log level up a bit (-Dfelix.log.level=1) then re-starting
> the framework.  This should show the package wiring that is occurring.
>
> Do you have any bootDelegation settings on?
>
> ~Cliff
>
>
> Nima Kaviani wrote:
>
>> Hi guys,
>>
>> it seems like I am having the same problem when trying to use the SWING
>> library.
>>
>> I have got the following list of libraries exported using
>> system.packages.extra (I made the list shorter for brevity):
>>
>> *org.osgi.framework.system.packages.extra=\
>>  javax.sound.sampled.spi, \
>>  javax.sql, \
>>  javax.sql.rowset, \
>>  javax.sql.rowset.serial, \
>>  javax.sql.rowset.spi, \
>>  javax.swing, \
>>  javax.swing.border, \
>>  javax.swing.colorchooser, \
>>  javax.swing.event, \
>>  javax.swing.filechooser, \
>>  javax.swing.plaf, \
>>  javax.swing.plaf.basic, \
>>  javax.swing.plaf.metal, \
>>  javax.swing.plaf.multi, \
>>  javax.swing.plaf.synth, \
>>  javax.swing.table, \
>>  javax.swing.text, \
>>  javax.swing.text.html, \
>>  javax.swing.text.html.parser, \
>>  javax.swing.text.rtf, \
>>  javax.swing.tree, \
>>  javax.swing.undo, \
>>  .....
>>  org.xml.sax.helpers*
>>
>> and also have the parent bundle for the framework defined as Karl
>> suggested:
>> *org.osgi.framework.bundle.parent=framework*
>>
>> but when I try to run my program, which tries to use a JApplet, I get the
>> following error msg:
>>
>> Exception in thread "Thread-4" java.lang.NoClassDefFoundError:
>> javax/swing/undo/
>> UndoableEditSupport
>>        at java.lang.ClassLoader.defineClass1(Native Method)
>>        at java.lang.ClassLoader.defineClass(Unknown Source)
>>        at
>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(Mod
>> uleImpl.java:1787)
>>        at
>> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation
>> (ModuleImpl.java:682)
>>        at
>> org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
>>        at
>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(Mod
>> uleImpl.java:1650)
>>        at java.lang.ClassLoader.loadClass(Unknown Source)
>>        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>>        at java.lang.ClassLoader.defineClass1(Native Method)
>>        at java.lang.ClassLoader.defineClass(Unknown Source)
>>        at
>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(Mod
>> uleImpl.java:1787)
>>        at
>> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation
>> (ModuleImpl.java:682)
>>        at
>> org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
>>        at
>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(Mod
>> uleImpl.java:1650)
>>        at java.lang.ClassLoader.loadClass(Unknown Source)
>>        at
>> org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl
>> .java:598)
>>        at
>> org.apache.felix.framework.searchpolicy.R4Wire.getClass(R4Wire.java:1
>> 08)
>>        at
>> org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1
>> 364)
>>        at
>> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation
>> (ModuleImpl.java:677)
>>        at
>> org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
>>        at
>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(Mod
>> uleImpl.java:1650)
>>        at java.lang.ClassLoader.loadClass(Unknown Source)
>>        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>>        *at
>> ca.ubc.magic.osgi.dependency.analyzer.DependencyGraph.init(Dependency
>> Graph.java:55)
>>        at
>> ca.ubc.magic.osgi.dependency.analyzer.DependencyGraph.run(DependencyG
>> raph.java:45)*
>>        at java.lang.Thread.run(Unknown Source)
>> Caused by: java.lang.ClassNotFoundException:
>> javax.swing.undo.UndoableEditSuppor
>> t
>>        at
>> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation
>> (ModuleImpl.java:738)
>>        at
>> org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
>>        at
>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(Mod
>> uleImpl.java:1650)
>>        at java.lang.ClassLoader.loadClass(Unknown Source)
>>        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>>        ... 26 more
>>
>> And finally, this is the MANIFEST.MF file for the bundle that is using the
>> SWING library:
>>
>> *Manifest-Version: 1.0
>> Export-Package: ca.ubc.magic.osgi.dependency.analyzer;uses:="org.osgi.
>>  framework,org.jgraph.graph,org.jgrapht,org.jgrapht.ext,org.jgrapht.gr
>>  aph,org.jgraph,javax.swing,javax.swing.undo"
>> Built-By: nima
>> Tool: Bnd-0.0.357
>> Bundle-Name: Archetype - osgi.dependency.analyzer
>> Created-By: Apache Maven Bundle Plugin
>> Build-Jdk: 1.6.0_14
>> Bundle-Version: 0.0.1
>> Bnd-LastModified: 1266356538046
>> Bundle-ManifestVersion: 2
>> Bundle-Activator: ca.ubc.magic.osgi.dependency.analyzer.Activator
>> Import-Package: ca.ubc.magic.osgi.dependency.analyzer,javax.swing,java
>>  x.swing.undo,org.jgraph,org.jgraph.graph,org.jgrapht,org.jgrapht.ext,
>>  org.jgrapht.graph,org.osgi.framework;version="1.3"
>> Bundle-SymbolicName: org.example.osgi.dependency.analyzer*
>>
>>
>> any help is highly appreciated.
>>
>> -Nima
>>
>>
>>
>> On Tue, Feb 16, 2010 at 7:31 AM, Karl Pauls <karlpa...@gmail.com> wrote:
>>
>>
>>
>>> try to set the parent classloader to framework via the following
>>> property:
>>>
>>> org.osgi.framework.bundle.parent=framework
>>>
>>> regards,
>>>
>>> Karl
>>>
>>> On Tue, Feb 16, 2010 at 4:25 PM,  <achuthan_prak...@emc.com> wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>>
>>>>
>>>> I am exporting packages from non-OSGi jar (Oracle Coherence) via felix
>>>> system packages extra property  (snippet below)
>>>>
>>>> org.osgi.framework.system.packages.extra=\
>>>>
>>>> .
>>>>
>>>> .
>>>>
>>>> com.tangosol.util,\
>>>>
>>>> com.tangosol.net,\
>>>>
>>>> com.tangosol.net.cache,\
>>>>
>>>> com.tangosol.util.filter,\
>>>>
>>>> com.tangosol.util.processor,\
>>>>
>>>> com.tangosol.coherence.component.net,\
>>>>
>>>>
>>>>
>>>> The classes from these packages are used in an app context in which is
>>>> getting instantiated by Spring DM.
>>>>
>>>>
>>>>
>>>> Here is the snippet of the command line used to launch felix:
>>>>
>>>> /usr/java/jre1.6.0_17/bin/java -Xmx1024m -classpath
>>>> .:/usr/share/java/eventsubsys/coherence-core-3.5.jar ......some more
>>>> jars on Classpath
>>>>
>>>> -Dfelix.config.properties=file:/etc/sysconfig/felix_config.properties
>>>> -Dfelix.auto.deploy.dir=/usr/share/java/felix/basebundles
>>>> -Dfelix.cache.rootdir=/var/felix/emgr
>>>>
>>>>  -Dfelix.fileinstall.dir=/usr/share/java/emgr  -jar
>>>> /usr/share/java/felix/felix.jar
>>>>
>>>>
>>>>
>>>> Here is the stack trace I am getting :
>>>>
>>>>
>>>>
>>>> Caused by: java.lang.NoClassDefFoundError: com/tangosol/util/Filter
>>>>
>>>>       at java.lang.Class.getDeclaredConstructors0(Native Method)
>>>>
>>>>       at java.lang.Class.privateGetDeclaredConstructors(Unknown
>>>> Source)
>>>>
>>>>       at java.lang.Class.getConstructor0(Unknown Source)
>>>>
>>>>       at java.lang.Class.getDeclaredConstructor(Unknown Source)
>>>>
>>>>       at
>>>> org.springframework.beans.factory.support.SimpleInstantiationStrategy.in
>>>> stantiate(SimpleInstantiationStrategy.java:54)
>>>>
>>>>       at
>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
>>>> tory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
>>>>
>>>>       ... 85 more
>>>>
>>>> Caused by: java.lang.ClassNotFoundException: *** Package
>>>> 'com.tangosol.util' is imported by bundle 30 from bundle 0, but the
>>>> exported package from bundle 0 does not contain the requested class
>>>> 'com.tangosol.util.Filter'. Please verify that the class name is correct
>>>> in the importing bundle 30 and/or that the exported package is correctly
>>>> bundled in 0. ***
>>>>
>>>>       at
>>>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(Module
>>>> Impl.java:1664)
>>>>
>>>>       at java.lang.ClassLoader.loadClass(Unknown Source)
>>>>
>>>>       at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>>>>
>>>>       ... 91 more
>>>>
>>>> Caused by: java.lang.ClassNotFoundException: com.tangosol.util.Filter
>>>>
>>>>       at java.net.URLClassLoader$1.run(Unknown Source)
>>>>
>>>>       at java.security.AccessController.doPrivileged(Native Method)
>>>>
>>>>       at java.net.URLClassLoader.findClass(Unknown Source)
>>>>
>>>>       at java.lang.ClassLoader.loadClass(Unknown Source)
>>>>
>>>>       at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>>>>
>>>>       at java.lang.ClassLoader.loadClass(Unknown Source)
>>>>
>>>>       at
>>>> org.apache.felix.framework.ExtensionManager$ExtensionManagerModule.getCl
>>>> assByDelegation(ExtensionManager.java:658)
>>>>
>>>>       at
>>>> org.apache.felix.framework.searchpolicy.R4Wire.getClass(R4Wire.java:108)
>>>>
>>>>       at
>>>> org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1364
>>>> )
>>>>
>>>>       at
>>>> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(Mo
>>>> duleImpl.java:677)
>>>>
>>>>       at
>>>> org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60)
>>>>
>>>>       at
>>>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(Module
>>>> Impl.java:1650)
>>>>
>>>>       ... 93 more
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Prakash
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> Karl Pauls
>>> karlpa...@gmail.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
>>> For additional commands, e-mail: users-h...@felix.apache.org
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org
>
>


-- 
http://nima.magic.ubc.ca

Reply via email to