[英]Calling main function from java stored procedure
I have loaded the class file of a java program (that fetches data from an excel file and pushes it to a database and making connection to database using values from properties file) into the SQL developer. 我已经将Java程序的类文件(从Excel文件中获取数据并将其推入数据库并使用属性文件中的值建立与数据库的连接)加载到SQL开发人员中。
Now I am trying to invoke the main method of the class file as below: 现在,我尝试按以下方式调用类文件的main方法:
CREATE OR REPLACE PROCEDURE dataset
AS LANGUAGE JAVA
NAME 'data_design_1.main()';
It gives the following error: 它给出以下错误:
Error: PL/SQL: Compilation unit analysis terminated
Error(3,1): PLS-00311: the declaration of "data_design_1.main()" is incomplete or malformed
Could anyone tell me why is this error occurring?? 谁能告诉我为什么会发生此错误?
Thank you. 谢谢。
I think that the declaration of your main is this 我认为你的主要宣言是这个
public static void main(String[] args)
so the declaration of your PL/SQL wrapper is wrong. 因此您的PL / SQL包装器的声明是错误的。
You haven't posted the Java code Maybe I'm wrong. 您尚未发布Java代码也许我错了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.