Questions tagged [classnotfoundexception]

The Java exception thrown when an application tries to load a class by name but is not able to find the class.

The Java exception thrown when an application tries to load a class by name. Usually raised by one of:

  • the forName(String) method in class Class
  • the findSystemClass(String) method in class ClassLoader
  • the loadClass(String) method in class ClassLoader

when no definition for the class with the specified name could be found in the .

Don't confuse it with , it's a different kind of error, see the following links for more details:

2221 questions
5
votes
3 answers

Android ClassNotFoundException with appcompat-v7:28.0.0

I'm developing an Android application and I try to use the toolbar to add some functionality on it; that's why I'm using appcompat-v7 module. I have followed this tutorial (Sorry because it's in spanish) and I have updated my IDE with the…
5
votes
1 answer

spring boot+netflix zuul app giving java.lang.ClassNotFoundException: com.netflix.zuul.monitoring.CounterFactory

I am developing a gateway for my micro services project using spring boot + netflix zuul. The gateway connects to netflix eureka server and filters the requests. But I am not able to bring up the zuul server I have included following maven…
grk939
  • 53
  • 1
  • 7
5
votes
4 answers

How can I resolve my class from a different jar with same structure like another

How can I resolve my class from a different jar with same structure like another Note : Though the jars in question contains the word selenium but the question here have no direct relation with selenium Till a few days back PhantomJSDriver was…
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
5
votes
6 answers

Using Velocity Tools with Spring 3.0.3

When I update the bean:
David Parks
  • 30,789
  • 47
  • 185
  • 328
5
votes
3 answers

Unable to instantiate activity ... Didn't find class WelcomeActivity on path: DexPathList (with instant run)

I've been struggling with my project for a few days now, suddenly from one build/deploy to another I started getting the following exception. Nothing was updated or changed, I just wanted to run the app on a different device when it happened (just…
5
votes
1 answer

ClassNotFoundException: unable to run app

Unable to run app. The app successfully compiles, but crashes with this exception FATAL EXCEPTION: main Process: com.example.myapplication, PID: 15209 java.lang.RuntimeException: Unable to instantiate activity…
pz64_
  • 2,212
  • 2
  • 20
  • 43
5
votes
0 answers

java.lang.IllegalStateException: Failed to introspect bean class after creation new module in gradle

I have added new module to project and pasted new sources there. I have built application and then start. I see the following error while starting: java.lang.IllegalStateException: Failed to introspect bean class [MyClass] for persistence metadata:…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
5
votes
2 answers

java.lang.ClassNotFoundException: org.hibernate.bytecode.instrumentation.internal.FieldInterceptionHelper

During the validation of entity (before insertion) on my Spring MVC app I get the following error : ... at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202) at…
FuSsA
  • 4,223
  • 7
  • 39
  • 60
5
votes
1 answer

Using OpenJDK 9 EA with IntelliJ

Right now I'm trying to setup IntelliJ to play around with OpenJDK 9 which I downloaded and installed from here. I got the 64 bit Windows version. I added JDK 9 by going to Project Structure and adding the directory C:\Program Files\Java\jdk-9 as a…
arjabbar
  • 6,044
  • 4
  • 30
  • 46
5
votes
7 answers

ClassNotFoundException when running a junit test in eclipse

I am really desperate why this exception can even occurs ? I am running test in class MyTestIT. And what class is not found ? Class which I run... I tried to clean and build it again in eclipse but with no success Class not found…
hudi
  • 15,555
  • 47
  • 142
  • 246
5
votes
3 answers

Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONObject

I'm using org.json.JSONObject to pass the parameters to the server. And I'm using Eclipse IDE. I have already added the java-json.jar file to the build path of the project. but still I'm getting the below exception while running the code and no…
Nani
  • 1,148
  • 3
  • 20
  • 35
5
votes
0 answers

java.lang.ClassNotFoundException: com.amazonaws.auth.AWSCredentials

When uploading data to Amazon S3 I get a NoClassDefFoundError: exception in thread "main" java.lang.NoClassDefFoundError: com/amazonaws/auth/AWSCredentials at athiniocloudmigration.AthinioCloudMigration.main(AthinioCloudMigration.java:30) …
Bhaskar s
  • 61
  • 1
  • 7
5
votes
1 answer

java.lang.ClassNotFoundException: IntegrationSpec while running specs2 Tests in Intellij 14

What I did is: Install Intellij 14 (the same problem appears also with Intellij 13) Install Scala 1.0 plugin for Intellij (supports Scala, SBT, SSP, HOCON and Play 2). Create a new Play 2.x project Run the project from Intellij 14 (open via…
5
votes
3 answers

NoClassDefFoundError when trying to parse JSON with JSON simple

I use JSON simple to parse JSON and I get NoClassDefFoundError when trying to create JSONParser object. import org.json.simple.JSONObject; import org.json.simple.JSONArray; import org.json.simple.parser.JSONParser; ... JSONParser parser = new…
ivknv
  • 305
  • 1
  • 4
  • 14
5
votes
2 answers

Arquillian - ClassNotFound on org.jboss.arquillian.core.api.threading.ExecutorService

I'm currently trying to make arquillian works but I have a problem on one of my Unit Test. It fails on a CLassNotFoundException on class org.jboss.arquillian.core.api.threading.ExecutorService. Maybe I forgot a dependancy in my pom.xml, or I…