开发者

Oracle stack trace line number does not match source code!

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 开发者_StackOverflow中文版(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)


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.


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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜