I am developing a webapp using Amazon cloud services and I need to use JSON objects. As my project is set up, I have an HTML form in which the user will fill in their information and submit. After sending, the data will be placed in the online database, and an confirmation email will be sent to them. Before I can send data to the database, I need to put all this in a JSON object. My servlet made in Java looks like this:
public class FormHandling extends HttpServlet {
When I submit the form using this code, I get the following error message:
java.lang.NoClassDefFoundError: com / quickxml / jackson / annotation / JsonAutoDetect com.fasterxml.jackson.databind.introspect.VisibilityChecker $ Std. (VisibilityChecker.java:169) com.fasterxml.jackson.databind.ObjectMapper. (ObjectMapper.java:197) edu.tcnj.FormHandling.createJson (FormHandling.java:115) edu.tcnj.FormHandling.doGet (FormHandling.java:104) edu.tcnj.FormHandling.doPost (FormHandling.java .servlet.http.HttpServlet.service (HttpServlet.java:641) javax.servlet.http.HttpServlet.service (HttpServlet.java:722)
Now I know that the error means that it does not find the Jackson databind data library. I am developing in Eclipse and from time to time I know that the build path gets confused, so I also put the libraries in the WebContent \ WEB-INF \ lib folder. This solved the problems that I had before. However, this time this does not seem to solve my problem. I even opened jar files to physically verify that the library and class are needed, and they are. I tried looking everything differently and studied different ways to enable the library, but nothing works.
java json noclassdeffounderror eclipse web-applications
jhahn Apr 10 '12 at 18:24 2012-04-10 18:24
source share