org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'services': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException

Apache's JIRA Issue Tracker | Srikanth Hugar | 3 years ago
  1. 0

    cxf-issues - [jira] [Commented] (CXF-5654) org.apache.cxf.service.factory.ServiceConstructionException: No resource classes found

    nabble.com | 1 year ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'services': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException
  2. 0

    cxf-issues - [jira] [Commented] (CXF-5654) org.apache.cxf.service.factory.ServiceConstructionException: No resource classes found

    nabble.com | 7 months ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'services': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException
  3. 0

    [CXF-5654] org.apache.cxf.service.factory.ServiceConstructionException: No resource classes found - ASF JIRA

    apache.org | 1 year ago
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'services': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I Written simple REST interface using CXF and trying to deploy in Apache karaf, but could not succeed. Seems like issue with latest version. All the dependencies and configuration seems to be fine. Please find the more details below. ----------------------------------------------------------------------------------------------------------------------------------------------- Error message: ----------------------------------------------------------------------------------------------------------------------------------------------- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'services': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)[80:org.springframework.context:3.2.4.RELEASE] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[102:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[102:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[102:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[102:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[103:org.springframework.osgi.extender:1.2.1] at java.lang.Thread.run(Thread.java:744)[:1.7.0_45] Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:210) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_45] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1608)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1549)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)[78:org.springframework.beans:3.2.4.RELEASE] ... 14 more Caused by: org.apache.cxf.service.factory.ServiceConstructionException: No resource classes found at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:316) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:154) ... 21 more ----------------------------------------------------------------------------------------------------------------------------------------------- context xml file ----------------------------------------------------------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd"> <jaxrs:server id="services" address="/"> <jaxrs:properties> <entry key="org.apache.cxf.jaxrs.mediaTypeCheck.strict" value="true" /> </jaxrs:properties> <jaxrs:serviceBeans> <bean id="loggerResource" class="com.polycom.cloudAxis.logger.rest.service.impl.LoggerResourceImpl"> <property name="loggerManager" ref="loggerManagerService"></property> </bean> </jaxrs:serviceBeans> </jaxrs:server> <osgi:reference id="loggerManagerService" interface="com.polycom.cloudAxis.loggermanagement.service.LoggerManager"></osgi:reference> </beans> ----------------------------------------------------------------------------------------------------------------------------------------------- MANIFEST.MF entries: ----------------------------------------------------------------------------------------------------------------------------------------------- Manifest-Version: 1 Bnd-LastModified: 1395904500980 Build-Jdk: 1.7.0_45 Built-By: shugar Bundle-ManifestVersion: 2 Bundle-Name: CloudAxis :: Shared Services :: Application Services :: Log ger service :: Logger Rest Service Bundle-SymbolicName: logger-rest-service Bundle-Version: 1.0.0.SNAPSHOT Created-By: Apache Maven Bundle Plugin Export-Package: com.polycom.cloudAxis.logger.rest.service;uses:="javax.w s.rs,javax.ws.rs.core";version="1.0.0.SNAPSHOT" Import-Package: com.polycom.cloudAxis.logger.rest.service,com.polycom.cl oudAxis.loggermanagement.service;version="[1.0,2)",javax.ws.rs;version= "[1.1,2)",javax.ws.rs.core;version="[1.1,2)",org.slf4j;version="[1.6,2) " Tool: Bnd-1.43.0

    Apache's JIRA Issue Tracker | 3 years ago | Srikanth Hugar
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'services': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException
  6. 0

    I Written simple REST interface using CXF and trying to deploy in Apache karaf, but could not succeed. Seems like issue with latest version. All the dependencies and configuration seems to be fine. Please find the more details below. ----------------------------------------------------------------------------------------------------------------------------------------------- Error message: ----------------------------------------------------------------------------------------------------------------------------------------------- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'services': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)[80:org.springframework.context:3.2.4.RELEASE] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[102:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[102:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[102:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[102:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[103:org.springframework.osgi.extender:1.2.1] at java.lang.Thread.run(Thread.java:744)[:1.7.0_45] Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:210) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_45] at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_45] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1608)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1549)[78:org.springframework.beans:3.2.4.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)[78:org.springframework.beans:3.2.4.RELEASE] ... 14 more Caused by: org.apache.cxf.service.factory.ServiceConstructionException: No resource classes found at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:316) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:154) ... 21 more ----------------------------------------------------------------------------------------------------------------------------------------------- context xml file ----------------------------------------------------------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd"> <jaxrs:server id="services" address="/"> <jaxrs:properties> <entry key="org.apache.cxf.jaxrs.mediaTypeCheck.strict" value="true" /> </jaxrs:properties> <jaxrs:serviceBeans> <bean id="loggerResource" class="com.polycom.cloudAxis.logger.rest.service.impl.LoggerResourceImpl"> <property name="loggerManager" ref="loggerManagerService"></property> </bean> </jaxrs:serviceBeans> </jaxrs:server> <osgi:reference id="loggerManagerService" interface="com.polycom.cloudAxis.loggermanagement.service.LoggerManager"></osgi:reference> </beans> ----------------------------------------------------------------------------------------------------------------------------------------------- MANIFEST.MF entries: ----------------------------------------------------------------------------------------------------------------------------------------------- Manifest-Version: 1 Bnd-LastModified: 1395904500980 Build-Jdk: 1.7.0_45 Built-By: shugar Bundle-ManifestVersion: 2 Bundle-Name: CloudAxis :: Shared Services :: Application Services :: Log ger service :: Logger Rest Service Bundle-SymbolicName: logger-rest-service Bundle-Version: 1.0.0.SNAPSHOT Created-By: Apache Maven Bundle Plugin Export-Package: com.polycom.cloudAxis.logger.rest.service;uses:="javax.w s.rs,javax.ws.rs.core";version="1.0.0.SNAPSHOT" Import-Package: com.polycom.cloudAxis.logger.rest.service,com.polycom.cl oudAxis.loggermanagement.service;version="[1.0,2)",javax.ws.rs;version= "[1.1,2)",javax.ws.rs.core;version="[1.1,2)",org.slf4j;version="[1.6,2) " Tool: Bnd-1.43.0

    Apache's JIRA Issue Tracker | 3 years ago | Srikanth Hugar
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'services': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException

    7 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.cxf.service.factory.ServiceConstructionException

      No resource classes found

      at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources()
    2. Apache CXF Runtime JAX-RS Frontend
      JAXRSServerFactoryBean.create
      1. org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:316)
      2. org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:154)
      2 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_45]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_45]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_45]
      4. java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_45]
      4 frames
    4. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1608)[78:org.springframework.beans:3.2.4.RELEASE]
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1549)[78:org.springframework.beans:3.2.4.RELEASE]
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1479)[78:org.springframework.beans:3.2.4.RELEASE]
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)[78:org.springframework.beans:3.2.4.RELEASE]
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)[78:org.springframework.beans:3.2.4.RELEASE]
      6. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)[78:org.springframework.beans:3.2.4.RELEASE]
      7. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[78:org.springframework.beans:3.2.4.RELEASE]
      8. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)[78:org.springframework.beans:3.2.4.RELEASE]
      9. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[78:org.springframework.beans:3.2.4.RELEASE]
      10. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)[78:org.springframework.beans:3.2.4.RELEASE]
      10 frames
    5. Spring Context
      AbstractApplicationContext.finishBeanFactoryInitialization
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)[80:org.springframework.context:3.2.4.RELEASE]
      1 frame
    6. Spring OSGi Core
      AbstractDelegatedExecutionApplicationContext.completeRefresh
      1. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[102:org.springframework.osgi.core:1.2.1]
      2. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[102:org.springframework.osgi.core:1.2.1]
      3. org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[102:org.springframework.osgi.core:1.2.1]
      4. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[102:org.springframework.osgi.core:1.2.1]
      4 frames
    7. org.springframework.osgi
      DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run
      1. org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[103:org.springframework.osgi.extender:1.2.1]
      1 frame
    8. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:744)[:1.7.0_45]
      1 frame