java.lang.IllegalArgumentException

发布于 2024-11-27 20:40:36 字数 2870 浏览 1 评论 0原文

我不是 Java 的初学者(我是 .NET 开发人员),但我必须修复通过代理类调用 WebMethod 时的 Java 错误。 在 .NET 中,我可以毫无问题地调用它,但在 Java 中,会发生这样的情况:

java.lang.IllegalArgumentException

at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    at weblogic.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1411)
    at weblogic.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1613)
    at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1174)
    at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:399)
    at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:1147)
    at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
    at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:147)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.verizon.vmw.csgw.ws.updateDOJob.v4_4.wsdl.UpdateDOJobServiceSoapBindingStub.updateDOJob(UpdateDOJobServiceSoapBindingStub.java:206)
    at com.verizon.vmw.csgw.ws.updateDOJob.v4_4.wsdl.UpdateDOJobServiceProxy.updateDOJob(UpdateDOJobServiceProxy.java:50)
    at rm.interfaces.wfadosnd.WfaDoSndWorker.updateDOJobComments(WfaDoSndWorker.java:1111)
    at rm.interfaces.wfadosnd.WfaDoSndWorker.checkEtaAsgn(WfaDoSndWorker.java:507)
    at rm.interfaces.wfadosnd.WfaDoSndWorker.resequenceDODispatches(WfaDoSndWorker.java:541)
    at rm.interfaces.wfadosnd.WfaDoSndWorker.processOutboundRows(WfaDoSndWorker.java:283)
    at rm.interfaces.wfadosnd.WfaDoSndWorker.run(WfaDoSndWorker.java:112)
    at rm.util.WorkerThread.run(ThreadPool.java:152)

有人知道什么可能导致此异常吗?

I'm less than a beginner in Java (I'm a .NET developer), but i have to fix a Java error when invoking a WebMethod through a proxy class.
From .NET, I can call it with no problems, but in Java, this is what happens:

java.lang.IllegalArgumentException

at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    at weblogic.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1411)
    at weblogic.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1613)
    at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1174)
    at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:399)
    at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:1147)
    at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
    at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:147)
    at javax.xml.parsers.SAXParser.parse(Unknown Source)
    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
    at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.verizon.vmw.csgw.ws.updateDOJob.v4_4.wsdl.UpdateDOJobServiceSoapBindingStub.updateDOJob(UpdateDOJobServiceSoapBindingStub.java:206)
    at com.verizon.vmw.csgw.ws.updateDOJob.v4_4.wsdl.UpdateDOJobServiceProxy.updateDOJob(UpdateDOJobServiceProxy.java:50)
    at rm.interfaces.wfadosnd.WfaDoSndWorker.updateDOJobComments(WfaDoSndWorker.java:1111)
    at rm.interfaces.wfadosnd.WfaDoSndWorker.checkEtaAsgn(WfaDoSndWorker.java:507)
    at rm.interfaces.wfadosnd.WfaDoSndWorker.resequenceDODispatches(WfaDoSndWorker.java:541)
    at rm.interfaces.wfadosnd.WfaDoSndWorker.processOutboundRows(WfaDoSndWorker.java:283)
    at rm.interfaces.wfadosnd.WfaDoSndWorker.run(WfaDoSndWorker.java:112)
    at rm.util.WorkerThread.run(ThreadPool.java:152)

Does anyone have any idea of what could be causing this exception?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

睫毛上残留的泪 2024-12-04 20:40:36

使用 Wireshark 检查网络上传输的内容,并将 .NET 请求与 java 请求进行比较。

Check with Wireshark what goes over the wire and diff the .NET request with the java request.

无需解释 2024-12-04 20:40:36

看起来您的 Web 应用程序正在接收一条消息,但其中一个字段未能验证其类型(或可接受的值)是否正确。

这是数据问题还是编码问题在很大程度上取决于数据、代码和意图,而这些都没有提供。

Looks like your web application was receiving a message, and one of its fields failed verification that it was the right type (or acceptable value).

Whether that was a data issue, or a coding issue depends heavily on the data, code, and intent which are all not provided.

帅的被狗咬 2024-12-04 20:40:36

从堆栈跟踪中的类名可以看出,异常是在 Web 服务响应的反序列化过程中引发的。

异常本身非常通用,因此几乎没有携带有用的信息。

尝试查看通过线路发送的响应,或者在 Eclipse 中设置异常断点,以便您可以检查抛出异常的堆栈帧以获取其他上下文。 (为了便于解释出了什么问题,您可能需要获取 Web 服务堆栈的源代码)。

As you can see from the class names in the stack trace, the exception is thrown during deserialization of the webservice response.

The exception itself is pretty generic and hence carries little useful information.

Try looking at the response sent over the wire, or set an exception breakpoint in eclipse so you can inspect the stack frames the exception is thrown to get additional context. (To ease interpretation of what went wrong, you'll probably want to procure the source code of your web service stack).

心安伴我暖 2024-12-04 20:40:36

在代码中查找针对用户输入进行解析的内容,

例如 Integer i = Integer.parseInt("string");

并且“string”不包含有效数字

look in the code for something is parsed for user input

like this Integer i = Integer.parseInt("string");

and the "string" contains none valid number

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文