Topic
3 replies Latest Post - ‏2011-06-20T17:07:46Z by SystemAdmin
vs_ddraper
vs_ddraper
24 Posts
ACCEPTED ANSWER

Pinned topic Runtime No Class Found - com.rational.test.ft.script.RationalTestScript

‏2011-06-17T22:19:01Z |
We have been executing our tests using windows command (batch) files under RFT 7. I updated several of our machines to RFT 8.1.1.3 and adjusted the command file as required for the new path to the RFT install directory etc.

I am now getting a runtime error as listed below. When I run the command script RFT starts up and the window indicating the script has started executon pops up and them immediately closes. I have a feeling this is classpath error or related.

S:\Engineering\Engineering\QA\AutomatedTesting\FuncTest\cmdScripts>ASLAPIAcceptance.cmd
Script Playback Failure: CRFCN0380E: Construct script class failed http://com.geotrust.qa.gui.scripts.acceptance.ASLAPIAcceptanceScript java.lang.NoClassDefFoundError: com/rational/test/ft/script/RationalTestScript

S:\Engineering\Engineering\QA\AutomatedTesting\FuncTest\cmdScripts>

Any thoughts on what is wrong would be appreciated. I have been looking at this for half the day and can't figure it out. The scripts used to execute are as follows:

setupRFT.cmd

@echo off
rem *****
rem ***** Author: dave
rem ***** Date: Jan 29, 2010
rem *****
if .%debug% equ .true echo on
rem *****
rem ***** set java location
rem *****
if "%JAVA_HOME%" equ "" set JAVA_HOME=C:\Program Files (x86)\Java\jre6
set JAVA=%JAVA_HOME%\bin\java
rem *****
rem ***** set RFT/View locations
rem *****
if "%IBM_RATIONAL_RFT_ECLIPSE_DIR%" equ "" set IBM_RATIONAL_RFT_ECLIPSE=C:\Program Files (x86)\IBM\SDP
rem ***** set RFT project pathdebug=true
rem *****
set RFT_PROJECT_PATH=S:\Engineering\Engineering\QA\AutomatedTesting\FuncTest
rem *****
rem ***** set classpath
rem *****
set CLASSPATH=%RFT_PROJECT_PATH%\.class\gui.jar;S:\Engineering\Engineering\lib\*;
set CLASSPATH=%IBM_RATIONAL_RFT_ECLIPSE_DIR%\FunctionalTester\bin\rational_ft.jar;%CLASSPATH%
rem *****
rem ***** set target environment
rem *****
if "%env%" equ "" set env=stage1
rem *****
rem ***** set release and build information
rem *****
if "%RELEASE%" equ "" set RELEASE=chowda-2011-3
if "%BUILD%" equ "" set BUILD=B9
rem *****
rem ***** set log location and type
rem *****
rem log format can be text, HTML, TestManager
set LOGFORMAT=html
rem set showlog=true to bring up load after script execution else set to false
set SHOWLOG=false
set LOGFOLDER=%RFT_PROJECT_PATH%\..\FuncTest_Logs
rem *****
rem ***** set java memeory values
rem *****
set XMS=256m
set XMX=512m

ASLAPIAcceptance.cmd

@echo off
rem *****
rem ***** Author: dave
rem ***** Date: Jan 29, 2010
rem *****
if .%debug% equ .true echo on
rem *****
rem ***** setup the RFT environment
rem *****
call setupRFT.cmd
rem *****
rem ***** set script location, name and arguments
rem *****
set SCRIPT_LOCATION=com.geotrust.qa.gui.scripts.acceptance
set SCRIPT_NAME=ASLAPIAcceptanceScript
rem *****
rem ***** set logfile and scripts arguments then run tests
rem *****
set hh=%time:~0,2%
if "%time:~0,1%" == " " set hh=0%hh:~1,1%
set DATE_STAMP=%date:~4,2%-%date:~7,2%-%date:~10,4%_%hh%.%time:~3,2%.%time:~6,2%
set LOGFILE=%SCRIPT_LOCATION%.%SCRIPT_NAME%_%RELEASE%_%BUILD%_%env%_%DATE_STAMP%
set SCRIPT_ARGUMENTS=
rem *****
rem ***** do it
rem *****
"%JAVA%" -Xms%XMS% -Xmx%XMX% -Denv=%env% com.rational.test.ft.rational_ft -projectpath %RFT_PROJECT_PATH% -datastore %RFT_PROJECT_PATH% -rt.bring_up_logviewer %SHOWLOG% -rt.log_format %LOGFORMAT% -logfolder %LOGFOLDER% -log %LOGFILE% -playback %SCRIPT_LOCATION%.%SCRIPT_NAME% %SCRIPT_ARGUMENTS%
goto :eof
Updated on 2011-06-20T17:07:46Z at 2011-06-20T17:07:46Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    16727 Posts
    ACCEPTED ANSWER

    Re: Runtime No Class Found - com.rational.test.ft.script.RationalTestScript

    ‏2011-06-17T22:45:01Z  in response to vs_ddraper
    Are you sure you have the classpath right?
    make sure rationatl_ft.jar is at the end.

    java -classpath "your classpath stuff";C:\Program Files\IBM\SDP\FunctionalTester\bin\rational_ft.jar" com.rational.test.ft.rational_ft
    • vs_ddraper
      vs_ddraper
      24 Posts
      ACCEPTED ANSWER

      Re: Runtime No Class Found - com.rational.test.ft.script.RationalTestScript

      ‏2011-06-20T15:05:12Z  in response to SystemAdmin
      rational_ft.jar is definitely in the CLASSPATH and beinglocated otherwise you would get this error: Exception in thread "main" java.lang.NoClassDefFoundError: com/rational/test/ft/rational_ft Caused by: java.lang.ClassNotFoundException: com.rational.test.ft.rational_ft

      I am sure it is a CLASSPATH issue however I can't seem to figure out the problem. I keep wondering if it has something to do with this being a 64 bit machine and the RFT install directory is: C:\Program Files (x86)\IBM\SDP and the presence of open and close parens is messing something up.

      I setup a 32 bit machine with the same configuration and I am going to see what happens on that machine.
  • SystemAdmin
    SystemAdmin
    16727 Posts
    ACCEPTED ANSWER

    Re: Runtime No Class Found - com.rational.test.ft.script.RationalTestScript

    ‏2011-06-20T17:07:46Z  in response to vs_ddraper
    You mentioned that several of your machines are updated to from RFT 7 to RFT 8.1.1.3. Are all of your machines on RFT 8? Are you aware that RFT 7 scripts are not compatiple with RFT 8? They need to be converted.