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

Java 7 update 55 JacORB error when running via WebStart

Since updating to Java 7 update 55, I'm not able to run my WebStart java application. This application worked fine under Java 7 update 51 when launched via WebStart. It also works with update 55 when launched outside of WebStart. Any suggestions for…
jasg
  • 182
  • 2
  • 10
5
votes
1 answer

Tomcat Mapper class not found

I am creating a web app and at the moment I'm trying to get a tomcat server to run. However I get this error message when ran from the cmd line. Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/uti …
matt
  • 285
  • 4
  • 17
5
votes
3 answers

Getting ClassNotFoundException on code: "Class.forName("com.microsoft.sqlserver.jdbc.SqlServerDriver");"

This is my first Java application and I'm completely inexperienced with Java and NetBeans. I have been trying to connect to sql and get some records for 2 days. The problem is about jdbc driver, let me explain. I have downloaded sqljdbc driver and…
user2708377
  • 55
  • 1
  • 1
  • 4
5
votes
6 answers

runtime error: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

I am new to mysql and jdbc and I am getting the error in this title. I have been searching all day and cannot find a solution that works for me. What I have tried: uninstall/reinstall mysql, copy paste mysql-connector-java-5.1.25-bin.jar and…
user2669813
  • 53
  • 1
  • 1
  • 3
5
votes
2 answers

Unable to instantiate activity component when running android example code

I am learning the tutorial from the android web site. But when I run the application, it prompts Unable to instantiate activity component, something about the classNotFoundException. But in the manifext.xml file the MainActivity was registered. I…
Jolin
  • 1,515
  • 4
  • 21
  • 24
5
votes
3 answers

Java Class.forName() from distant directory

I am currently loading Java classes using Class.forName() to load it. clazz = Class.forName("interfaces.MyClass"); But now I want to load classes from different directory, I have tried to set classpath by clazz = Class.forName("-cp \"C:/dir\"…
kajacx
  • 12,361
  • 5
  • 43
  • 70
5
votes
4 answers

java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet, tomcat doesn't see javaee-api-7.0-b83.jar

I am trying to run sample guessnumber-jsf from Java EE tutorial. It is here: https://svn.java.net/svn/javaeetutorial~svn There is no dependencies in pom.xml. So output file has no .jar file. When I try to put javaee-api-7.0-b83.jar inside…
Stepan Yakovenko
  • 8,670
  • 28
  • 113
  • 206
5
votes
1 answer

ClassNotFoundException: twitter4j.conf.PropertyConfigurationFactory : Android

If I don't run pro-guard on my project, everything is fine but if I run pro-guard and install .apk in device, I am getting above error. I tried adding following lines in proguard-android.txt file -keep public class…
Braj
  • 2,164
  • 2
  • 26
  • 44
5
votes
2 answers

Applet hidden classnotfound exception

I'm developing an applet that behaves strangely: this is not the usual "I can't start my applet in the browser" problem, but something more subtle. The applet consists into a jtabbedpane with 8 tabs, each of which does some data manipulation in the…
Andrea
  • 336
  • 2
  • 9
  • 32
5
votes
2 answers

ClassNotFoundException: org.dom4j.DocumentException

I am trying to debug (F11 on Eclipse) a java GUI application I inherited but while the application runs fine (minus a tiny fix I need to apply) outside of the Eclipse IDE, it produces the following exception when launched from Eclipse (either F11 or…
Withheld
  • 4,603
  • 10
  • 45
  • 76
5
votes
2 answers

ClassNotFoundException for Activity after signing apk

While I'm testing the debug version of my app — it's OK. After I sign it for Google Play release — it starts to FC with the following exception: java.lang.RuntimeException: Unable to instantiate activity…
artem
  • 16,382
  • 34
  • 113
  • 189
5
votes
1 answer

java.lang.ClassNotFoundException in loader dalvik.system.PathClassLoader at app launch

I've got a pp that was made by a different company to make some updates on it but I can't get it going. I've struggled with this problem for nearly 10h straight now and have gone through a lot of threads suggesting different solutions for this error…
PaperThick
  • 2,749
  • 4
  • 24
  • 42
5
votes
2 answers

Android Google Maps ClassNotFoundException

I'm creating my first Google Maps app, but I've run into some trouble and I can't figure out why. I'm getting a ClassNotFoundException. I'm new to Android in general, but this error has me stumped. Here's my manifest.
5
votes
2 answers

java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener

I am working on learning Java, Spring MVC and Eclipse. I am working through a book right now and trying to get the first Spring MVC example to run. When I run it from Eclipse, I get this error: INFO: TLD skipped. URI:…
Sam Carleton
  • 1,339
  • 7
  • 23
  • 45
5
votes
2 answers

Broken Eclipse project - classNotFoundException - could not find main class

I have a project I've been developing in Eclipse 3.7.2 on Ubuntu 12.04. Recently, I've restructured the class hierarchy which involved moving classes between packages. I did not move my main class ("ob3.converter.Converter"), which contains my…
Alex McMillan
  • 17,096
  • 12
  • 55
  • 88