Oracle 堆栈跟踪行号与源代码不匹配!

发布于 2024-10-11 04:05:56 字数 344 浏览 4 评论 0原文

我从 Oracle 得到堆栈跟踪,说第 299 行有问题。没问题,我查看了有问题的包中的该行,并说这是初始化块中将变量设置为 1 的行,但没有调用引发错误的过程。

根据堆栈跟踪中的行号,服务器正在执行的内容与我在查看包源代码时看到的内容之间似乎不匹配。

我如何查看包:我使用 PL/SQL Developer 并单击对象浏览器中包名称上的“View Pacakge”。当我在源代码管理中查看同一个包时,第 299 行的错误是有意义的(这是对失败过程的调用)。

所以我的问题是:这是怎么回事?当我向 Oracle 询问 pacakge 源代码时,为什么我得到的源代码似乎与堆栈跟踪行号不匹配?

(甲骨文10克)

I got a stack trace from Oracle saying there was a problem on Line 299. No problem, I looked at that line in the package in question, and say that it's a line in an initialization block that sets a variable to 1, and does not call the procedure that raised the error.

It looks like there's a mismatch between what the server is executing and what I am seeing when I view the package source, based on the line number in the stack trace.

How I looked at the package: I used PL/SQL Developer and clicked "View Pacakge" on the package name in the object browser. When I looked at the same package in source control, an error on Line 299 makes sense (it's a call to the procedure that failed).

So my question is: WTF is going on? Why do I get source code that doesn't seem to match the stack trace line numbers when I ask Oracle for the pacakge source?

(oracle 10g)

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

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

发布评论

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

评论(2

风吹雨成花 2024-10-18 04:05:56

我认为您已经在 PL/SQL Developer 中打开了该包的源代码。当您再次选择查看源代码时,它会激活之前打开的编辑器,而无需重新加载源代码。

I think you already got the source of that package opened in PL/SQL developer. When you choose View Source again, it activates the previously opened editor, without reloading the source.

踏雪无痕 2024-10-18 04:05:56

事实证明,我的脚本引用了 API_USR.SOME_PACKAGE 并且我以 READONLY_USR 身份登录,并且 READONLY_USR 拥有旧版本的 SOME_PACKAGE。当我通过 READONLY_USR 查看 API_USR.SOME_PACKAGE 时,我得到了正确的源代码。

脸掌

So it turns out that my script was referencing API_USR.SOME_PACKAGE and I was logged in as READONLY_USR and READONLY_USR owns an older version of SOME_PACKAGE. When I viewed API_USR.SOME_PACKAGE via READONLY_USR I got the right source code.

face-palm

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