在Spring MVC应用程序中使用CXF创建SOAP客户端时出错

时间:2012-08-08 09:02:29

标签: java spring java-ee cxf java-ee-6

我是Spring框架的新手,这个问题可能很愚蠢。但请为此错误提供解决方案。

我在尝试使用Apache CXF运行使用基于SOAP的Web服务的Spring MVC应用程序时遇到以下错误。

    INFO: Starting service Catalina
Aug 08, 2012 2:09:28 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
Aug 08, 2012 2:09:29 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(D:\rtProjectsWS\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\dataservice-client\WEB-INF\lib\geronimo-servlet_2.5_spec-1.1.2.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Aug 08, 2012 2:09:29 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(D:\rtProjectsWS\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\dataservice-client\WEB-INF\lib\geronimo-servlet_3.0_spec-1.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
SLF4J: The requested version 1.6 by your slf4j binding is not compatible with [1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/rtProjectsWS/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/dataservice-client/WEB-INF/lib/slf4j-jdk14-1.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/rtProjectsWS/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/dataservice-client/WEB-INF/lib/slf4j-log4j12-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
Aug 08, 2012 2:09:29 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Aug 08, 2012 2:09:29 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
    at org.apache.commons.logging.impl.SLF4JLocationAwareLog.info(SLF4JLocationAwareLog.java:159)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:194)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

我按照以下步骤创建项目:

  1. 通过在STS IDE中选择MVC模板来创建Spring MVC项目。
  2. 使用向导生成CXF SOAP客户端。
  3. 通过添加以下行修改了spring配置。

  4. 提前致谢。

1 个答案:

答案 0 :(得分:1)

也许this帖子可以提供帮助或this。它基本上说你有版本冲突或旧版本的slf4j。