Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NoClassDefFoundError: net/minidev/json/writer/JsonReaderI #159

Closed
hooperbloob opened this issue Nov 30, 2015 · 6 comments
Closed

Comments

@hooperbloob
Copy link

I've put together a simple TestNG exercise using JsonPath but it doesn't complete the parsing to get the ReadContext owing to a class its unable to load:

java.lang.NoClassDefFoundError: net/minidev/json/writer/JsonReaderI
at com.jayway.jsonpath.internal.DefaultsImpl.(DefaultsImpl.java:17)
at com.jayway.jsonpath.internal.DefaultsImpl.(DefaultsImpl.java:15)
at com.jayway.jsonpath.Configuration.getEffectiveDefaults(Configuration.java:48)
at com.jayway.jsonpath.Configuration.defaultConfiguration(Configuration.java:173)
at com.jayway.jsonpath.internal.JsonContext.(JsonContext.java:52)
at com.jayway.jsonpath.JsonPath.parse(JsonPath.java:596)

I'm using the suggested reference to 2.1.0 in my pom file.

Any suggestions?

@pengboyin
Copy link

i have same question.

@kallestenflo
Copy link
Contributor

@pengboyin Looks like JsonSmart is missing on class path.

@ddwolf
Copy link

ddwolf commented Aug 8, 2018

I encountered this error while I was running a junit test. I add json-smart and asm to my pom.xml, then the error dissapeared.

        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>asm</artifactId>
            <version>1.0.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
            <version>2.2.1</version>
            <scope>test</scope>
        </dependency>

@LiangZhang2017
Copy link

But How can I add the json-smart if I just use the jason-path-2.4.0.jar? Thanks a lot.

@LiangZhang2017
Copy link

But How can I add the json-smart if I just use the jason-path-2.4.0.jar? Thanks a lot.

I have already figures it out. Yes, when the json-smart, asm and accessors-smart are added. Then the error also disapear. Thanks also.

@aahassen
Copy link

aahassen commented Jun 3, 2020

I am having similar errors even after adding the above mentioned dependencies to my spring-boot pom file. My app was always working all the sudden I started seeing these error while running my spring boot app from eclipse.

```

at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
at org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration$$EnhancerBySpringCGLIB$$fcffdac2.requestMappingHandlerAdapter()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 20 common frames omitted
Caused by: java.lang.ClassNotFoundException: net.minidev.json.writer.JsonReaderI
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 44 common frames omitted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants