karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bonomat <philipp.hoeni...@gmail.com>
Subject NoClassDefFoundError CommandProcessor/ not found by pax-exam-probe
Date Wed, 20 Jul 2011 08:27:49 GMT
Hello

I would like to extend the karaf console commands.
But I have some problems writing integration tests:
I have the same setup like the the CoreTest in the package
org.apache.karaf.shell.itests, [1]
but when I try to get the CommandProcessor via :         
CommandProcessor cp = getOsgiService(CommandProcessor.class);
i get the following error: 
java.lang.NoClassDefFoundError:
org/apache/felix/service/command/CommandProcessor.

I have compared the loaded bundles of my karaf instance with an "clean"
karaf and as far as I can see are all necessary bundles present. The whole
stacktrace is at the end of this post.

It must be some kind of ClassLoader Issue and I don't know if I should ask
here or at Ops4J, so I made a double post also at the ops4j mailing-list.

java.lang.NoClassDefFoundError:
org/apache/felix/service/command/CommandProcessor
	at my.packe.MyTestClass.myTest(MyTestClass.java:34)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.injectContextAndInvoke(CallableTestMethodImpl.java:143)
	at
org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.call(CallableTestMethodImpl.java:105)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.ops4j.pax.exam.rbc.internal.RemoteBundleContextImpl.remoteCall(RemoteBundleContextImpl.java:80)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException:
org.apache.felix.service.command.CommandProcessor not found by
pax-exam-probe [153]
	at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
	at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
	at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	... 26 more


thanks for your help
kind regards
philipp


[1]https://svn.apache.org/repos/asf/karaf/trunk/itests/tests/src/test/java/org/apache/karaf/shell/itests/CoreTest.java


--
View this message in context: http://karaf.922171.n3.nabble.com/NoClassDefFoundError-CommandProcessor-not-found-by-pax-exam-probe-tp3184861p3184861.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Mime
View raw message