ClassDefNotFound error on executing a RFT script from RQM
HI
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!
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
When importing test script to RQM, there is a field called script arguments.
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.
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.
It may be same problem as run RFT scripts from RTM.
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.
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
Thanks to both of you.
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
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