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

java.lang.NoClassDefFoundError: eu/chargetime/ocpp/wss/WssSocketBuilder #137

Open
pepperonas opened this issue Mar 2, 2021 · 3 comments

Comments

@pepperonas
Copy link

pepperonas commented Mar 2, 2021

Hello Thomas,
I build your code to these two jars:
common-0.5-SNAPSHOT.jar and v1_6-0.5-SNAPSHOT.jar

Then I took the jars and added in my project. The classes is found by IntelliJ perfectly fine.

But when I run the project I get a ClassDefFoundError

Exception in thread "main" java.lang.NoClassDefFoundError: eu/chargetime/ocpp/wss/WssSocketBuilder
at OcppDriver.connect(OcppDriver.java:121)

which is the following line of code of your JSONClientSample:

client = new JSONClient(core);

Do you have any suggestion what I am doing wrong?

EDIT:
After I added the OCPP-J-0.5-SNAPSHOT.jar the code seems to run.

@ioc-tanay
Copy link

Hi @pepperonas! I am running into a similar issue and wanted to know how did you build the project to get those 3 JAR files (and where would they be located after building)? Thank you.

@TVolden
Copy link
Member

TVolden commented Mar 25, 2021

Hi,

Sorry for my unresponsiveness. It looks like you found the class, which is located in the OCPP-J module. I split them up some time ago.

If you build the project from the root folder using mavens mvn install, then the jars should be placed in your maven cache.
If you use maven to build the project, then having the jars in the maven cache should work, but if you want to find the files you can find the cache here: https://www.baeldung.com/maven-local-repository

@TVolden
Copy link
Member

TVolden commented Jun 30, 2021

Hi @pepperonas,

Did I solve your problem? If so, can I get you to close the issue?

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

No branches or pull requests

3 participants