Spring @weblogic上的Webservice注释异常
我正在尝试使用JDK1.6.031-b05中的JDeveloper11GR2(11.1.2.3.0)运行包含JAX WS(2.1)Webservice的应用程序。错误来自类上存在的@WebService注释。Spring @weblogic上的Webservice注释异常,spring,weblogic,jax-ws,jdeveloper,Spring,Weblogic,Jax Ws,Jdeveloper,我正在尝试使用JDK1.6.031-b05中的JDeveloper11GR2(11.1.2.3.0)运行包含JAX WS(2.1)Webservice的应用程序。错误来自类上存在的@WebService注释。 当我运行应用程序时,我得到以下错误 我尝试在DefaultDomain/lib目录中添加jaxws-api.jar&jws-api.jar,但没有成功 有没有关于如何解决此异常或如何强制weblogic使用jdk运行时类的线索?同一应用程序在独立weblogic上正常工作。您是否尝试在清
当我运行应用程序时,我得到以下错误
有没有关于如何解决此异常或如何强制weblogic使用jdk运行时类的线索?同一应用程序在独立weblogic上正常工作。您是否尝试在清单类path:属性中列出正确的jar?您还可以将jdk类放在应用程序中,并尝试使用FilteringClassLoader来指定要从应用程序而不是系统classloader中使用的类
我也有同样的问题,在这里找到了答案: 简言之,出现这个问题是因为类路径中有jaxb impl,它覆盖了WebLogics自己的jaxb,您可能没有从pom.xml显式引用这个依赖项,但其他一些依赖项确实如此。 在我的例子中,ApacheCXF作为maven依赖项,JAXB2.1.13作为作用域为“compile”的子依赖项。我所要做的就是排除这个apaches jaxb,并添加我自己的范围为“提供”的依赖项,以显式使用WebLogics jaxb 在pom.xml中,它如下所示:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.7.2</version>
<exclusions>
<exclusion>
<artifactId>jaxb-impl</artifactId>
<groupId>com.sun.xml.bind</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<scope>provided</scope>
<version>2.1.13</version>
</dependency>
org.apache.cxf
cxf rt前端jaxws
2.7.2
jaxb impl
com.sun.xml.bind
com.sun.xml.bind
jaxb impl
假如
2.1.13
您可以使用pom.xml视图中的eclipses“Dependency Hierarchy”选项卡或简单的命令行“mvn Dependency:tree”来了解jaxb impl是如何将其添加到类路径的。在我的例子中,我在操作的参数中输入了一个错误,其中两个参数具有相同的WebRAM名称。修改并部署后,问题得到解决。您是否找到了此问题的答案?
<prefer-web-inf-classes>true</prefer-web-inf-classes>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.7.2</version>
<exclusions>
<exclusion>
<artifactId>jaxb-impl</artifactId>
<groupId>com.sun.xml.bind</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<scope>provided</scope>
<version>2.1.13</version>
</dependency>