ClassNotFoundException : org.jboss.resteasy.plugins.providers.multipart.MultipartInput

Question

Working REST + file upload, using resteasy 2.2.1.GA and Eclipse 3.6. And the reseteasy multipart dependency is declared in maven pom.xml file.

In compile mode, class “MultipartInput” is able to compile, but Eclipse prompts following error message during deployment or debugging mode?


java.lang.NoClassDefFoundError: org/jboss/resteasy/plugins/providers/multipart/MultipartInput
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: java.lang.ClassNotFoundException: 
        org.jboss.resteasy.plugins.providers.multipart.MultipartInput

	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	... 29 more

Solution

In Maven + Eclipse development, double confirm that the “resteasy-multipart-provider” is declared in Maven pom.xml file properly.

File : pom.xml


	<dependency>
		<groupId>org.jboss.resteasy</groupId>
		<artifactId>resteasy-multipart-provider</artifactId>
		<version>2.2.1.GA</version>
	</dependency>

Issue below Maven command to make sure all dependencies are deployed during Eclipse debugging environment.


mvn eclipse:eclipse -Dwtpversion=2.0

About the Author

author image
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

avatar
3 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
SanjayJoeJAX-RS TUTORIALS | BUYWORKSELL Recent comment authors
newest oldest most voted
Sanjay
Guest
Sanjay

Unable to deploy Spring Boot and Jersey based Rest App in Wildfly 10 , I m getting exception related to rest easy . Any help ?

Joe
Guest
Joe

Do you know what the solution might be for this when you are working in Android Studio with Gradle instead of Maven and Eclipse?

trackback
JAX-RS TUTORIALS | BUYWORKSELL

[…] ClassNotFoundException : org.jboss.resteasy.plugins.providers.multipart.MultipartInput […]