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
6
votes
1 answer

Send an Anonymous class over sockets? (Object..Stream in Java)

So right now, I have a server that is running with ObjectInputStream and ObjectOutputStream. The problem I am having is that I have a custom (anonymous) class that extends java.lang.Date that I am trying to send to the client and then compile. So…
6
votes
1 answer

java.lang.ClassNotFoundException: javax.servlet.jsp.SkipPageException

When i run the jsp page i am getting the following error. Web sever : Tomcat 6.0 , using Struts java.lang.ClassNotFoundException: javax.servlet.jsp.SkipPageException at…
Rams
  • 61
  • 1
  • 3
6
votes
1 answer

Junit test integrated with Ant Failed with ClassNotFoundException

I have JUnit tests on my project that run correctly with Eclipse. So, now I try to integrate these tests with an ant task. To make that I make the following ant script :
sylsau
  • 413
  • 9
  • 19
6
votes
5 answers

Issue - java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

I am trying to get simple spring application up and running posted at Spring Example. I am getting SEVERE: Servlet /MavenWeb threw load() exception java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet at…
Rachel
  • 100,387
  • 116
  • 269
  • 365
6
votes
2 answers

How to resolve java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain error?

we are trying to deploy code to a FRC robot with VScode, but we keep getting the error: Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain Caused by: java.lang.ClassNotFoundException: …
Bobjoesmith
  • 81
  • 1
  • 1
  • 9
6
votes
2 answers

Android app fails to load on some phones in PathClassLoader

I have an app, let us call it 'com.company.foo', with a main Activity 'FooBar'. In my AndroidManifest.xml, I have
6
votes
0 answers

Robolectric and AndroidX ClassNotFoundException android.support.v4.app.NotificationCompat$Style

I am trying to use Robolectric in order to unit test some classes in an Android application without using an emulator or a device. I would like, for example, to unit test a Dao class but I always have the following exception : Caused by:…
rolandl
  • 1,769
  • 1
  • 25
  • 48
6
votes
9 answers

Facing hibernate error: Caused by: java.lang.ClassNotFoundException: net.bytebuddy.NamingStrategy$SuffixingRandom$BaseNameResolver

I am getting an error while running this code in Eclipse. I have created Student.java file: public class Student { private int id; private String name; private String email; private int marks; // getters/setters } I have…
Swapnil G Thaware
  • 799
  • 3
  • 6
  • 19
6
votes
1 answer

ClassNotFoundException- .BaseDexClassLoader.findClass

I am facing ClassNotFoundException in production build. Please find below exception logs. java.lang.RuntimeException: at android.app.LoadedApk.makeApplication (LoadedApk.java:578) at android.app.ActivityThread.handleBindApplication…
6
votes
3 answers

Java Error: EventDispatchThread.run() line: not available [local variables unavailable]

I get the following error when I try to start my code in the debugger. EventDispatchThread.run() line: not available [local variables unavailable] The code is very large and I can't publish it here but anyway here are some details: This statement…
fpdragon
  • 1,867
  • 4
  • 25
  • 36
6
votes
1 answer

ClassNotFoundException with URLClassLoader in classes.jar (java.net package)

On Eclipse Galileo, got the following ClassNotFoundException when doing Debug As/Web Application. But works just fine when doing Run As/Web Application. I was given message that "The source attachment does not contain the source for the file…
tom
  • 14,273
  • 19
  • 65
  • 124
6
votes
8 answers

GWT/ Eclipse: ClassNotFoundException com/google/gwt/dev/Compiler

i recently updated from GWT 2.0.4 to 2.1.0. Since then I cannot compile my GWT application anymore. When I click on the GWT compile button of the GWT eclipse plugin I get the following error: java.lang.NoClassDefFoundError:…
hage
  • 5,966
  • 3
  • 32
  • 42
6
votes
3 answers

RuntimeException, ClassNotFoundException: Class WordCount$Map not found . Mapper class issue

I am trying to run WordCount on sandBox HortonWork HDP. I have searched this error in many places and applied what they said and I could not make it run. Step by Step: 1- First I compile the java program javac -cp .:$(hadoop classpath)…
6
votes
2 answers

Is there any Java 8 supported release of SqlJ?

Actually I am getting an error: Exception in thread "main" java.lang.NoClassDefFoundError:sun/io/CharToByteConverter This is because in Java 8, the CharToByteConverter class has been removed as it was deprecated. Now I want to know of any…
Murtuza K
  • 165
  • 2
  • 10
6
votes
3 answers

android.view.WindowInsets ClassNotFoundException

android.view.WindowInsets is added in API level 20. I import android.view.WindowInsets in my CustomLayout and override onApplyWindowInsets(WindowInsets insets), but ClassNotFoundException occurs in some phones, whose api level are from 14 to 21.…
方人也
  • 151
  • 3
  • 10