Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user.classpath, search_paths, test plan class path all ignored if JMeter run programmatically #5577

Open
asfimport opened this issue Sep 18, 2021 · 0 comments
Labels
Milestone

Comments

@asfimport
Copy link
Collaborator

ib (Bug 65580):
G'day,

(Environment is actually Mac OS 11.1 - selector is a bit out of date)

Unable to add libraries to JMeter class path when running JMeter programmatically (using StandardJMeterEngine).

Tried:

  • setting user.classpath property to the absolute path of the target JAR with JMeterUtils
  • setting search_paths property to the absolute path of the target JAR with JMeterUtils
  • setting user.class to the absolute path of the target JAR in the JMeter properties file
  • setting search_paths to the absolute path of the target JAR in the JMeter properties file
  • setting TestPlan.user_define_classpath element value to the absolute path of the target JAR in the test plan

All are ignored resulting in ClassNotFoundException.

If the target JAR is added to the class path of the program running JMeter programatically then the target class is loaded and there is no ClassNotFoundException (so nothing wrong with the JAR or the spelling of the target class being loaded). But I can't use this approach because that program downloads the target JAR and puts it into a directory. The program's classpath wildcard has already been evaluated by then so the target JAR can't be added to the program's class path after the program has started. I could, in principal, run the program twice but that introduces other difficulties.

Severity: major
OS:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant