views:

20

answers:

1

I was trying to create a Junit Testing framework within an existing RFT framework. The JUnit set up works fine to the point where we don't have to instantiate any framework classes.Whenever we are trying to access framework classes it throws the below exception. I did look for similar issues online but couldn't get a solution.Please suggest a solution if any body has faced a similar issue. RFT version is 8.1,JUnit version is 4

java.lang.NoClassDefFoundError: com.ibm.rational.test.lt.arm.IArmable
 at java.lang.ClassLoader.defineClass(ClassLoader.java:265)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:521)
 at java.net.URLClassLoader.access$300(URLClassLoader.java:66)
 at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:985)
A: 

This looks like a classpath error. If you are invoking JUnit from ANT, Maven, or some similar build tool then make sure you have the appropriate JAR files in the classpath. Remember, some JARS in turn have their own dependencies. Unless all those dependencies are in the classpath you will get the java.lang.NoClassDefFoundError.

If you are trying to run from the GUI client, it might be a little more difficult. Essentially, you will have to add all the dependencies to the jvm's -classpath option.

Berin Loritsch