【问题标题】:Integrating PL/JSON with Oracle APEX 4.0将 PL/JSON 与 Oracle APEX 4.0 集成
【发布时间】:2010-08-29 19:34:48
【问题描述】:

我试图在我的 Oracle APEX 应用程序中使用 PL/JSON,但是当我尝试运行 Hello, world example 时出现以下错误(当我从 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 但无济于事。如果有人能指出我正确的方向,我将不胜感激。我在 Google 上搜索了几个小时,但还没有找到回答我的问题或帮助解释问题所在以及如何解决我的问题的帖子/页面。

提前致谢!

【问题讨论】:

  • 不授予 PUBLIC 或 APEX_PUBLIC_USER 执行权限。
  • 您是否使用与 Apex 工作区关联的相同架构在 SQL*Plus 中进行测试?

标签: oracle oracle-apex ora-06550


【解决方案1】:

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

您链接到的页面使用 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

试用最新版本包中的示例。

【讨论】:

  • 感谢您的回复!不幸的是,这并没有帮助。 PL/JSON 在 Oracle APEX 之外工作。通过将 GET_VARCHAR2 更改为 GET_STRING,当我从 Oracle APEX 的 SQL 命令页面运行代码时,我收到以下类似的 GET_STRING 错误消息:
     PLS-00201: identifier 'JSON_EXT.GET_STRING' must be declared ORA-06550:第 7 行,第 5 列:PL/SQL:语句被忽略 
猜你喜欢
  • 1970-01-01
  • 2020-12-24
  • 1970-01-01
  • 2021-09-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多