java.lang.ClassNotFoundException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.

tip

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

tip

Check if you didn't forget to instantiate your topic in the kafka broker.

tip

NoClassDefFoundError means java has failed to find a class you're trying to instantiate, look if you've added the class you're trying to instantiate to the dependencies.

tip

You need to add httpcore to your dependencies. Try adding version 4.3 or further.

tip

Needs to add netty-transport-native-epoll with a OS classifier to the classpath, it's not included in netty-all

tip

This might be an issue with the file location in the Spark submit command. Try it with "spark-submit --master spark://master:7077 hello_world_from_pyspark.py {file location}"

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • graphite/carbon missing??
    via GitHub by DanoOM
    ,
  • visual-c++: mai 2015
    via by Unknown author,
  • If i create a FunctionalMunitSuite test and run it from Studio, I'm getting the following error: {code} java.lang.RuntimeException: org.mule.api.config.ConfigurationException: Failed to invoke lifecycle phase "initialise" on object: org.mule.el.mvel.MVELExpressionLanguageWrapper@68ac9ec5 (org.mule.api.lifecycle.InitialisationException) at org.mule.munit.runner.functional.FunctionalMunitSuite.<init>(FunctionalMunitSuite.java:60) at testfunctionaltest.testFunctionalJava.<init>(testFunctionalJava.java:13) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:195) at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:244) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:241) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: org.mule.api.config.ConfigurationException: Failed to invoke lifecycle phase "initialise" on object: org.mule.el.mvel.MVELExpressionLanguageWrapper@68ac9ec5 (org.mule.api.lifecycle.InitialisationException) at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:49) at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69) at org.mule.context.DefaultMuleContextFactory$1.configure(DefaultMuleContextFactory.java:89) at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:222) at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:81) at org.mule.munit.runner.MunitMuleContextFactory.createMuleContext(MunitMuleContextFactory.java:85) at org.mule.munit.runner.MuleContextManager.createMule(MuleContextManager.java:112) at org.mule.munit.runner.functional.FunctionalMunitSuite.<init>(FunctionalMunitSuite.java:51) ... 24 more Caused by: org.mule.api.lifecycle.InitialisationException: Failed to invoke lifecycle phase "initialise" on object: org.mule.el.mvel.MVELExpressionLanguageWrapper@68ac9ec5 at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:124) at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:177) at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:100) at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43) ... 31 more Caused by: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "initialise" on object: org.mule.el.mvel.MVELExpressionLanguageWrapper@68ac9ec5 at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:249) at org.mule.lifecycle.phases.MuleContextInitialisePhase.applyLifecycle(MuleContextInitialisePhase.java:71) at org.mule.lifecycle.RegistryLifecycleCallback.doApplyLifecycle(RegistryLifecycleCallback.java:99) at org.mule.lifecycle.RegistryLifecycleCallback.onTransition(RegistryLifecycleCallback.java:71) at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155) at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126) at org.mule.registry.AbstractRegistry.fireLifecycle(AbstractRegistry.java:146) at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:116) ... 34 more Caused by: java.lang.NoClassDefFoundError: scala/Function1 at com.mulesoft.weave.mule.el.WeaveExpressionLanguageExtension.configureContext(WeaveExpressionLanguageExtension.scala:12) at org.mule.el.mvel.GlobalVariableResolverFactory.<init>(GlobalVariableResolverFactory.java:39) at org.mule.el.mvel.MVELExpressionLanguage.createStaticContext(MVELExpressionLanguage.java:89) at org.mule.el.mvel.MVELExpressionLanguage.initialise(MVELExpressionLanguage.java:83) at org.mule.el.mvel.MVELExpressionLanguageWrapper.initialise(MVELExpressionLanguageWrapper.java:32) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:237) ... 41 more Caused by: java.lang.ClassNotFoundException: scala.Function1 at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 51 more {code}
    via by Julian Pascual,
  • Akka cannot start ActorSystem
    via Stack Overflow by RemcoW
    ,
  • JUL TO SLF4J on TomEE 1.7.2 with maven plugin
    via Stack Overflow by Kizux
    ,
    • java.lang.ClassNotFoundException: org.kairosdb.core.carbon.CarbonServerModule at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.kairosdb.core.Main.<init>(Main.java:178) at org.kairosdb.core.Main.main(Main.java:263)

    Users with the same issue

    Unknown visitor
    Unknown visitor2 times, last one,
    MattyMatty
    1 times, last one,
    oddodd
    1 times, last one,
    tvrmsmithtvrmsmith
    2 times, last one,
    junior_cEngineerjunior_cEngineer
    1 times, last one,
    2331 more bugmates