简体   繁体   English

错误:PLS-00103:在预期以下情况之一时遇到符号“ AS”:返回

[英]Error: PLS-00103: Encountered the symbol “AS” when expecting one of the following:return

I know this is another "encountered the symbol..." topic but I cannot find another like this. 我知道这是另一个“遇到符号...”主题,但找不到另一个类似的主题。

create or replace function sendfromjar(url in varchar2, path in varchar2)
as language java
   name 'ro/myapp/sendsms.talk(java.lang.String, java.lang.String)';

and it raise this error: 并引发此错误:

    Compilation errors for FUNCTION SUMMIT1213_PTS.SENDFROMJAR

Error: PLS-00103: Encountered the symbol "AS" when expecting one of the following: return
Line: 2
Text: as language java

Error: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:

      pragma
Line: 3
Text: name 'ro/myapp/sendsms.talk(java.lang.String, java.lang.String)';

I am using Oracle 10g, and the jar is compiled with jdk 1.4 我正在使用Oracle 10g,并且jar是用jdk 1.4编译的

If I make it as a procedure it returns me 如果我将其作为程序,它将返回我

    Compilation errors for PROCEDURE SUMMIT1213_PTS.SENDFROMJAR

    Error: PLS-00311: the declaration of "ro/myapp/smsapp/SendSms.main(java.lang.String[])" is incomplete or malformed
Line: 3
Text: name 'ro/myapp/smsapp/SendSms.main(java.lang.String[])';

    Error: PL/SQL: Compilation unit analysis terminated 
Line: 1 
Text: create or replace procedure sendfromjar(url in varchar2)

I resolved it. 我解决了 I had to put all keywords in uppercase: 我必须将所有关键字都大写:

CREATE OR REPLACE PROCEDURE sendfromjar(url IN VARCHAR2)
AS LANGUAGE JAVA NAME  'ro/myapp/sendsms.main(java.lang.String[])';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 PLS-00103:预期以下情况之一时遇到符号“ TEST_PKG”: - PLS-00103: Encountered the symbol “TEST_PKG” when expecting one of the following: ; PLS-00103:在FlyWay中遇到符号“文件结尾” - PLS-00103: Encountered the symbol “end-of-file” in FlyWay PLS-00103:遇到符号“文件结束” - PLS-00103: Encountered the symbol “end-of-file” 使用Netbeans时出现此错误pls 103103 - I'm getting this error pls 00103 when using netbeans 尝试使用 Firebase 合并 Google SignIn 时遇到错误“无法解析符号 'mGoogleSignInClient'” - I encountered the error “Cannot resolve symbol 'mGoogleSignInClient'” when trying to incorporate Google SignIn using Firebase 下面的程序我们有一个错误无效的方法声明需要返回类型请解释我需要的程序o / p - below program we have one error invalid method declaration return type required pls explain the program i need o/p 以下方法何时返回 2 - When will following method return 2 当我返回一个数组时,我得到一个“找不到符号”的错误 - when I return an array, I get a “cannot find symbol” error Derby SQL语法错误:从一个数据库复制到另一个数据库时遇到“。” - Derby SQL Syntax error: Encountered “.” when copying from one database to another 使用Ant构建Android应用时遇到错误 - Encountered Error when Building Android App with Ant
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM