项目代码:
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。
本文介绍了一种常见的Java Web服务部署问题及其解决方案。在使用JAX-WS与CXF框架搭建Web服务时,遇到了由于Java EE 6库导致的NoSuchMethodError错误。文中详细记录了错误发生的具体位置,并提供了解决方案——移除项目构建路径中的Java EE 6库。


被折叠的 条评论
为什么被折叠?



