If you specify "-jar" then "-classpath" is ignored. You have to add
felix.jar to "-classpath" and then specify its main class.
-> richard
On 2/16/10 11: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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org