ClassDefNotFound error on executing a RFT script from RQM
I have a RFT script which is dependent on a jar file. When I execute thsi script from RFT, it works well. When I execute the same script using RQM adapter from RQM, it gives me the error that ClassDefNotFound.
I am executing the scripts on the same machine where the RFT script is located.
Can anyone help me to sought this out ? I have tried adding the jar path in the Classpath system variable of the machine, but still the same problem.
Thanks in adavance!
4 answers
There specify the full path to the jar, where your build engine built it, using -projectpath, for example:
-projectpath z:\latestbuild\CalculatorGUI\lib\Calculator.jar
I dont know if that's the best practice solution, but it works.
Try to copy your jars to "C:\Documents and Settings\All Users\Application Data\IBM\RFT\customization" (for Windows XP. Your path could be other).
After that link your RFT project to that location and rebuild.
Maybe it could help.
Comments
In windows XP, I could find the customization folder only at this path -C:\Program Files\IBM\SDP\FunctionalTester\bin\customization.
Do you suggest me to copy the jar file to this directory ? It contains .rftcus & .rftop files right now.
Just wanted to confirm if that's the correct folder that I am looking at to copy the jar ?
Looking forward for your response.
Thanks !
In windows XP, I could find the customization folder only at this path -C:\Program Files\IBM\SDP\FunctionalTester\bin\customization.
Do you suggest me to copy the jar file to this directory ? It contains .rftcus & .rftop files right now.
Just wanted to confirm if that's the correct folder that I am looking at to copy the jar ?
No.
In my situation i copy jars to folder with "com.ibm.terminal.tester.ft.jar" (in documents and settings folder). That file links to the RFT project "by default" and locates in "document and settings" folder.
If the Gabri's method works - its the best practice.
I tried with Gabri's suggested way and the ClassDefNotFound error is no more there.
But now there is another problem:
RQM says that the execution is successful & the test is passed, but when I checked it did not do the intended task of sending a mail with a file attachment. The log file is also blank.
Can you suggest me how to debug this ? How do I know where does it get stuck ?
Where can I see the debug statements that I have added to the script ?
Looking forward for your response.
Thanks
You can avoid the problem by placing a copy of external jars in the RFT customization folder.
The RFT customization folder location can be checked in the below registry:
\HKEY_LOCAL_MACHINE\SOFTWARE\Rational Software\Rational Test\8\Rational FT Customization Directory
Assuming the operating system is Windows XP, the default location is:
C:\Documents and Settings\All Users\Application Data\IBM\RFT\customization