[ https://issues.apache.org/jira/browse/FELIX-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gert Vanthienen resolved FELIX-1728. ------------------------------------ Resolution: Fixed http://svn.apache.org/viewvc?view=rev&revision=823510 adds the necessary jars to the classpath when running the tests on an IBM JDK > Karaf itest fail on IBM JDK due to Pax Exam annotations not found > ----------------------------------------------------------------- > > Key: FELIX-1728 > URL: https://issues.apache.org/jira/browse/FELIX-1728 > Project: Felix > Issue Type: Bug > Components: Karaf > Affects Versions: karaf-1.0.0 > Reporter: Gert Vanthienen > Assignee: Gert Vanthienen > Fix For: karaf-1.0.2 > > > Due to a difference in the way the IBM JDK handles annotations (it fails on > annotations not on the classpath instead of ignoring them), the following > tests fail: > org.apache.felix.karaf.shell.itests.FeaturesTest.testFeatures [equinox] > org.apache.felix.karaf.shell.itests.CoreTest.testHelp [equinox] > org.apache.felix.karaf.shell.itests.CoreTest.testInstallCommand [equinox] > Cfr. http://lists.ops4j.org/pipermail/general/2009q4/003296.html for > background information > the error looks like this: > java.lang.TypeNotPresentException: Type > org.ops4j.pax.exam.junit.Configuration not present > at > com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:38) > at > com.ibm.oti.reflect.AnnotationHelper.getDeclaredAnnotations(AnnotationHelper.java:50) > at com.ibm.oti.reflect.Method.getDeclaredAnnotations(Method.java:31) > at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:722) > at > java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java:191) > at com.ibm.oti.reflect.Method.getAnnotation(Method.java:20) > at java.lang.reflect.Method.getAnnotation(Method.java:711) > at > org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.getAnnotatedMethods(CallableTestMethodImpl.java:295) > at > org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.runBefores(CallableTestMethodImpl.java:162) > at > org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.injectContextAndInvoke(CallableTestMethodImpl.java:124) > at > org.ops4j.pax.exam.junit.extender.impl.internal.CallableTestMethodImpl.call(CallableTestMethodImpl.java:101) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:618) > 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:79) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:618) > at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:309) > at sun.rmi.transport.Transport$1.run(Transport.java:168) > at java.security.AccessController.doPrivileged(AccessController.java:279) > at sun.rmi.transport.Transport.serviceCall(Transport.java:164) > at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:506) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.handleRequest(TCPTransport.java:838) > at > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:912) > at java.lang.Thread.run(Thread.java:810) > Caused by: java.lang.ClassNotFoundException: > org.ops4j.pax.exam.junit.Configuration > at java.lang.Class.forName(Class.java:163) > at > com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:33) > ... 27 more > The test launches okay, but the pax Configuration annotation class cannot be > found. Adding the jar that contains the class, pax-exam-junit as a bundle in > the test when we detect that we are using the ibm jdk allows the test to pass. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.