【问题标题】:JSP IllegalArgumentException: com.sun.xml.messaging.saaj.soap.LocalString != com.sun.xml.internal.messaging.saaj.soap.LocalStrings problemJSP IllegalArgumentException: com.sun.xml.messaging.saaj.soap.LocalString != com.sun.xml.internal.messaging.saaj.soap.LocalStrings 问题
【发布时间】:2011-05-08 14:32:42
【问题描述】:

我正在创建一个与 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 服务器上。网络服务器使用 JAX-WS 2.2.3 运行

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

提前致谢!

【问题讨论】:

    标签: java eclipse jsp tomcat struts


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-08
      • 1970-01-01
      • 1970-01-01
      • 2016-09-07
      • 2010-11-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多