org.springframework.beans.factory.CannotLoadBeanClassException

Cannot find class [oracle.jdbc.pool.OracleDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource from [Module "deployment.RSAccessMgmt.war:main" from Service Module Loader]

Samebug tips1

Check if the version of resteasy is using is the same JBoss is using. To find it out, search for resteasy-jaxrs* in JBoss/Wildfly directory and at your pom.xml.

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

Solutions on the web580

  • Cannot find class [oracle.jdbc.pool.OracleDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource from [Module "deployment.RSAccessMgmt.war:main" from Service Module Loader]
  • via Google Groups by Manuel Gnerlich, 1 day ago
    Cannot find class [org.camunda.bpm.BpmPlatform] for bean with name 'processEngineService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.camunda.bpm.BpmPlatform from [Module "deployment.loanapproval-spring-0.1.0-SNAPSHOT.war:main" from Service Module Loader]
  • Cannot find class [org.primefaces.spring.scope.ViewScope] for bean with name 'org.primefaces.spring.scope.ViewScope#1299ebc' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.primefaces.spring.scope.ViewScope from [Module "deployment.Projet_sqli.war:main" from Service Module Loader]
  • Stack trace

    • org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [oracle.jdbc.pool.OracleDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource from [Module "deployment.RSAccessMgmt.war:main" from Service Module Loader] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)[spring-context-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)[spring-context-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)[spring-web-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)[spring-web-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)[spring-web-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850)[jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)[jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[rt.jar:1.7.0_07] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[rt.jar:1.7.0_07] at java.lang.Thread.run(Thread.java:722)[rt.jar:1.7.0_07] Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [oracle.jdbc.pool.OracleDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource from [Module "deployment.RSAccessMgmt.war:main" from Service Module Loader] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1261)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1330)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:317)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:298)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1132)[spring-context-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.detectHandlers(AbstractDetectingUrlHandlerMapping.java:75)[spring-webmvc-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.initApplicationContext(AbstractDetectingUrlHandlerMapping.java:58)[spring-webmvc-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119)[spring-context-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:72)[spring-web-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73)[spring-context-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:109)[spring-context-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:88)[spring-context-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] ... 19 more Caused by: java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource from [Module "deployment.RSAccessMgmt.war:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)[spring-core-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1282)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1253)[spring-beans-3.0.6.RELEASE.jar:3.0.6.RELEASE] ... 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

    3 times, 3 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    81 more bugmates