0
I am trying to use GSON in a Maven EJB project but gives the following error:
java.lang.NoClassDefFoundError: com/google/gson/Gson
When I test in class main without uploading the server to lib works normally.
Someone once had a similar problem?
0
I am trying to use GSON in a Maven EJB project but gives the following error:
java.lang.NoClassDefFoundError: com/google/gson/Gson
When I test in class main without uploading the server to lib works normally.
Someone once had a similar problem?
0
In the case of the JSP/ Servlet web application, just copy the Gson JAR into the / WEB-INF / lib folder. If it is a project using Maven add
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
</dependency>
pom-pom.
https://mvnrepository.com/artifact/com.google.code.gson/gson
depending on your ide, you need to do a clean and re-build project
Browser other questions tagged java maven wildfly gson
You are not signed in. Login or sign up in order to post.