项目代码:
JaxWsServerFactoryBean jaxWsServerFactoryBean=new JaxWsServerFactoryBean();
jaxWsServerFactoryBean.setAddress("http://localhost:9901/Cxf1");
jaxWsServerFactoryBean.setServiceClass(HelloWImpl.class);
Server server = jaxWsServerFactoryBean.create();
server.start();
一、报错信息:Exceptionin thread "main" java.lang.NoSuchMethodError:org.slf4j.helpers.MessageFormatter.arrayFormat
二、报错位置:
Server server = jaxWsServerFactoryBean.create();
server.start();
三、解决:项目-右键-查看buid path,
将javaEE 6 libraries移除。
四、再次运行,OK。