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

NoClassDefFoundError exception in android stuidio

Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/impl/client/DefaultHttpClient I am not able to resolve below error : Caused by: java.lang.NoClassDefFoundError: Failed resolution of: …
10
votes
1 answer

Unexpected crash in BaseDexClassLoader

This crash has happened to 1800 users of our app with 1.2 monthly active users (according to Google Developer Console). Quite rare, but it occurs. Android 4.1 up to 6, but NO Android 7 in reports. What might be the nature of this…
Pavel
  • 2,610
  • 3
  • 31
  • 50
10
votes
3 answers

java.lang.NoClassDefFoundError: Lorg/apache/logging/log4j/Logger; but the artifact exists

I'm using Tomcat to deploy a java webapp. I get a very long stacktrace, in short: GRAVE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component…
BackSlash
  • 21,927
  • 22
  • 96
  • 136
10
votes
1 answer

java.lang.ClassNotFoundException: org.joda.time.ReadablePartial

I'm using Eclipse Luna with Jaspersoft Studio plugin 6.2.2 to developer reports for web application. No problem to run one basic blank report from Eclipse plugin, but when I load this jrxml from java class, I receive the message: Servlet.service()…
Paulo
  • 101
  • 1
  • 1
  • 6
10
votes
1 answer

Getting TypeNotPresentException followed by ClassNotFoundException or NoClassDefFoundError on All android versions except android L

I am getting very interesting bug in one of my apps. My app is working fine on android L, But as soon as i try to run it on other android versions, I am getting ClassNotFoundException or NoClassDefFoundError while trying to call web services using…
10
votes
4 answers

ClassNotFoundException: org.springframework.cglib.transform.impl.MemorySafeUndeclaredThrowableStrategy after rebuilding

I have this strange error when trying to run my project on Tomcat. Until a few days ago, everything was ok, and I haven't changed any line of code since then. The only thing I did before everything began to fail was "Update project..." in Maven…
Lars
  • 554
  • 1
  • 5
  • 19
9
votes
3 answers

OSGi: how to ensure classpath consistency?

According to the OSGi documentation, OSGi is designed to help prevent ClassPath problems. For example, from "OSGi in action": ClassNotFoundExceptions when starting your application because the class path wasn't correct. OSGi can help by ensuring…
amarillion
  • 24,487
  • 15
  • 68
  • 80
9
votes
1 answer

Cassandra + SpringBoot, java.lang.ClassNotFoundException: com.datastax.oss.protocol.internal.SegmentCodec

I'm trying to create a Spring application using Cassandra DB. But getting following error when I try to run the application. Caused by: java.lang.NoClassDefFoundError: com/datastax/oss/protocol/internal/SegmentCodec ... 103 common frames…
9
votes
5 answers

java.lang.NoClassDefFoundError when the file is there

I've tried to look around for postings that might help me, cant find any. I am deploying an ear to JBoss4 server, and I started having this problem since I added a new project. this new project is defined as Java project in eclipse, and the EAR…
TS-
  • 4,311
  • 8
  • 40
  • 52
9
votes
6 answers

java.lang.NoClassDefFoundError: scala/reflect/api/TypeCreator

I'm getting this error message when I run my sbt project in IntelliJ by right clicking "Debug". /home/johnreed/Applications/jdk1.8.0_73/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:34395,suspend=y,server=n -Dfile.encoding=UTF-8…
9
votes
3 answers

java.lang.ClassNotFoundException: javax.servlet.http.HttpSessionIdListener

I have two projects that run correctly by themselves but when I include MailSender in TradingFramework I get this NoClassDefFoundError: Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionIdListener at…
Saim Doruklu
  • 464
  • 2
  • 5
  • 16
9
votes
2 answers

readobject method throws ClassNotFoundException

I'm trying to pick up Java and wanted to test around with Java's client/server to make the client send a simple object of a self defined class(Message) over to the server. The problem was that I kept getting a ClassNotFoundException on the server…
eruina
  • 853
  • 3
  • 9
  • 18
9
votes
3 answers

IntelliJ 13 Tomcat Error configuring application listener of class org.springframework.web.util.Log4jConfigListener

I'm attempting to run a Java/Spring/Hibernate/Ivy application using IntelliJ 13 and its built in Tomcat deployment plugin. I'm using Tomcat 8.0.9, but I've also attempted this using Tomcat 6.0.39. I'm creating an artifact when I attempt to spin up…
brad142
  • 345
  • 1
  • 2
  • 10
9
votes
2 answers

Symfony2 - Class not found in prod environment

i am creating new project in Symfony 2.1 . I wanted to check if my application will go correctly on my server, so I copied all files, cleared cache and set permissions. locally in dev environment everything is alright, but when I request "online -…
8
votes
2 answers

ClassNotFoundException error reports when upgrading Android app

I've seen quite a few threads about ClassNotFoundException and Android, but I have yet to find what I think is the reason for what I experience. I have an app - Data counter widget - on Android Market. It has 250k+ downloads, and every time I…
Roy Solberg
  • 18,133
  • 12
  • 49
  • 76