将 PL/JSON 与 Oracle APEX 4.0 集成

发布于 2024-09-16 14:19:06 字数 919 浏览 3 评论 0原文

我尝试在 Oracle APEX 应用程序中使用 PL/JSON,但当我尝试运行 Hello, world 示例(当我从 SQL*PLUS 作为 sys 运行示例时,效果很好):

ORA-06550: line 2, column 20:
PLS-00905: object MY_SCHEMA.JSON is invalid
ORA-06550: line 2, column 20:
PL/SQL: Item ignored
ORA-06550: line 5, column 5:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 5, column 5:
PL/SQL: Statement ignored
ORA-06550: line 7, column 26:
PLS-00201: identifier 'JSON_EXT.GET_VARCHAR2' must be declared
ORA-06550: line 7, column 5:
PL/SQL: Statement ignored

我使用的 Oracle 数据库版本是 10g XE 。

我猜测我没有正确授予这些包的执行权限:JSON_EXT、JSON_PRINTER 和 JSON_PARSER。我尝试将这 3 个包的执行权限授予 public 和 APEX_PUBLIC_USER 但无济于事。如果有人能指出我正确的方向,我将非常感激。我在谷歌上搜索了几个小时,但还没有找到可以回答我的问题或帮助解释问题所在以及如何解决我的问题的帖子/页面。

提前致谢!

I am trying to use PL/JSON in my Oracle APEX application but get the following errors when I attempt to run a Hello, world example (which works fine when I run the example from SQL*PLUS as sys):

ORA-06550: line 2, column 20:
PLS-00905: object MY_SCHEMA.JSON is invalid
ORA-06550: line 2, column 20:
PL/SQL: Item ignored
ORA-06550: line 5, column 5:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 5, column 5:
PL/SQL: Statement ignored
ORA-06550: line 7, column 26:
PLS-00201: identifier 'JSON_EXT.GET_VARCHAR2' must be declared
ORA-06550: line 7, column 5:
PL/SQL: Statement ignored

The version of Oracle database that I am using is 10g XE.

I am guessing that I haven't granted execute privileges correctly on the packages: JSON_EXT, JSON_PRINTER, and JSON_PARSER. I have tried granting execute privileges on the 3 packages to public and APEX_PUBLIC_USER but to no avail. I would really appreciate it if someone could point me in the right direction. I have Google searched for several hours and have yet to come across a post/page that answers my problem or helps explain what is wrong and how I can go about resolving my problem.

Thanks in advance!

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

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

发布评论

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

评论(1

月亮坠入山谷 2024-09-23 14:19:06

如果您执行 DESC JSON_EXT,则没有 GET_VARCHAR2 函数(至少在版本 0.9.2 中)。有一个 GET_STRING 函数返回 VARCHAR2。

您链接到的页面使用 PL/JSON 版本 0.8.6,看起来他们在 0.9 中做了一些大的更改,

  Version: 0.9.0
WARNING: You cannot do an easy upgrade because of changes in the API
    Rewrote the API to increase speed and simplicity

请尝试最新版本的包中的示例。

If you do a DESC JSON_EXT, there isn't a GET_VARCHAR2 function (at least in version 0.9.2). There is a GET_STRING function that returns a VARCHAR2.

The page you link to uses PL/JSON version 0.8.6, and it looks like they've done some biggish changes in 0.9

  Version: 0.9.0
WARNING: You cannot do an easy upgrade because of changes in the API
    Rewrote the API to increase speed and simplicity

Try out the examples in the latest version of the package.

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