java.lang.NoClassDefFoundError: junit/framework/TestCase

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Look if your classpath is correct, and check if the versions of your libraries match the version you described in your pom.xml

Solutions on the web

via Sonatype JIRA by Juven Xu, 1 year ago
junit/framework/TestCase
via Sonatype JIRA by Juven Xu, 1 year ago
junit/framework/TestCase
via nabble.com by Unknown author, 2 years ago
via Stack Overflow by Khue Vu
, 6 months ago
weblogic/management/WebLogicMBean [junit]
via Coderanch by Andre Brito, 1 year ago
via scriptscoop.com by Unknown author, 2 years ago
java.lang.NoClassDefFoundError: junit/framework/TestCase
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at org.codehaus.plexus.classworlds.strategy.ForeignStrategy.loadClass(ForeignStrategy.java:35)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:207)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadRealmClass(ClassRealm.java:174)
at org.codehaus.plexus.classworlds.strategy.DefaultStrategy.loadClass(DefaultStrategy.java:67)
at org.codehaus.plexus.classworlds.strategy.ForeignStrategy.loadClass(ForeignStrategy.java:39)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:207)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.sonatype.nexus.configuration.SimpleApplicationConfiguration.getWorkingDirectory(SimpleApplicationConfiguration.java:62)
at org.sonatype.nexus.proxy.repository.AbstractRepositoryConfigurator.doApplyConfiguration(AbstractRepositoryConfigurator.java:128)
at org.sonatype.nexus.proxy.repository.AbstractProxyRepositoryConfigurator.doApplyConfiguration(AbstractProxyRepositoryConfigurator.java:26)
at org.sonatype.nexus.proxy.maven.AbstractMavenRepositoryConfigurator.doApplyConfiguration(AbstractMavenRepositoryConfigurator.java:37)
at org.sonatype.nexus.proxy.repository.AbstractRepositoryConfigurator.applyConfiguration(AbstractRepositoryConfigurator.java:63)
at org.sonatype.nexus.configuration.AbstractConfigurable.doConfigure(AbstractConfigurable.java:95)
at org.sonatype.nexus.configuration.AbstractConfigurable.configure(AbstractConfigurable.java:63)
at org.sonatype.nexus.configuration.application.runtime.DefaultApplicationRuntimeConfigurationBuilder.createRepositoryFromModel(DefaultApplicationRuntimeConfigurationBuilder.java:46)
at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createRepositoryFromModel(DefaultNexusConfiguration.java:328)
at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createRepositories(DefaultNexusConfiguration.java:431)
at org.sonatype.nexus.configuration.application.DefaultNexusConfiguration.createInternals(DefaultNexusConfiguration.java:411)
at org.sonatype.nexus.DefaultNexus.startService(DefaultNexus.java:896)
at org.sonatype.nexus.DefaultNexus.start(DefaultNexus.java:860)
at org.codehaus.plexus.personality.plexus.lifecycle.phase.StartPhase.execute(StartPhase.java:33)
at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:97)
at org.codehaus.plexus.component.manager.AbstractComponentManager.start(AbstractComponentManager.java:167)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.startComponentLifecycle(XBeanComponentBuilder.java:255)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.build(XBeanComponentBuilder.java:129)
at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:181)
at org.codehaus.plexus.component.manager.SingletonComponentManager.getComponent(SingletonComponentManager.java:67)
at org.codehaus.plexus.DefaultComponentRegistry.getComponent(DefaultComponentRegistry.java:329)
at org.codehaus.plexus.DefaultComponentRegistry.lookup(DefaultComponentRegistry.java:165)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:377)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1234)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.sonatype.plexus.jetty.DefaultServletContainer.start(DefaultServletContainer.java:309)
at org.codehaus.plexus.personality.plexus.lifecycle.phase.StartPhase.execute(StartPhase.java:33)
at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:97)
at org.codehaus.plexus.component.manager.AbstractComponentManager.start(AbstractComponentManager.java:167)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.startComponentLifecycle(XBeanComponentBuilder.java:255)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.build(XBeanComponentBuilder.java:129)
at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:181)
at org.codehaus.plexus.component.manager.SingletonComponentManager.getComponent(SingletonComponentManager.java:67)
at org.codehaus.plexus.DefaultComponentRegistry.getComponent(DefaultComponentRegistry.java:329)
at org.codehaus.plexus.DefaultComponentRegistry.lookup(DefaultComponentRegistry.java:165)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:372)
at org.codehaus.plexus.DefaultPlexusContainer.initialize(DefaultPlexusContainer.java:585)
at org.codehaus.plexus.DefaultPlexusContainer.construct(DefaultPlexusContainer.java:275)
at org.codehaus.plexus.DefaultPlexusContainer.(DefaultPlexusContainer.java:166)
at org.sonatype.appbooter.PlexusAppBooter.startContainer(PlexusAppBooter.java:315)
at org.sonatype.appbooter.jsw.PlexusAppBooterJSWListener.start(PlexusAppBooterJSWListener.java:68)

Users with the same issue

Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago
Once, 1 year ago
171 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.