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

Docker: ksql-test-runner is missing hamcrest dependency in 0.7.0 #4584

Closed
colinhicks opened this issue Feb 18, 2020 · 2 comments
Closed

Docker: ksql-test-runner is missing hamcrest dependency in 0.7.0 #4584

colinhicks opened this issue Feb 18, 2020 · 2 comments
Labels
bug P0 Denotes must-have for a given milestone
Milestone

Comments

@colinhicks
Copy link
Contributor

colinhicks commented Feb 18, 2020

Describe the bug
Using the confluentinc/ksqldb-cli:0.7.0 Docker image, ksql-test-runner throws java.lang.NoClassDefFoundError: org/hamcrest/Matcher

To Reproduce
(Note: this is a minimal reproduction. The test case here isn't actually valid; it's just enough to initialize the runner so that the issue can be surfaced, without requiring other services.)
In some scratch directory:

  1. echo "create stream astream (x integer) with (kafka_topic='atopic', value_format='json');" > statements.sql
  2. echo '{"outputs":[{"topic": "btopic", "value": 0}]}' > output.json
  3. echo '{"inputs":[{"topic": "atopic", "value": 0}]}' > input.json
  4. docker run -v $(pwd):/test confluentinc/ksqldb-cli:0.7.0 ksql-test-runner -s test/statements.sql -i test/input.json -o test/output.json

Expected behavior
The test runner should not hit the exception below.

Actual behaviour

<snip INFO logging ...>
Exception in thread "main" java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: org/hamcrest/Matcher
	at io.confluent.ksql.test.tools.TestCaseBuilder.createTest(TestCaseBuilder.java:76)
	at io.confluent.ksql.test.tools.TestCaseBuilder.lambda$buildTests$0(TestCaseBuilder.java:50)
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
	at java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:419)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
	at io.confluent.ksql.test.tools.TestCaseBuilder.buildTests(TestCaseBuilder.java:51)
	at io.confluent.ksql.test.tools.KsqlTestingTool.runWithTripleFiles(KsqlTestingTool.java:127)
	at io.confluent.ksql.test.tools.KsqlTestingTool.main(KsqlTestingTool.java:55)
Caused by: java.lang.NoClassDefFoundError: org/hamcrest/Matcher
	... 12 more
Caused by: java.lang.ClassNotFoundException: org.hamcrest.Matcher
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 12 more
@colinhicks colinhicks added the bug label Feb 18, 2020
colinhicks pushed a commit that referenced this issue Feb 19, 2020
Dependencies required by ksql-test-runner were not present in the artifacts copied to Docker images. This adds them to the ksql-docker pom. cf. #4584
@colinhicks
Copy link
Contributor Author

fixed in b023cd0

@colinhicks colinhicks added this to the 0.7.1 milestone Feb 19, 2020
@colinhicks
Copy link
Contributor Author

Re-opening to indicate the need to cherry-pick this onto the 0.7.1 branch.

@colinhicks colinhicks reopened this Feb 19, 2020
@colinhicks colinhicks added the P0 Denotes must-have for a given milestone label Feb 24, 2020
colinhicks pushed a commit that referenced this issue Feb 26, 2020
Dependencies required by ksql-test-runner were not present in the artifacts copied to Docker images. This adds them to the ksql-docker pom. cf. #4584
colinhicks pushed a commit that referenced this issue Feb 27, 2020
Dependencies required by ksql-test-runner were not present in the artifacts copied to Docker images. This adds them to the ksql-docker pom. cf. #4584
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P0 Denotes must-have for a given milestone
Projects
None yet
Development

No branches or pull requests

1 participant