I downloaded it, ran it, and it seems to be working for me:

http://localhost:8080/services/hello/hi

returns "WOWO YEYE".

I did have to specify Java8 in my IDE or else it had some fits.

On Thu, Dec 20, 2018 at 8:34 AM patrik hansson
<[email protected]> wrote:
>
> Ok, well it has a @Path annotation. So it must be a bug?
>
>
> https://github.com/hannehanen/NotWorkingCFXSpringBootRS/blob/master/src/main/java/com/firstPackage/secondPackage/RestApi.java
>
>
> ________________________________
> Från: James Carman <[email protected]>
> Skickat: den 20 december 2018 14:27
> Till: users
> Ämne: Re: CXF-SpringBoot-JaxRs BUG
>
> The issue is that it is scanning for a JAX-RS resource class
> (something with the @Path annotation), but not finding one.  You can
> see a working example here:
>
> https://github.com/jaxxy-rs/jaxxy/tree/master/example
>
>
> On Thu, Dec 20, 2018 at 7:28 AM [email protected]
> <[email protected]> wrote:
> >
> > Hello.
> > I have created the "ticket" on stackoverflow: 
> > https://stackoverflow.com/questions/53692716/very-simple-apache-cxf-spring-boot-jax-rs-app?answertab=oldest#tab-top
> >
> > The problem is that i can not start the application.
> > The application is located here: 
> > https://github.com/hannehanen/NotWorkingCFXSpringBootRS
> >
> > The whole log is here (tracktrace is a bit down):
> >
> >   .   ____          _            __ _ _
> >  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
> > ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
> >  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
> >   '  |____| .__|_| |_|_| |_\__, | / / / /
> >  =========|_|==============|___/=/_/_/_/
> >  :: Spring Boot ::        (v2.0.5.RELEASE)
> >
> > 2018-12-20 07:15:18.522  INFO 5824 --- [           main] 
> > com.firstPackage.StarterPoint            : Starting StarterPoint on Bettan 
> > with PID 5824 (C:\Users\Patrik\IdeaProjects\FixMePlease\target\classes 
> > started by Patrik in C:\Users\Patrik\IdeaProjects\FixMePlease)
> > 2018-12-20 07:15:18.522  INFO 5824 --- [           main] 
> > com.firstPackage.StarterPoint            : No active profile set, falling 
> > back to default profiles: default
> > 2018-12-20 07:15:18.628  INFO 5824 --- [           main] 
> > ConfigServletWebServerApplicationContext : Refreshing 
> > org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@558bdf1f:
> >  startup date [Thu Dec 20 07:15:18 CET 2018]; root of context hierarchy
> > 2018-12-20 07:15:19.257  INFO 5824 --- [           main] 
> > o.s.b.f.xml.XmlBeanDefinitionReader      : Loading XML bean definitions 
> > from class path resource [META-INF/cxf/cxf.xml]
> > WARNING: An illegal reflective access operation has occurred
> > WARNING: Illegal reflective access by 
> > org.springframework.cglib.core.ReflectUtils$1 
> > (file:/C:/Users/Patrik/.m2/repository/org/springframework/spring-core/5.0.9.RELEASE/spring-core-5.0.9.RELEASE.jar)
> >  to method 
> > java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
> > WARNING: Please consider reporting this to the maintainers of 
> > org.springframework.cglib.core.ReflectUtils$1
> > WARNING: Use --illegal-access=warn to enable warnings of further illegal 
> > reflective access operations
> > WARNING: All illegal access operations will be denied in a future release
> > 2018-12-20 07:15:20.261  INFO 5824 --- [           main] 
> > o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 
> > 8080 (http)
> > 2018-12-20 07:15:20.291  INFO 5824 --- [           main] 
> > o.apache.catalina.core.StandardService   : Starting service [Tomcat]
> > 2018-12-20 07:15:20.291  INFO 5824 --- [           main] 
> > org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache 
> > Tomcat/8.5.34
> > 2018-12-20 07:15:20.301  INFO 5824 --- [ost-startStop-1] 
> > o.a.catalina.core.AprLifecycleListener   : Loaded APR based Apache Tomcat 
> > Native library [1.2.14] using APR version [1.6.2].
> > 2018-12-20 07:15:20.301  INFO 5824 --- [ost-startStop-1] 
> > o.a.catalina.core.AprLifecycleListener   : APR capabilities: IPv6 [true], 
> > sendfile [true], accept filters [false], random [true].
> > 2018-12-20 07:15:20.301  INFO 5824 --- [ost-startStop-1] 
> > o.a.catalina.core.AprLifecycleListener   : APR/OpenSSL configuration: 
> > useAprConnector [false], useOpenSSL [true]
> > 2018-12-20 07:15:21.388  INFO 5824 --- [ost-startStop-1] 
> > o.a.catalina.core.AprLifecycleListener   : OpenSSL successfully initialized 
> > [OpenSSL 1.0.2l  25 May 2017]
> > 2018-12-20 07:15:21.488  INFO 5824 --- [ost-startStop-1] 
> > o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded 
> > WebApplicationContext
> > 2018-12-20 07:15:21.488  INFO 5824 --- [ost-startStop-1] 
> > o.s.web.context.ContextLoader            : Root WebApplicationContext: 
> > initialization completed in 2881 ms
> > 2018-12-20 07:15:21.793  INFO 5824 --- [ost-startStop-1] 
> > o.s.b.w.servlet.ServletRegistrationBean  : Servlet dispatcherServlet mapped 
> > to [/]
> > 2018-12-20 07:15:21.803  INFO 5824 --- [ost-startStop-1] 
> > o.s.b.w.servlet.ServletRegistrationBean  : Servlet CXFServlet mapped to 
> > [/services/hello/*]
> > 2018-12-20 07:15:21.803  INFO 5824 --- [ost-startStop-1] 
> > o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 
> > 'characterEncodingFilter' to: [/*]
> > 2018-12-20 07:15:21.803  INFO 5824 --- [ost-startStop-1] 
> > o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 
> > 'hiddenHttpMethodFilter' to: [/*]
> > 2018-12-20 07:15:21.803  INFO 5824 --- [ost-startStop-1] 
> > o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 
> > 'httpPutFormContentFilter' to: [/*]
> > 2018-12-20 07:15:21.803  INFO 5824 --- [ost-startStop-1] 
> > o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 
> > 'requestContextFilter' to: [/*]
> > 2018-12-20 07:15:21.903  INFO 5824 --- [           main] 
> > o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path 
> > [/**/favicon.ico] onto handler of type [class 
> > org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
> > 2018-12-20 07:15:22.101  INFO 5824 --- [           main] 
> > s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: 
> > org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@558bdf1f:
> >  startup date [Thu Dec 20 07:15:18 CET 2018]; root of context hierarchy
> > 2018-12-20 07:15:22.183  INFO 5824 --- [           main] 
> > s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public 
> > org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, 
> > java.lang.Object>> 
> > org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
> > 2018-12-20 07:15:22.183  INFO 5824 --- [           main] 
> > s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped 
> > "{[/error],produces=[text/html]}" onto public 
> > org.springframework.web.servlet.ModelAndView 
> > org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
> > 2018-12-20 07:15:22.213  INFO 5824 --- [           main] 
> > o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] 
> > onto handler of type [class 
> > org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
> > 2018-12-20 07:15:22.213  INFO 5824 --- [           main] 
> > o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto 
> > handler of type [class 
> > org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
> > 2018-12-20 07:15:22.373 ERROR 5824 --- [           main] 
> > o.a.cxf.jaxrs.AbstractJAXRSFactoryBean   : No resource classes found
> > 2018-12-20 07:15:22.373  WARN 5824 --- [           main] 
> > ConfigServletWebServerApplicationContext : Exception encountered during 
> > context initialization - cancelling refresh attempt: 
> > org.springframework.beans.factory.BeanCreationException: Error creating 
> > bean with name 'jaxRsServer' defined in class path resource 
> > [org/apache/cxf/jaxrs/spring/SpringComponentScanServer.class]: Bean 
> > instantiation via factory method failed; nested exception is 
> > org.springframework.beans.BeanInstantiationException: Failed to instantiate 
> > [org.apache.cxf.endpoint.Server]: Factory method 'jaxRsServer' threw 
> > exception; nested exception is 
> > org.apache.cxf.service.factory.ServiceConstructionException
> > 2018-12-20 07:15:22.373  INFO 5824 --- [           main] 
> > o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
> > 2018-12-20 07:15:22.393  INFO 5824 --- [           main] 
> > ConditionEvaluationReportLoggingListener :
> >
> > Error starting ApplicationContext. To display the conditions report re-run 
> > your application with 'debug' enabled.
> > 2018-12-20 07:15:22.413 ERROR 5824 --- [           main] 
> > o.s.boot.SpringApplication               : Application run failed
> >
> > org.springframework.beans.factory.BeanCreationException: Error creating 
> > bean with name 'jaxRsServer' defined in class path resource 
> > [org/apache/cxf/jaxrs/spring/SpringComponentScanServer.class]: Bean 
> > instantiation via factory method failed; nested exception is 
> > org.springframework.beans.BeanInstantiationException: Failed to instantiate 
> > [org.apache.cxf.endpoint.Server]: Factory method 'jaxRsServer' threw 
> > exception; nested exception is 
> > org.apache.cxf.service.factory.ServiceConstructionException
> > at 
> > org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:590)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
> >  ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
> >  ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
> >  ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
> > at 
> > org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780)
> >  ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
> > at 
> > org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412)
> >  ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
> > at 
> > org.springframework.boot.SpringApplication.run(SpringApplication.java:333) 
> > ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
> > at 
> > org.springframework.boot.SpringApplication.run(SpringApplication.java:1277) 
> > ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
> > at 
> > org.springframework.boot.SpringApplication.run(SpringApplication.java:1265) 
> > ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
> > at com.firstPackage.StarterPoint.main(StarterPoint.java:11) ~[classes/:na]
> > Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
> > instantiate [org.apache.cxf.endpoint.Server]: Factory method 'jaxRsServer' 
> > threw exception; nested exception is 
> > org.apache.cxf.service.factory.ServiceConstructionException
> > at 
> > org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > at 
> > org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > .. 18 common frames omitted
> > Caused by: org.apache.cxf.service.factory.ServiceConstructionException: null
> > at 
> > org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:225)
> >  ~[cxf-rt-frontend-jaxrs-3.2.7.jar:3.2.7]
> > at 
> > org.apache.cxf.jaxrs.spring.AbstractSpringConfigurationFactory.createJaxRsServer(AbstractSpringConfigurationFactory.java:57)
> >  ~[cxf-rt-frontend-jaxrs-3.2.7.jar:3.2.7]
> > at 
> > org.apache.cxf.jaxrs.spring.AbstractSpringComponentScanServer.createJaxRsServer(AbstractSpringComponentScanServer.java:133)
> >  ~[cxf-rt-frontend-jaxrs-3.2.7.jar:3.2.7]
> > at 
> > org.apache.cxf.jaxrs.spring.SpringComponentScanServer.jaxRsServer(SpringComponentScanServer.java:29)
> >  ~[cxf-rt-frontend-jaxrs-3.2.7.jar:3.2.7]
> > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
> > Method) ~[na:na]
> > at 
> > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> >  ~[na:na]
> > at 
> > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >  ~[na:na]
> > at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
> > at 
> > org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
> >  ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
> > .. 19 common frames omitted
> > Caused by: org.apache.cxf.service.factory.ServiceConstructionException: No 
> > resource classes found
> > at 
> > org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.checkResources(AbstractJAXRSFactoryBean.java:317)
> >  ~[cxf-rt-frontend-jaxrs-3.2.7.jar:3.2.7]
> > at 
> > org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:160)
> >  ~[cxf-rt-frontend-jaxrs-3.2.7.jar:3.2.7]
> > .. 27 common frames omitted
> >
> >
> > Process finished with exit code 1
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >

Reply via email to