我正在使用Spring Jdbc开发一个连接到Oracle数据库以获取某些数据的Web服务。我试图使用SimpleJdbcCall
来调用数据库函数来获取Web服务响应的数据。但是当我尝试执行webservice方法时,我在响应正文中得到以下错误
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Server</faultcode>
<faultstring>org/springframework/jdbc/core/simple/SimpleJdbcCall.executeFunction(Ljava/lang/Class;Lorg/springframework/jdbc/core/namedparam/SqlParameterSource;)Ljava/lang/Object;</faultstring>
<detail>
<ns2:exception xmlns:ns2="http://jax-ws.dev.java.net/" class="java.lang.NoSuchMethodError" note="To disable this feature, set com.sun.xml.ws.fault.SOAPFaultBuilder.disableCaptureStackTrace system property to false">
<message>org/springframework/jdbc/core/simple/SimpleJdbcCall.executeFunction(Ljava/lang/Class;Lorg/springframework/jdbc/core/namedparam/SqlParameterSource;)Ljava/lang/Object;</message>
<ns2:stackTrace>
我搜索过NoSuchMethodError,发现了一些关于不同的编译和运行时依赖版本的东西。我检查了我的pom.xml,但我发现春季版没有任何区别。这是我的pom.xml
中的依赖项部分<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<!-- Spring and Transactions -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring-framework.version}</version>
</dependency>
<!-- Spring JDBC Support -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring-framework.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cn.guoyukun.jdbc</groupId>
<artifactId>oracle-ojdbc6</artifactId>
<version>11.2.0.3.0</version>
</dependency>
<dependency>
<groupId>args4j</groupId>
<artifactId>args4j</artifactId>
<version>2.32</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring-framework.version}</version> <!-- <version>4.0.2.RELEASE</version> -->
<type>jar</type>
</dependency>
<dependency>
<groupId>org.glassfish.metro</groupId>
<artifactId>webservices-rt</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<!-- Spring -->
<spring-framework.version>4.0.6.RELEASE</spring-framework.version>
</properties>
顺便说一句,我正在部署Weblogic 10.3.6