Jdbc provisioning rule

Hi Team,

I am trying to execute a Oracle function which is present under a package via JDBC Provisioning rule, but after raising the access request I am able to see the below error
“java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier ‘PKG_DEV_UTIL.CREATE_OPERATOR_NONADMIN’ must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored”.

Code for Calling a Function in the JDBC Provisioning Rule:

 CallableStatement cs = connection.prepareCall("{CALL pkg_dev_util.Create_Operator_NonAdmin(?,?,?,?,?,?,?)}");
		    			  
						
						  cs.setString ( 1, oper_id);
		    			          cs.setString ( 2, first_name);
                                                  cs.setString ( 3 , last_name);
						  cs.setString ( 4, ent);
						  cs.setString ( 5 , org);
						  cs.setString ( 6 , creOper);
						  cs.setString ( 7 , comments);
		    			          log.error("before excute");
						  cs.execute();
						  log.error("After excute");

Function (Package call) : PKG_DEV_UTIL (package name)

FUNCTION Create_Operator_NonAdmin

    (

       operId IN t_tkop_oper_profile.oper_id%TYPE,

       firstName IN t_tkop_oper_profile.fst_nm%TYPE,

       lastName IN t_tkop_oper_profile.lst_nm%TYPE,

       entSet IN t_tkes_entitlement_set.ent_set_name%TYPE,

       orgC IN t_tkog_org.org_c%TYPE,

       creOperId IN t_tkop_oper_profile.oper_id%TYPE,

       comment_in IN t_tkop_oper_profile.comments%TYPE DEFAULT null

    )

Can anyone help me fix the issue as I am stuck in development phase.

Kind Regards,
Sai Krishna L

Hi @sai_krishna_L , can you check whether the package PKG_DEV_UTIL and the procedure CREATE_OPERATOR_NONADMIN exist in the database . I hope this is a DB access error .

Can you let me know once done ?

Hi @sai_krishna_L only a lilttle suggestion if you let me. As they are pure jdbc, I always develop jdbc rules with eclipse (I am a little old and get used to it, but you can use any ide). Try to run this DB block on some ide, it wll accelerate your developing time. Then when it works, copy the block to the rule. If you have some parameters from the rule, you can mock the on code. Perhaps you will have to ask some vpn from cliente, or reproduce the DB in some DB engine of your network.

In this case, error comes from Oracle

‘PKG_DEV_UTIL.CREATE_OPERATOR_NONADMIN’ must be declared ORA-06550

means that package does not exist for that user. This does not necessary means that package does not exists, perhaps you have not been granted with permissions to see that package. Send entire message to DBA, they must be able to execute it with the same user that you are using.

Hi @sisvanthkumar,

I can see the package (PKG_DEV_UTIL) and the function (CREATE_OPERATOR_NONADMIN) present in the database.

Kind Regards,
Sai Krishna L

Hi @jsosa,

Sure. I have already Informed to the DBA to check the necessary permissions from there end.
One more question is it necessary to have permissions to all the tables present in the function(CREATE_OPERATOR_NONADMIN) ??

Kind Regards,
Sai Krishna L

Hi @sai_krishna_L !

I think that you have to have only permissions on the function, not on tables involved inside (you should not know what are perform inside the function or store procedure). You can ask DBA to test these functions with your connector user’s to verify that everything is working (or you can test, if you have access to DB).

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.