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

Bazel coverage failing: java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor #2577

Closed
prestonvanloon opened this issue Feb 23, 2017 · 6 comments
Assignees
Labels
P2 We'll consider working on this in future. (Assignee optional) type: bug

Comments

@prestonvanloon
Copy link

Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.

Description of the problem / feature request / question:

Exception in thread "Thread-0" java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
	at com.google.testing.coverage.JacocoCoverageRunner.analyzeBranch(JacocoCoverageRunner.java:138)
	at com.google.testing.coverage.JacocoCoverageRunner.create(JacocoCoverageRunner.java:84)
	at com.google.testing.coverage.JacocoCoverageRunner$2.run(JacocoCoverageRunner.java:258)
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 3 more

If possible, provide a minimal example to reproduce the problem:

Run bazel coverage on a passing java test.

Environment info

  • Operating System:
    Ubuntu 14.04

  • Bazel version (output of bazel info release):

Build label: 0.4.4
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Wed Feb 1 18:54:21 2017 (1485975261)
Build timestamp: 1485975261
Build timestamp as int: 1485975261

release 0.4.4

  • If bazel info release returns "development version" or "(@non-git)", please tell us what source tree you compiled Bazel from; git commit hash is appreciated (git rev-parse HEAD):

Have you found anything relevant by searching the web? (e.g. GitHub issues, email threads in the bazel-discuss@googlegroups.com archive)

Anything else, information or logs or outputs that would be helpful?

(If they are large, please upload as attachment or provide link).

@prestonvanloon prestonvanloon changed the title Bazel coverage failing: java.lang.NoClassDefFoundError: or/objectweb/asm/ClassVisitor Bazel coverage failing: java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor Feb 23, 2017
@iirina
Copy link
Contributor

iirina commented Feb 23, 2017

Can you copy/paste the command you run and describe your project?

@prestonvanloon
Copy link
Author

I ran bazel coverage --test_output=streamed path/to:testTarget

I'm not sure how to describe the project.
It has several maven jar dependencies. It uses rules_protobuf to implement a gRPC server.

The test is mocking a few things and testing certain http calls would have happened.

@iirina
Copy link
Contributor

iirina commented Feb 23, 2017

@hermione521 can you take a look at the error?

@hermione521
Copy link
Contributor

srcjar is not supported in coverage now. But it's on my list! Sorry for the inconvenience.

@hermione521 hermione521 added the P2 We'll consider working on this in future. (Assignee optional) label Feb 24, 2017
@hermione521 hermione521 self-assigned this Feb 24, 2017
@prestonvanloon
Copy link
Author

So this is related to #2528 ?

@hermione521
Copy link
Contributor

@prestonvanloon yes, it is.

@iirina iirina closed this as completed Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) type: bug
Projects
None yet
Development

No branches or pull requests

3 participants