HTTP Status 500 – Provider org.glassfish.json.JsonProviderImpl not found

I am using netbeans-8, jdk 7,tomcat 8.05. I created a webapp in netbeans and added javax.json api to my project, the code shows no errors, but when i run my servlet the below error occurs.

HTTP Status 500 - Provider org.glassfish.json.JsonProviderImpl not found

type Exception report

message Provider org.glassfish.json.JsonProviderImpl not found

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.json.JsonException: Provider org.glassfish.json.JsonProviderImpl not found
    javax.json.spi.JsonProvider.provider(JsonProvider.java:97)
    javax.json.Json.createObjectBuilder(Json.java:266)
    NewServlet.doGet(NewServlet.java:24)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
root cause

java.lang.ClassNotFoundException: org.glassfish.json.JsonProviderImpl
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1132)
    java.lang.Class.forName0(Native Method)
    java.lang.Class.forName(Class.java:190)
    javax.json.spi.JsonProvider.provider(JsonProvider.java:94)
    javax.json.Json.createObjectBuilder(Json.java:266)
    NewServlet.doGet(NewServlet.java:24)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.3 logs.

Apache Tomcat/8.0.3

HTTP Status 500 – null

I wrote a java servlet program but when i run it, It was showing the Error HTTP Status 500 – null What it means ; My source code is on this page. The error was HTTP Status 500 – null type Exception r

HTTP Status 500 – javax.el.PropertyNotFoundException: Property not found on type

I am doing this tutorial, and I am getting the following error message in the spring hibernate MySQL project: HTTP Status 500 – javax.el.PropertyNotFoundException: Property ‘id’ not found on type net

Unexpected HTTP status 500 response

I have a simple python method that should be returned by Django/pyAMF but it’s returning HTTP Status 500 instead (although I do pass through the method with no error and the Grupo object is created):



HTTP status 500 when using file upload with freemarker

I’m trying to add an image upload in my freemarker page(ftl file) using spring and hibernate technology – this is the error I had every time I run the application : HTTP Status 500 – The server encou

HTTP Status 500 – Error instantiating servlet class pkg.coreServlet

I am creating simple servlet and deploying it in tomcat server but I am getting error HTTP Status 500 – Error instantiating servlet class pkg.coreServlet File Structure is tomat server : webap

HTTP Status 500 still exists even if line commented

I got following error when running my web apps related to spring:message and locale: HTTP Status 500 – An exception occurred processing JSP page /WEB-INF/jsp/login.jsp at line 56 ———————

SpringMVC using @ExceptionHandler HTTP Status 500 – Expected session attribute

I would like to use @exceptionhandler to capture an HTTP Status 500 – Expected session attribute. I would like to return a message to the same page i am on showing the user the error. Can someone poin

HTTP Status 500 wrapper can not find servlet class

I have created simple dynamic web project on eclipse. I am trying to submit the html form and passing the request to servlet. When I click on submit i get this exception: HTTP Status 500 wrapper can n

Failed asserting the HTTP status code is 200 not 500

I’m trying to functional test the HTTP status code for a certain request is 200 not 500. I’m using symfony2, and here’s the code: public function testIndex() { $client = static::createClient(); $crawl

Dropbox API returning http 500 status instead of http 400 status for a non-existant user in a team

Starting at around 21:00 PM GMT today , when we query for a user which doesn’t exist in dropbox team, we are receiving an http 500 status with internal error message. In comparison earlier we use to r

Answers

The javax.json api (provided in the JSON Processing API jar) is good only for compiling the application.

If you want to run the application, you have to download the JSON Processing RI jar, as explained here: https://jsonp.java.net/download.html

The JSON Processing RI jar contains the org.glassfish.json.JsonProviderImpl class you are missing.

I managed to make it work in my webapp in NetBeans by manually installing the JSON Processing RI jar.

The complete procedure is:

  • Download the jar: JSON Processing RI jar
  • Right-click on Project –> Dependencies and add new dependency providing dummy Group ID, Artifact ID and Version number.
  • Right-click on the newly created dependency and select “Manually install artifact”, provide the downloaded jar
  • Rebuild project, now it should work

From this answer you could replace javax.json dependency by its org.glassfish implementation.

Maven repo, gives:

<dependency>
  <groupId>org.glassfish</groupId>
  <artifactId>javax.json</artifactId>
  <version>1.0.4</version>
</dependency>