question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

still getting java.lang.NoClassDefFoundError with rest-assured:4.1.2

See original GitHub issue

hello,

according to https://github.com/rest-assured/rest-assured/issues/1168 https://github.com/rest-assured/rest-assured/issues/1175 this should have been fixed but sadly I’m still getting java.lang.NoClassDefFoundError: io/restassured/path/json/mapper/factory/JohnzonObjectMapperFactory this exception is only thrown when I have the following piece of code in my test base

@BeforeClass
public static void setup() {
	RestAssured.port = 9001;
}

using java 11 spring-boot:2.1.9 rest-assured:4.1.2

best regards, peter

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:11

github_iconTop GitHub Comments

4reactions
mamachankocommented, Apr 18, 2020

With

testImplementation('io.rest-assured:rest-assured:4.3.0')

I am getting

java.lang.ClassNotFoundException: io.restassured.path.json.mapper.factory.JsonbObjectMapperFactory

Downgrading to 4.2.0 and include -all fixed it for me:

testImplementation('io.rest-assured:rest-assured:4.2.0')
testImplementation('io.rest-assured:rest-assured-all:4.2.0')
4reactions
avierrcommented, Nov 7, 2019

ok I was was wrong, fix for this is to import both:

testCompile group: 'io.rest-assured', name: 'rest-assured', version: '4.1.2'
testCompile group: 'io.rest-assured', name: 'rest-assured-all', version: '4.1.2'

I hope there is a proper fix for this

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am I getting a NoClassDefFoundError in Java?
While it's possible that this is due to a classpath mismatch between compile-time and run-time, it's not necessarily true.
Read more >
How to Resolve the NoClassDefFoundError in Java - Rollbar
NoClassDefFoundError is a Java error that occurs when the JVM is unable to find a class at runtime which was available at compile-time....
Read more >
3 ways to solve java.lang.NoClassDefFoundError in Java J2EE
I am getting java.lang.NoClassDefFoundError while running my program in Eclipse IDE. I checked the classpath and seems class is there. Eclipse is giving...
Read more >
java.lang.NoClassDefFoundError trying to find org.apache.http ...
I am investigating RestAssured, and obviously cannot proceed without being able to make a .get() call. Any help is greatly appreciated.
Read more >
java.lang.NoClassDefFoundError not sure why. — oracle-tech
I have 2 classes: class1.java uses helper/TradeHelper.java 's connect ... I was getting a NoClassDefFoundEror: java/lang/Object when I ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found