I have created a restful webservice from mysql database and used it's default world schema. I used Glassfish Server 4.1.1.
Now, when I test the restful webservice with another test web project a 500 (Internal Server Error) occurs.
GET RequestFailed RequestFailed --> Status: (500)
Response:{
HTTP Status 500 - Internal Server Error
type: Exception report
message: Internal Server Error
description: The server encountered an internal error that prevented it from fulfilling this request.
exception: javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException
root cause:
org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException
java.lang.NoClassDefFoundError: javax/xml/parsers/ParserConfigurationException
java.lang.ClassNotFoundException: javax.xml.parsers.ParserConfigurationException not found by org.eclipse.persistence.moxy [227]
Notes:
1) My entity classes are working fine. When run the url http://localhost:8080/RestfulAPI/webresources/com.rakin.city then i could see all the data in a xml file.
2) I tried some solutions and add jersy libraries in the webservice but it didn't solve my problem either. After adding jersy libraries it couldn't access WADL
I restarted the glassfish server and the resp application but the same problem occurs again and again.
3)My project file and libraries: