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

Running a benchmark within its own jar files raises a ClassNotFoundException #309

Open
GoogleCodeExporter opened this issue May 19, 2015 · 2 comments
Labels
component: runner P4 type=defect Bug, not working as expected

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

1. Clone and build

git clone https://code.google.com/p/caliper/
cd caliper
cd caliper ; mvn clean install ; cd ..
cd examples ; mvn clean install ; cd ..

2. Run DemoBenchmark

java -cp 
caliper/target/caliper-1.0-SNAPSHOT-all.jar:examples/target/caliper-examples-1.0
-SNAPSHOT.jar com.google.caliper.runner.CaliperMain examples.DemoBenchmark

What is the expected output? What do you see instead?

* Expected result: Benchmark should run successfully
* Seen result:

This selection yields 384 experiments.
64 experiments were skipped.
ERROR: Trial failed to complete (its results will not be included in the run):
  The worker exited without producing data. It has likely crashed. Inspect /var/folders/57/mgf2fxns26j3j9p9lnytdgxc0000gn/T/1430670138032-0/trial-2.log to see any worker output.

In /var/folders/57/mgf2fxns26j3j9p9lnytdgxc0000gn/T/1430670138032-0/trial-2.log:

[stderr] Exception in thread "main" java.lang.ClassNotFoundException: 
examples/DemoBenchmark
[stderr]        at java.lang.Class.forName0(Native Method)
[stderr]        at java.lang.Class.forName(Class.java:259)
[stderr]        at com.google.caliper.worker.WorkerMain.main(WorkerMain.java:67)

What version of the product are you using? On what operating system?

Version from Master at 2015-05-02


Please provide any additional information below.

If I pack the jars caliper-1.0-SNAPSHOT-all.jar and 
caliper-examples-1.0-SNAPSHOT.jar into one single jar, and run again from 
commandline, than the whole test does work.

Maybe related to https://code.google.com/p/caliper/issues/detail?id=246 ?

Original issue reported on code.google.com by [email protected] on 3 May 2015 at 4:25

@GoogleCodeExporter GoogleCodeExporter added Priority-Medium type=defect Bug, not working as expected labels May 19, 2015
@phishman3579
Copy link

I am seeing the same problem. Any update or is there an older revision which works?

@phishman3579
Copy link

I have fixed this problem in my fork and have added a pull request.
#317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: runner P4 type=defect Bug, not working as expected
Projects
None yet
Development

No branches or pull requests

4 participants