java.lang.IllegalArgumentException

Cannot find class [org.springframework.context.annotation.ProfileCondition]

Samebug tips9

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.

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.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web8271

  • via SpringSource Issue Tracker by Andrei Ivanov, 1 year ago
    Cannot find class [org.springframework.context.annotation.ProfileCondition]
  • via SpringSource Issue Tracker by Andrei Ivanov, 1 year ago
    Cannot find class [org.springframework.context.annotation.ProfileCondition]
  • via Coderanch by Ashis Kumar Sahu, 2 months ago
    Cannot find class [org.apache.servicemix.nmr.api.NMR]
  • Stack trace

    • java.lang.IllegalArgumentException: Cannot find class [org.springframework.context.annotation.ProfileCondition] at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:277) at org.springframework.context.annotation.ConditionalAnnotationHelper.getCondition(ConditionalAnnotationHelper.java:139) at org.springframework.context.annotation.ConditionalAnnotationHelper.shouldSkip(ConditionalAnnotationHelper.java:96) at org.springframework.context.annotation.ConditionalAnnotationHelper.shouldSkip(ConditionalAnnotationHelper.java:88) at org.springframework.context.annotation.ConditionalAnnotationHelper.shouldSkip(ConditionalAnnotationHelper.java:78) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:184) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:170) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:152) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:284) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:88) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$4.run(BeansConfig.java:749) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.executePostProcessor(BeansConfig.java:742) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.postProcessExternal(BeansConfig.java:676) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.readConfig(BeansConfig.java:533) at org.springframework.ide.eclipse.beans.core.internal.model.AbstractBeansConfig.getBeans(AbstractBeansConfig.java:280) at org.springframework.ide.eclipse.beans.core.internal.model.validation.BeansConfigReloadingProjectContributionEventListener.start(BeansConfigReloadingProjectContributionEventListener.java:110) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager$1.execute(SpringProjectContributionManager.java:112) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager$9.run(SpringProjectContributionManager.java:291) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager.execute(SpringProjectContributionManager.java:294) at org.springframework.ide.eclipse.core.internal.project.SpringProjectContributionManager.build(SpringProjectContributionManager.java:110) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381) at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:514) at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:423) at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:180) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) Caused by: java.lang.ClassNotFoundException: org.springframework.context.annotation.ProfileCondition at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.core.runtime.internal.adaptor.ContextFinder.loadClass(ContextFinder.java:131) at java.lang.ClassLoader.loadClass(Unknown Source) at org.springframework.util.ClassUtils.forName(ClassUtils.java:241) at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:274) ... 34 more

    Write tip

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

    Users with the same issue

    Unknown user
    Once, 2 years ago
    Unknown user
    Once, 1 year ago
    3 times, 3 months ago
    Unknown user
    Once, 10 months ago
    Unknown user
    Once, 11 months ago
    2376 more bugmates