Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Provider org.glassfish.json.JsonProviderImpl not found

According to my project Provider org.glassfish.json.JsonProviderImpl not found I dont understand why it is complaining about glassfish as I am using a different library for json:

...
        <dependencies>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.0.1</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.websocket</groupId>
                <artifactId>javax.websocket-api</artifactId>
                <version>1.1</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.json</groupId>
                <artifactId>javax.json-api</artifactId>
                <version>1.0</version>
            </dependency>
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>5.1.36</version>
            </dependency>
        </dependencies>
...

enter image description here

Any idea about how can I use my Json library and avoid to use glassfish?

like image 877
masber Avatar asked Oct 12 '15 13:10

masber


1 Answers

The problem is that javax.json-api only contains the API (interfaces) and no implementation.

If your server comes with a pre-bundled implementation this should work, but if not you can add the following dependency to get an implementation:

<dependency>
  <groupId>org.glassfish</groupId>
  <artifactId>javax.json</artifactId>
  <version>1.0.4</version>
</dependency>
like image 53
unwichtich Avatar answered Oct 18 '22 18:10

unwichtich