我在使用「org.apache.cxf.archetype:cxf-jaxrs-service」maven原型構建一個RESTful Web服務。當我在Apache Tomee部署它,我得到以下錯誤:錯誤在Apache Tomee上運行CXF REST Web服務
SEVERE: Context initialization failed 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 ... ... Caused by: org.apache.cxf.service.factory.ServiceConstructionException at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:219) ... ... Caused by: java.lang.ClassCastException: Cannot cast org.apache.cxf.management.jmx.InstrumentationManagerImpl to org.apache.cxf.management.InstrumentationManager*
我的猜測是我錯過了一些配置,但我以爲原型會「只是工作」。
任何想法?