gpt4 book ai didi

java - JSP IllegalArgumentException : com. sun.xml.messaging.saaj.soap.LocalString != com.sun.xml.internal.messaging.saaj.soap.LocalStrings 问题

转载 作者:行者123 更新时间:2023-11-28 21:57:13 25 4
gpt4 key购买 nike

我正在创建一个与 Web 服务通信的程序,该程序是使用 JSP 和 Struts 编写的。但是当我想创建一个新的 web 服务实例时,出现以下错误:

SEVERE: Servlet.service() for servlet [FrontController] in context with path [/P3_GUI] threw exception [Servlet execution threw an exception] with root cause
java.lang.IllegalArgumentException: com.sun.xml.messaging.saaj.soap.LocalStrings != com.sun.xml.internal.messaging.saaj.soap.LocalStrings

它出现在我的 ActionClass 的以下代码中

 import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import vakws.Vak;
import vakws.VakService;

public class AddAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
AddForm myForm = (AddForm)form;

VakService service = new VakService();
Vak vakProxy = service.getVakPort();

boolean result = vakProxy.addVak(myForm.getVakName(), Double.parseDouble(myForm.getVakMark()));

if(!result){
return mapping.findForward("show_addError");
}
return mapping.findForward("show_addResults");
}
}

VakService和VakProxy是使用wsdl文档自动生成的。

我正在 Eclipse 中开发并将程序部署到 Tomcat 服务器上。 Web 服务器使用 JAX-WS 2.2.3 运行

有人知道这个问题的解决方案吗?

提前致谢!

最佳答案

您的网络应用程序的运行时类路径中有多个不同版本的 SAAJ 库。 SAAJ 已经与 JDK 捆绑在一起。可能您的 Web 应用程序的 /WEB-INF/lib 中有一些 saaj-*.jar 文件,它与 JDK 捆绑的 SAAJ 库冲突。清理它。

关于java - JSP IllegalArgumentException : com. sun.xml.messaging.saaj.soap.LocalString != com.sun.xml.internal.messaging.saaj.soap.LocalStrings 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5928040/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com