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
0 answers

Problems setting Jetty class path using

I have an external jar that I don't want to have bundled with my webapp. I'm putting it on jetty's classpath. Unfortunately, the environment in which I'm deploying is very restrictive and I can only write to two directories: the one that contains…
5
votes
2 answers

Quartz JobStore: JobPersistenceException: Couldn't retrieve trigger: ClassNotFoundException

I'm hoping one of you lovely people will be able to help me with this, as I've spent a number of fruitless hours already trying to make everything play nice! I've traced the issue down to Classloading, and been able to see that when Quartz tries to…
5
votes
1 answer

Giraph Shortest Paths Example ClassNotFoundException

I am trying to run the shortest paths example from the giraph incubator (https://cwiki.apache.org/confluence/display/GIRAPH/Shortest+Paths+Example). However instead of executing the example from the giraph-*-dependencies.jar, I have created my own…
alien01
  • 1,334
  • 2
  • 14
  • 31
5
votes
1 answer

java.lang.ClassNotFoundException: can't successfully load the class source

I am working on an Android project - so far so good. Today I added some extra Java code to the project - I will call it here calcCode. This is some code doing calculations in the background and is not Android specific - I will just be using it in my…
roysch
  • 773
  • 1
  • 7
  • 22
5
votes
2 answers

JBoss AS7 app deployed on a Mac can't find com.apple.laf.AquaLookAndFeel

We're migrating to JBoss AS7 from an older version of JBoss and we use JFreeChart in one part of our app: chart = ChartFactory.createStackedBarChart( "", "", "Data", dataset, PlotOrientation.HORIZONTAL, true, false, false ); When we hit…
Chris Williams
  • 11,647
  • 15
  • 60
  • 97
4
votes
3 answers

ClassNotFoundException when connecting to MS SQLServer using JDBC

I'm trying to connect to a MSSQL using the MS JDBC Driver (Microsoft SQL Server JDBC Driver 3.0: http://www.microsoft.com/download/en/details.aspx?id=21599) but what every i do i get java.lang.ClassNotFoundException:…
Adam_B
  • 83
  • 1
  • 3
  • 5
4
votes
2 answers

Class not found error in Netbeans

I am using Netbeans from many days. But suddenly it started giving me following errors for simple hello programs. java.lang.NoClassDefFoundError: newr Caused by: java.lang.ClassNotFoundException: newr at…
adesh
  • 832
  • 4
  • 14
  • 23
4
votes
1 answer

Android emulator crash: "Dx bad class file magic" / ClassNotFoundException on startup?

I am developing a game in android and I have an issue. I have the game fully functioning on my other computer so I committed the project to an svn server to use on my new windows 7 64 bit computer. I checked it out on my new computer with…
user1132959
  • 978
  • 8
  • 16
4
votes
1 answer

The MBean class could not be loaded by the default loader repository?

The title says everything. I'm running a simple example of how to use JMX to remotely manage objects. It works fine with command lines but within Eclipse I get a javax.management.ReflectionException saying The MBean class could not be loaded by…
jean24
  • 189
  • 3
  • 9
4
votes
2 answers

Mysterious ClassNotFoundException when Android system engage BackupAgent

I have got a few (4) error reports on my app from when the Android system decides to do the backup to Google cloud using the BackupAgent. I am using the SharedPreferencesBackupHelper. The stack trace looks like this (my real package name is replaced…
4
votes
1 answer

ClassNotFoundException during Android test instrument

I've seen many topics dealing with this error but could not found a working solution. So I'll try to describe the problem completely. I've got a project and a project test. My project manifest :
Jerome VDL
  • 3,376
  • 4
  • 32
  • 33
4
votes
1 answer

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/core/view/MenuHost;

I'm making a google sign in process in my app. Whenever I open my app it crashes and gives NoClassDefFoundError I checked the logcat and found this:- --------- beginning of crash 2022-05-13 18:59:08.881 3810-3810/com.java.test E/AndroidRuntime:…
4
votes
1 answer

How can I fix the java.lang.ExceptionInInitializerError when reading an Excel file with POI?

Show the java and package version info: java --version openjdk 11.0.12 2021-07-20 OpenJDK Runtime Environment (build 11.0.12+7-post-Debian-2) OpenJDK 64-Bit Server VM (build 11.0.12+7-post-Debian-2, mixed mode, sharing) POI…
showkey
  • 482
  • 42
  • 140
  • 295
4
votes
2 answers

Java Selenium error: NoClassDefFoundError: org/openqa/selenium/HasAuthentication

I use Java with Selenium (in general I use ChromeDriver) with Eclipse IDE and I get an error when I try to run: Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/HasAuthentication at…
4
votes
1 answer

RuntimeException: Unable to instantiate application com.company.app.Application: ClassNotFoundException

I've read a few answers on this site with the same or similar error messages, and I've tried all the solutions already. Sadly, none of them have worked so far. My gradle files all look like they're properly set up for Multidex, the Application class…
Ky -
  • 30,724
  • 51
  • 192
  • 308