IBM Support

Errors in custom code after importing a project

Troubleshooting


Problem

After you import a project into IBM® Rational® Performance Tester (RPT), you might see compilation error messages related to custom code, or the schedules and tests in the project might not play back correctly. The compilation error messages vary, but are of the form "The part com.ibm.rational.test.lt.execution.socket.holder cannot be resolved." When you attempt to play back tests or schedules, RPT detects errors in the test project.

Symptom

You are unable to play back a schedule or test because there are errors in your custom code. You cannot write custom code because the Java™ object compilation feature does not work. Your custom code is marked with red error icons.

Cause

This behavior can occur when you import a project created on a different operating system or on a computer where RPT was installed in a different directory. This behavior can also occur when you import a project from a different version of RPT.

Diagnosing The Problem

The Java class path contains .jar files that do not exist on the workbench computer.

Resolving The Problem

Update: This issue has been corrected in RPT versions 8.1.1 and later.
To work around this issue, do the following:

  1. In the Test Navigator, right-click the test project and then select Properties.
  2. Click Java Build Path > Libraries.
  3. Remove all the .jar files and class folders in the list except for the last entry, JRE System Library [jdk]. To remove the .jar files and class folders, select them and then click Remove.
  4. Click OK.
  5. Click Window > Show View > Other > General > Navigator to open the Navigator view.
  6. In the Navigator view, find the project and expand the src\test folder. This folder contains entries for automatically-generated Java files and custom code. The automatically-generated Java file names contain long strings of hexadecimal digits. For example:

    Testdemo_Test_DFF5A70BD6E0349A57A96A8042D911DD.java
    PortalTesting_Test_A4F5A31B56E0149A88896B80E1D9159D.java
    Testdemo_Schedule_DFF5A700D6E0E49A57A96A8041D935D9.java
    Portal_Schedule_Schedule_A4F5A21B55E01495858CCB80E1D2159D.java
    MyCustomCode.java


    This example shows automatically-generated Java files for tests named Testdemo and PortalTesting, schedules named Testdemo and Portal_Schedule, and custom code named MyCustomCode.
  7. Delete all of the automatically-generated Java files. Important: do not delete the custom code files.
  8. Run a test or a schedule. This regenerates the class path correctly.

[{"Product":{"code":"SSMMM5","label":"IBM Rational Performance Tester"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Test Execution","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF016","label":"Linux"}],"Version":"6.1;6.1.0.1;6.1.1;6.1.2;7.0;7.0.0.1;7.0.0.2;7.0.1;7.0.1.1;7.0.1.2;7.0.2;7.0.2.1;7.0.2.2;7.0.2.3;8.0;8.0.0.1;8.0.0.2;8.0.0.3;8.1;8.1.0.1;8.1.0.2;8.1.0.3","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
07 May 2019

UID

swg21326347