[英]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.