Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Got an error message "Error: Could not find or load main class com.ibm.rqm.adapter.commandline.JUnitLauncher -test" when running test script by Junit Selenium

 I got an error message when running my script from RQM by JUnit Selenium type

"Error: Could not find or load main class com.ibm.rqm.adapter.commandline.JUnitLauncher -test

And Adapter.log file displayed error message like this:
"09:19:58,701 [main]  INFO com.ibm.rqm.adapter.commandline                    - "Created JUnit Selenium Adapter"
09:20:37,538 [Thread-1] ERROR com.ibm.rqm.adapter.commandline                    - Failed to read serialized JUnit report object: null  Execution result will not contain step results for individual JUnit tests."

Does anyone have experience with this error? Pls help?

1

0 votes



2 answers

Permanent link

 We have seen something similar before in the past (see Error executing junit through adapter (133539)).  However, we could not reproduce the symptom.  I would suggest to open a Case (https://www.ibm.com/mysupport) for IBM Support to investigate this symptom in your environment.

0 votes


Permanent link

 While executing, when JVM does not find a .class file with the specified name then a run time error occurs saying “Could not found or load main class”. The reason why this happens is mostly due to:

  • Wrong Class Name
  • Invalid Classpath
Main class could not be found when there is typo or wrong syntax in the fully qualified java class name or it does not exist in the provided classpath. You must ensure that you add the location of your .class file to your classpath. So, if its in the current folder, add . to your classpath. Note that the Windows classpath separator is a semi-colon( ;) .  If you want to execute the main() method in MainClass, you must use the full class name, including package name, in the java command.

0 votes

Comments

In the case above it is interesting that the class name should be "com.ibm.rqm.adapter.commandline.JUnitLauncher -test" note the -test at the end. I think this is outdated.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Sep 12 '18, 10:48 p.m.

Question was seen: 4,709 times

Last updated: Sep 16 '20, 7:46 a.m.

Confirmation Cancel Confirm