2012-08-08 69 views
0

我是Spring框架的新手,这个问题可能很愚蠢。但请提供解决此错误的方法。在Spring MVC应用程序中使用CXF创建SOAP客户端时出错

我在尝试运行使用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. 创建Spring MVC的项目在STS IDE选择MVC模板。
  2. 使用向导生成的CXF SOAP客户端。
  3. 通过添加以下行修改了spring配置。

在此先感谢。

回答

1

也许this可以帮忙或this。它基本上说你有一个版本冲突或旧版本的slf4j。

+0

感谢您的回复。另外我发现我无法使用CXF,AXIS 2和Java-WS,它说WSDL无效。所以我尝试使用axis并生成代理,并将它用于Spring MVC。有用 .... :) – Leejoy 2012-08-13 17:32:55

相关问题