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

Eclipse ClassNotFoundException

Everything works fined, but suddenly eclipse stopped execute and junit tests or even main method, when i run them using run as - > Java application, run as -> junit test It simply throws error Caused by: java.lang.ClassNotFoundException:…
user12384512
  • 3,362
  • 10
  • 61
  • 97
0
votes
1 answer

deserialization of unknown object

Had faced an interesting case: There is some "space"(Mq-queue, Kafka-topic, simple folder, whatever). In this space writing Java-Object in serialized form. There is a listener that listens to this space. The question is: How can I, as this listener,…
0
votes
1 answer

Java and portability: Fake the presence of JavaFX

Am developing a Java software which should be used on a raspberry pi. Now the Raspi sadly doesn't officially support JavaFx anymore, even if one can add it manually. My software is mostly usable without JFX too and is intended to disallow using…
DragonGamer
  • 834
  • 3
  • 9
  • 27
0
votes
1 answer

java.lang.ClassNotFoundException with referenced library

I searched for a solution for some hours now and, up to this point, not one of the given solutions in here has helped me. Maybe that is because I'm kind of a newbie with Eclipse and Java, but bear with me. My problem is as follows: I have got a…
N. Krae
  • 1
  • 2
0
votes
1 answer

Does NoClassDefFoundError have always ClassNotFoundException in caused by?

Can I assume that every NoClassDefFoundError thrown from JDK class loading mechanism will always have ClassNotFoundException as a cause in stacktrace? Also, where actually NoClassDefFoundError is thrown and its cause is initialized to be…
0
votes
0 answers

Using Jade in Play 2.0 Java : Custom agent class not found

I'm currently trying to create agents with JADE platform in a Play 2.0 Java application. I use the basic java play template for this. My index method in the HomeController class goes like this : public Result index() { try { …
0
votes
1 answer

Class Not Found Exception but it is in the same package

So I have a class called DataGrabber that uses the Java Wrapper for Firebase to get data from my Firebase DB. I included the dependencies and all the java classes are in the same package so they should all have access to each other. However,…
0
votes
0 answers

NoClassDefFoundError: caused by ClassNotFoundException

My program may use a library when it is present at runtime, but it is not required to have this library to run the program. However, when I run my program (without the library being present), it complains that it is not present for a very specific…
0
votes
1 answer

Tomcat can't find a class freemarker.template.TemplateException

I'm trying to use the Freemarker template engine in my web app. But for some reason TomCat doesn't find class freemarker.template.TemplateException and I can not understand where is a problem because I try to generate html string in main function…
0
votes
1 answer

class not found with selenium and java

Im trying to learn selenium webdriver, but im running in to a problem. I have made a very small test which looks like this: import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class Flows { public…
0
votes
2 answers

Maven searching for an old version of Javax.Mail dependency (1.4.3) though I have the latest version of it (1.6.1) and throwing ClasNotFoundException

I am trying to write a piece of code in the Cucumber testRunner class, to send the test result report through Email after execution, but I have come across this issue that I have not been able to solve. I added the dependency for the Javax.Mail…
0
votes
1 answer

Java Web Start command is not working (java -cp class_path class_name)

I have the app, which i launch with "Java Web Start". This app is used for launching other java apps. The issue is that with the command "java -cp class_path class_name" java app cannot be launched, an exception "Could not find or load main class…
0
votes
2 answers

Apache Ignite Cache ClassNotFoundException

I have an apache ignite cluster. All nodes are splited to two logical groups: platform level nodes (PLN) and application level nodes (ALN). Each node in cluster has: xml configuration file (ALN contain PLN config and application specific cache…
0
votes
0 answers

java.lang.NoClassDefFoundError: org/slf4j/Logger

I am trying to run a project that uses a Logger class. Trying to do so causes the exception below. The compiler is looking for Logger at org/slf4j/Logger however in my Libraries it is located at org/apache/log4j (I am using IntelliJ). How can I fix…
user2260199
  • 877
  • 4
  • 13
  • 20
0
votes
1 answer

classnotfoundexception

I'm currently working on an app that has got some face detection in it. i'm using android's FaceDetector class and one of it's methods. i'm getting the frame from the previewframe callback but the format is YuvImage. i need it to be a bitmap for the…
turtleboy
  • 8,210
  • 27
  • 100
  • 199