Fairouz,

Does your bundle import the "org.jdom" package?

Adding libraries to the global "classpath" is unnecessary in OSGi. Indeed one of the most important reasons for OSGi to exist is to make the classpath obsolete.

Kind regards,
Neil

Fairouz Fakhfakh wrote:

Hello,
I use OSGI with felix_gogo.
In my bundle, I need "*jdom-1.0.jar*"
I put this file under my project/lib. When I start my bundle, I have the
following error:
org.osgi.framework.BundleException: Activator start error in bundle [12].
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1951)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1822)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:927)
at org.apache.felix.gogo.command.Basic.start(Basic.java:758)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
82)
at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:3
95)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessi
onImpl.java:89)
at org.apache.felix.gogo.shell.Console.run(Console.java:62)
at org.apache.felix.gogo.shell.Shell.console(Shell.java:203)
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
82)
at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:3
95)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessi
onImpl.java:89)
at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: org/jdom/JDOMException
at socketbundle.Activator.start(Activator.java:44)
at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAct
ion.java:629)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1904)
... 32 more
java.lang.NoClassDefFoundError: *org/jdom/JDOMException*
g!
I try to add "*jdom-1.0.jar*" in my classpath,under jdk\jre\lib\ext, under
jre\lib\ext and also under "felix_gogo\bin".
I try also to add : *<pathelement location="${lib.dir}/jdom-1.0.jar"/> *in
build.xml
But, always I have the same problem!!!!
Is there other configuration to do, please?
Thank you for answering me.

Best regards,
--
Fairouz

Reply via email to