IBM Support

Rational Functional Tester: java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z

Technote (troubleshooting)


Problem(Abstract)

This technote explains how to resolve a java error, that can occur when using IBM Rational Functional Tester with java code that uses the isEmpty() method.

Symptom

When running an Rational Functional Tester test script in IBM Rational Test Manager the following error is encountered:


    Exception in thread "Thread-3" java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z

Resolving the problem

The “isEmpty()” method was added in Java 6; so one possible cause for encountering this error is that Test Manager is using an older version of the Java Virtual Machine (JVM) thus spawning the following error message:



Exception in thread "Thread-3" java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z
at com.rational.test.ft.rational_ft.getRFTWorkspaceData(rational_ft.java:204)
at com.rational.test.ft.rational_ft.startFT(rational_ft.java:278)
at com.rational.test.ft.rational_ft.main(rational_ft.java:187)
at com.rational.test.ft.application.InProcessRft$RftCommandLineThread.run(InProcessRft.java:198)

To ensure that Test Manager is referencing version 6 of the JVM you can set the RATL_JVM_LOCATION environment variable

From the Test Manager system, go to Control Panels -> System -> Advanced -> Environment Variables: create the Windows Environment Variable RATL_JVM_LOCATION (If its not already present) and set it to version 6 of JVM (This assumes version 6 of the JVM is installed on this system; if not it would need to be installed).
For example if you have Rational Functional Tester on this system you can use a path similar to this:

    C:\Program Files\IBM\SDP\jdk\jre\classic\jvm.dll

The above value points to the JVM included in Rational Functional Tester
After making this change, run the "set RATL_JVM_LOCATION" command in a cmd.exe window; it should show:
    RATL_JVM_LOCATION=C:\Program Files\IBM\SDP\jdk\jre\classic\jvm.dll

Note: run the java command java –version to check for the version of the JVM installed on the system

Cross Reference information
Segment Product Component Platform Version Edition
Software Development Rational TestManager Integrations: IBM Windows 7.0, 7.0.1, 7.0.2

Document information

More support for: Rational Functional Tester
Integrations: IBM - TestManager

Software version: 8.0, 8.0.0.1, 8.0.0.2, 8.0.0.3, 8.0.0.4, 8.1, 8.1.0.1, 8.1.0.2, 8.1.0.3, 8.1.1, 8.1.1.1, 8.1.1.2

Operating system(s): Windows

Reference #: 1445360

Modified date: 14 October 2010


Translate this page: