Hi there! I'm Bryan Lor, an application developer from Minnesota, and this is my site where I share things about coding, app development, and things I've been working on. To know more, go to the "About" page below!

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]

at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]

at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191)[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180)[spring-boot-1.3.3.RELEASE.jar:1.3.3.RELEASE]

at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:317) ~[cxf-rt-frontend-jaxrs-3.1.6.jar:3.1.6]

at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:159) ~[cxf-rt-frontend-jaxrs-3.1.6.jar:3.1.6]

... 26 common frames omitted

Resolution to the above:
Make sure that whatever classes you have, that are going to be beans (@Service, @Component, etc.), that do not have the JAX-RS annotations such as @Path, those bean classes without the JAX-RS annotations will need to implement the interface or class that is serving as the service class. Confused? Sorry, I wish I could explain it a bit better, but here's an example.

Imagine you have a PersonService interface and a PersonServiceEndpoint class like so: (By the way, the below will throw the error)

Another possible solution is to move the @Service back to the PersonService class too, but you'll have refactor that class. Just make sure that your beans are declared properly so that JAX-RS can find it.