Hi all,
I got the following error while deploying my .war file in Application
Server.

[2014-10-06 09:47:55,271] ERROR
{org.apache.catalina.core.ApplicationContext} -  StandardWrapper.Throwable

org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]:
Initialization of bean failed; nested exception is
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.wso2.projecttracker.services.ProjectServices] for bean with name
'serviceBean' defined in URL
[jndi:/localhost/projecttracker/WEB-INF/cxf-servlet.xml]; nested exception
is java.lang.ClassNotFoundException:
org.wso2.projecttracker.services.ProjectServices

Related cause:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.wso2.projecttracker.services.ProjectServices] for bean with name
'serviceBean' defined in URL
[jndi:/localhost/projecttracker/WEB-INF/cxf-servlet.xml]; nested exception
is java.lang.ClassNotFoundException:
org.wso2.projecttracker.services.ProjectServices

Related cause:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.wso2.projecttracker.services.ProjectServices] for bean with name
'serviceBean' defined in URL
[jndi:/localhost/projecttracker/WEB-INF/cxf-servlet.xml]; nested exception
is java.lang.ClassNotFoundException:
org.wso2.projecttracker.services.ProjectServices

Related cause:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.wso2.projecttracker.services.ProjectServices] for bean with name
'serviceBean' defined in URL
[jndi:/localhost/projecttracker/WEB-INF/cxf-servlet.xml]; nested exception
is java.lang.ClassNotFoundException:
org.wso2.projecttracker.services.ProjectServices

Related cause:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.wso2.projecttracker.services.ProjectServices] for bean with name
'serviceBean' defined in URL
[jndi:/localhost/projecttracker/WEB-INF/cxf-servlet.xml]; nested exception
is java.lang.ClassNotFoundException:
org.wso2.projecttracker.services.ProjectServices

Related cause:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.wso2.projecttracker.services.ProjectServices] for bean with name
'serviceBean' defined in URL
[jndi:/localhost/projecttracker/WEB-INF/cxf-servlet.xml]; nested exception
is java.lang.ClassNotFoundException:
org.wso2.projecttracker.services.ProjectServices

Related cause:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find
class [org.wso2.projecttracker.services.ProjectServices] for bean with name
'serviceBean' defined in URL
[jndi:/localhost/projecttracker/WEB-INF/cxf-servlet.xml]; nested exception
is java.lang.ClassNotFoundException:
org.wso2.projecttracker.services.ProjectServices

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:526)

at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)

at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)

at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)

at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)

at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)

at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)

at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)

at
org.apache.cxf.transport.servlet.CXFServlet.createSpringContext(CXFServlet.java:160)

at org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:74)

at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:71)

at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1267)

at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1186)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1081)

at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5027)

at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)

at
org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:280)

at
org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp(CarbonTomcat.java:177)

at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment(TomcatGenericWebappsDeployer.java:222)

at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment(TomcatGenericWebappsDeployer.java:174)

at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment(TomcatGenericWebappsDeployer.java:141)

at
org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy(TomcatGenericWebappsDeployer.java:116)

at
org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp(AbstractWebappDeployer.java:140)

at
org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy(AbstractWebappDeployer.java:90)

at
org.wso2.carbon.webapp.deployer.WebappDeployer.deploy(WebappDeployer.java:42)

at
org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)

at
org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)

at
org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)

at
org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)

at
org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)

at
org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)

at
org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)

at
org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)

at
org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:79)

at
org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:124)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)

at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)

at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)

at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)

at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)

at java.lang.Thread.run(Thread.java:695)


My cxf-servlet.xml looks like below and I am sure the expected class is
available.

<jaxrs:server id="projectService" address="/projects">
 <jaxrs:serviceBeans><ref bean="serviceBean"/></jaxrs:serviceBeans>
</jaxrs:server>

<bean id="serviceBean"
class="org.wso2.projecttracker.services.ProjectServices"/>

​​What could be the reason for the above error?

​Thanks​,
-- 
*Madusanka Premaratne* | Associate Software Engineer
WSO2, Inc | lean. enterprise. middleware.
#20, Palm Grove, Colombo 03, Sri Lanka
Mobile: +94 71 835 70 73| Work: +94 112 145 345
Email: madusan...@wso2.com | Web: www.wso2.com
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to