eclipse com.sun.jdi.InvocationException 在 ognlRuntime 中调用方法错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14630964/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:54:47  来源:igfitidea点击:

com.sun.jdi.InvocationException occurred invoking method error in ognlRuntime

javaeclipsestruts2

提问by justified

I am getting "com.sun.jdi.InvocationException occurred invoking method" error when I debug in eclipse and is in ognlRuntime. The error occured when I am passing a value from jsp to the action class.

当我在 eclipse 中调试并且在 ognlRuntime 中时,我收到“com.sun.jdi.InvocationException 发生调用方法”错误。当我将值从 jsp 传递到操作类时发生错误。

This is the code in jsp for passing the value

这是jsp中传递值的代码

<s:textfield name="partReplace.part.number" cssStyle="width:50px;" value ="%{partReplace.part.number}"/></td>

and when I enter vlue in that textfield it is not setting in the action class. I debuuged and found the "com.sun.jdi.InvocationException occurred invoking method" error in ognlRuntime and it is not taking the value..

当我在该文本字段中输入 vlue 时,它​​没有在操作类中设置。我调试并在 ognlRuntime 中发现“com.sun.jdi.InvocationException发生调用方法”错误并且它没有取值..

回答by Andrea Ligios

Your problem seems to be the same of this question;

您的问题似乎与此问题相同;

if so, the guilty should be an incorrect override of the toString()method of your class, invoked by the Eclipse Debugger.

如果是这样,罪魁祸首应该是toString()您的类的方法的错误覆盖,由 Eclipse 调试器调用。

Correct your custom toString() method, or block him from throwing exceptions (a big try-catchinside) or remove it completely, and retry.

更正您的自定义 toString() 方法,或阻止他抛出异常(try-catch内部很大)或完全删除它,然后重试。

P.S: this is the first result on Google searching your Exception... and is on SO too :|

PS:这是谷歌搜索你的异常的第一个结果......而且也是如此:|