gpt4 book ai didi

debugging - 如何调试 beanshell 脚本?

转载 作者:行者123 更新时间:2023-12-02 02:37:59 25 4
gpt4 key购买 nike

我在调试 beanshell 脚本时遇到了麻烦,但我一直得到的是:

异常调用导入的对象方法。 :在第 194 行:在文件中:内联评估:``import java.lang.reflect.InvocationTargetException;导入 java.util.Arrays;一世 。 . . '' : migrateModels (models, apiManager, isSAPRetailImportCondition, isSAPAFSCondition)

从方法调用:initMissingImportSources:在行:-1:在文件::
目标异常:java.lang.reflect.InvocationTargetException

at bsh.BshMethod.invoke(Unknown Source)
at bsh.BshMethod.invoke(Unknown Source)
at bsh.Name.invokeLocalMethod(Unknown Source)
at bsh.Name.invokeMethod(Unknown Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHBlock.evalBlock(Unknown Source)
at bsh.BSHBlock.eval(Unknown Source)
at bsh.BshMethod.invokeImpl(Unknown Source)
at bsh.BshMethod.invoke(Unknown Source)
at bsh.BshMethod.invoke(Unknown Source)
at bsh.This.invokeMethod(Unknown Source)
at ImportSourceMigration.initMissingImportSources(BeanShell Generated via ASM (www.objectweb.org))
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at bsh.Reflect.invokeMethod(Unknown Source)
at bsh.Reflect.invokeObjectMethod(Unknown Source)
at bsh.Name.invokeMethod(Unknown Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHBlock.evalBlock(Unknown Source)
at bsh.BSHBlock.eval(Unknown Source)
at bsh.BSHBlock.eval(Unknown Source)
at bsh.BSHTryStatement.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.servlet.BshServlet.evalScript(Unknown Source)
at bsh.servlet.BshServlet.doGet(Unknown Source)

我正在尝试使用此代码检索完整的堆栈跟踪
    try {
migration.initMissingImportSources();
} catch (java.lang.Throwable e) {
print(ExceptionUtils.getFullStackTrace(e));
}

是否有可能检索导致异常?

非常感谢。

最佳答案

你真正在做什么“ExceptionUtils.getFullStackTrace()”?您确定它正在打印嵌套异常吗?

关于debugging - 如何调试 beanshell 脚本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/475025/

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