开发者

JSP IllegalArgumentException: com.sun.xml.messaging.saaj.soap.LocalString != com.sun.xml.internal.messaging.saaj.soap.LocalStrings problem

I'm creating a program that communicates with a webservice, which is written with JSP and Struts. But when I want to create a new instance of the webservice I get the following error:

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

Which occurs in the following code of my 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 and VakProxy is automatically generated using the wsdl document.

I'm developing in Eclipse and a deploying the program on a Tomcat server. T开发者_StackOverflow社区he webserver runs with JAX-WS 2.2.3

Does anybody know a solution for this problem?

Thanks in advance!


You have multiple different versioned SAAJ libraries in your webapp's runtime classpath. SAAJ is already bundled with JDK. Probably you have some saaj-*.jar file in your webapp's /WEB-INF/lib which is conflicting with JDK-bundled SAAJ library. Cleanup it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜