JEE 7 JSON java.lang.NoClassDefFoundError: javax/json/Json
Hi,
While using the JSON in jee 7 based application I getting following errors:
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.NoClassDefFoundError: javax/json/Json
at net.roseindia.JsonExample.main(JsonExample.java:19)
... 6 more
Caused by: java.lang.ClassNotFoundException: javax.json.Json
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 7 more
Let's know the solution of this.
Thanks
View Answers
November 22, 2013 at 10:10 AM
Hi,
Please add following dependencies in your pom.xml
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.0</version>
<scope>runtime</scope>
</dependency>
Thanks
November 22, 2013 at 10:11 AM
Ads
Related Tutorials/Questions & Answers:
Advertisements
JEE 7 Tutorial
focuses Java EE
7
JEE7
JSON: How to use
JEE 7 JSON API...
JEE 7 Tutorial
JEE 7 is already released with many new features such as HTML 5... demanding enterprise
applications.
Here in this section we are giving
JEE 7
JEE7 JSON: How to use JEE 7 JSON API?
JEE7
JSON: How to use
JEE 7 JSON API?
In this tutorial I will explain you how you can use
JEE 7 JSON API in your
program for consuming and generating the
JSON data on fly. The
JSON stands for
JavaScript Object Notation. The
JSON
Oracle releases HTML 5 which focuses Java EE 7
Oracle releases HTML 5 which focuses Java EE
7
In this article we will understand how
JEE 7 supports HTML 5 and what is the
benefits of it. This version... 2.0
Check more tutorials on
JEE 7
spring JEE module tutorial
spring
JEE module tutorial Hi, I want spring
Jee module tutorial and spring ORM module tutorial plz send me
JEE 8 - Java Enterprise Edition 8
The
JEE 7 was recently released with many new features and great support for
the development of demanding enterprise applications. The
JEE 7 was a great
release. Now the software vendors are implementing the
JEE 7 specification
JEE - Java Enterprise Edition
in the version 5.
Here is the versions of
JEE:
Java EE
7 (May 28, 2013.... To begin with the concept of
JEE 7, let us first
understand about Java...
JEE - Java Enterprise Edition
In this section we are going to discuss about
Sitemap JEE 5 Tutorial Section
Home | About-us | Contact Us
|
Advertisement |
Ask
Questions | Site
Map | Business Software
Services India
JEE 5 Tutorial Section
JEE
technologies |
JEE 5 APIs |
Sun Java System Application Server Platform Edition
How to uninstall JDK 7?
How to uninstall JDK
7? Hi,
How to uninstall JDK
7 from Windows computer?
Thanks
To uninstall JDK
7:
Open Add remove programs in Windows 10/8/7
Then select the Java Development KIT
Then click on the uninstall
json
json how to get data in
json object from database