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
7
votes
2 answers

Problem in implementing Parcelable containing other Parcelable

I'm implementing Parcelable class that has another Parcelable insde. In OuterParcelable class: @Override public void writeToParcel(Parcel dest, int flags) { Bundle tmp = new Bundle(); tmp.putParcelable("innerParcelable", mParcelable); …
pixel
  • 24,905
  • 36
  • 149
  • 251
7
votes
3 answers

Custom Control ClassNotFoundException in Scene Builder

I have created a new control by extending an existing one, and I would like to use this new control in my JavaFX scenes. I would like to be able to edit my scenes using Scene Builder, but after adding the new control to the FXML file, I am…
Mitch Talmadge
  • 4,638
  • 3
  • 26
  • 44
7
votes
2 answers

Android Multidex RuntimeException

I am trying to solve a problem with running Android app that has over 65k methods. I have followed Google docs about Multidex support, however I'm still unable to run it successfully. It seems that the problem appears only on SDK less than 21,…
jpact
  • 1,042
  • 10
  • 23
7
votes
2 answers

ClassNotFoundException anonfun when deploy scala code to Spark

I'm new to Apache Spark and I'm trying to deploy a piece of simple scala code to the Spark. Note: I am trying to connect to a an existing running cluster which I configure via my java parameters to be:…
Conan
  • 355
  • 1
  • 4
  • 11
7
votes
1 answer

Android ProGuard +MultiDex causes ClassNotFoundException

I have MultiDex enabled in my android project. It was working fine until I tried enabling proguard. I can successfully build the project but I get runtime exception on startup. It's unable to find the Application class and the MainActivity. I had…
7
votes
1 answer

ClassNotFoundException: Didn't find class "com.example.app.MainActivity" for every app I create

HelloI keep getting a ClassNotFoundException every time I create an Android application in eclipse. This is something that has never happened before up until this morning after using eclipse for months. It might also be worth mentioning that I…
7
votes
1 answer

Smack throws "java.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserFactory:"

So im using Smack to run my chat bot for league of legends, however I can't even get the bot to show up because of a missing class error that I can't seem to figure out. Code and error below, Thanks for any help, -Nick Also: yes, this code was taken…
Nick
  • 85
  • 1
  • 1
  • 5
7
votes
4 answers

Unable to deploy my spring web project to eclipse internal tomcat server.(java.lang.ClassNotFoundException on tomcat startup)

when I use an external tomcat everything is just fine. but I need to deploy my project on internal eclipse tomcat server in order to be able to use DCEVM class hot swapping. When I try to start tomcat server from within eclipse it says it is not…
Meysam Feghhi
  • 945
  • 2
  • 11
  • 23
7
votes
2 answers

ClassNotFindException while running Android sample EffectiveNavigation for older platform

I am running the sample from Implementing Effective Navigation - EffectiveNavigation.zip - which demonstrates some swipe views with tabs in an activity. It runs fine on a newer platform such as 4.2.2 (API17). Then I want to support older platforms…
RumburaK
  • 1,985
  • 1
  • 21
  • 30
7
votes
3 answers

ClassNotFoundException in Maven project

There is a maven based project, which can be built by maven install, but throw exception when run the out jar: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli/CommandLineParser Caused by:…
why
  • 23,923
  • 29
  • 97
  • 142
7
votes
2 answers

libgdx ClassNotFoundException when starting Desktop main - Mac, IntelliJ

I set up my project as described in the IntelliJ setup tutorial, but I am unable to start the Desktop application. The android app starts up fine in both the emulator and on my S3, but main in Desktop is unable to find my class.. Logs: Exception in…
PANCAKES
  • 361
  • 1
  • 3
  • 11
7
votes
1 answer

ClassNotFoundException in runtime but the application compiles

In a Java application I'm trying to create the instance of the class Class1 by using newInstance() method on the class. Class1 belongs to my project, but it also needs Class2 which is from another project and which is located in an external jar…
Javi
  • 19,387
  • 30
  • 102
  • 135
7
votes
5 answers

ClassNotFoundException with Guice 2.0

The code below generates an error using Guice 2.0. With Guice 1.0 everything is fine. The JDK is Java 6 update 15. public class App { public static void main(String[] args) { Guice.createInjector(new AbstractModule() { …
Benno Richters
  • 15,378
  • 14
  • 42
  • 45
7
votes
1 answer

java.lang.NoClassDefFoundError: android.security.MessageDigest

In my application I use MessageDigest.getInstance("SHA-1") to get SHA1, it can run successfully in android 2.3, but it can't run in android 4.0 and it will show the below exception: FATAL EXCEPTION: main java.lang.NoClassDefFoundError:…
Judy
  • 1,772
  • 6
  • 27
  • 48
7
votes
1 answer

Cannot access class in test package from main package (Eclipse)

I have a maven project in eclipse with a folder structure are follows - - Project > src/main/java .. > src/test/java .. I found that when I try to initialize any class in the test package from my code in the main package I get a…
Hari Reddy
  • 3,808
  • 4
  • 33
  • 42