org.springframework.beans.factory.CannotLoadBeanClassException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • We export an MBean like this: <context:mbean-export /> <bean id="statisticsBean" class="org.hibernate.jmx.StatisticsService" p:statisticsEnabled="true" p:sessionFactory-ref="sessionFactory" /> This will cause on some environments the following exception at runtime: 2009-09-29 10:08:48,341 [server-dm-5] ERROR org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext - Post refresh error org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter] for bean with name 'mbeanExporter' defined in null; nested exception is java.lang.ClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter not found from bundle [eu.educator.orm] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:288) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:145) at com.springsource.server.kernel.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:82) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter not found from bundle [eu.educator.orm] at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103) at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.springframework.util.ClassUtils.forName(ClassUtils.java:211) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138) ... 11 more Caused by: com.springsource.server.osgi.framework.ServerClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter in ServerBundleClassLoader: [bundle=eu.educator.orm_1.0.0] at com.springsource.server.osgi.framework.equinox.ServerBundleClassLoader.loadClass(ServerBundleClassLoader.java:136) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:313) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1274) at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99) ... 16 more Caused by: java.lang.ClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at com.springsource.server.osgi.framework.equinox.ServerBundleClassLoader.loadClass(ServerBundleClassLoader.java:134) ... 21 more
    via by Vincent Kok,
  • We export an MBean like this: <context:mbean-export /> <bean id="statisticsBean" class="org.hibernate.jmx.StatisticsService" p:statisticsEnabled="true" p:sessionFactory-ref="sessionFactory" /> This will cause on some environments the following exception at runtime: 2009-09-29 10:08:48,341 [server-dm-5] ERROR org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext - Post refresh error org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter] for bean with name 'mbeanExporter' defined in null; nested exception is java.lang.ClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter not found from bundle [eu.educator.orm] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:288) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:145) at com.springsource.server.kernel.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:82) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter not found from bundle [eu.educator.orm] at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103) at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.springframework.util.ClassUtils.forName(ClassUtils.java:211) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138) ... 11 more Caused by: com.springsource.server.osgi.framework.ServerClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter in ServerBundleClassLoader: [bundle=eu.educator.orm_1.0.0] at com.springsource.server.osgi.framework.equinox.ServerBundleClassLoader.loadClass(ServerBundleClassLoader.java:136) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:313) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1274) at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99) ... 16 more Caused by: java.lang.ClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at com.springsource.server.osgi.framework.equinox.ServerBundleClassLoader.loadClass(ServerBundleClassLoader.java:134) ... 21 more
    via by Vincent Kok,
  • XMind Pro in a MAC OS (Leopard)
    via by aribe...@gmail.com,
    • org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter] for bean with name 'mbeanExporter' defined in null; nested exception is java.lang.ClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter not found from bundle [eu.educator.orm] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177) at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:288) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:145) at com.springsource.server.kernel.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:82) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter not found from bundle [eu.educator.orm] at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103) at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.springframework.util.ClassUtils.forName(ClassUtils.java:211) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138) ... 11 more Caused by: com.springsource.server.osgi.framework.ServerClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter in ServerBundleClassLoader: [bundle=eu.educator.orm_1.0.0] at com.springsource.server.osgi.framework.equinox.ServerBundleClassLoader.loadClass(ServerBundleClassLoader.java:136) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:313) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1274) at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99) ... 16 more Caused by: java.lang.ClassNotFoundException: com.springsource.server.kernel.dm.ServerAnnotationMBeanExporter at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at com.springsource.server.osgi.framework.equinox.ServerBundleClassLoader.loadClass(ServerBundleClassLoader.java:134) ... 21 more
    No Bugmate found.