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

NoClassDefFoundError for Vertx verticle with docker image #339

Open
yaniv51 opened this issue Mar 10, 2019 · 1 comment
Open

NoClassDefFoundError for Vertx verticle with docker image #339

yaniv51 opened this issue Mar 10, 2019 · 1 comment

Comments

@yaniv51
Copy link

yaniv51 commented Mar 10, 2019

Hi all,
We are using Vertx docker image for our vertx web application server (written in Java) from the example below:
https://github.com/vert-x3/vertx-examples/blob/master/docker-examples/vertx-docker-java/Dockerfile

After adding vertx Thymeleaf template engine, we found that on run time(on production), there is an exception: java.lang.NoClassDefFoundError: org/attoparser/IMarkupParser while trying to render HTML file with Thymeleaf, although the .CLASS files was found inside the fat JAR file.

After a small research, we found that our application is missing current jar CLASSPATH.
For fixing it, we just added the current JAR file to CLASSPATH environment variable:
ENV CLASSPATH "$VERTICLE_HOME/$VERTICLE_JAR"

@tsegismont
Copy link
Contributor

So you're building a jar with dependencies, correct? Then have you checked the vertx-docker-java-fatjar example?

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

No branches or pull requests

2 participants