IBM Support

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

Troubleshooting


Problem

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

[{"Product":{"code":"SSJMXE","label":"IBM Rational Functional Tester"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Integrations: IBM - TestManager","Platform":[{"code":"PF033","label":"Windows"}],"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","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSSHVH","label":"Rational TestManager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Integrations: IBM","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.0;7.0.1;7.0.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 June 2018

UID

swg21445360