Display invalid pattern name while calling the procedure inside the package
Hi ,
I'am trying to call a package which is having procedure ,from JDBC in which one of the return type is Varray from the procedure.When i'am calling the procedure inside the package
from java showing invalid name pattern name.Just i'am placing the code snippet for package and calling java through package.
Package body
create or replace package body Rewards_Summary_Package as
PROCEDURE Rewards_Summary_Procedure
(v_Tot_Earned_Points OUT NUMBER, v_TOT_REDEEMED OUT NUMBER, v_TOT_PTS_EXP OUT NUMBER,
v_TOT_AVAILABLE OUT NUMBER, v_TIER_NAME OUT VARCHAR2,VA OUT t_varray,V_PR_CON_ID IN VARCHAR2) AS
v_ACCRUALED_VAL NUMBER := 0;
v_USED_VAL NUMBER := 0;
/*v_TOT_ACCRUALED_VAL NUMBER := 0;
v_TOT_USED_VAL NUMBER := 0;
V_PR_TIER_ID VARCHAR2(30);
V_PR_CON_ID VARCHAR2(30);
V_EXPIRY_DT DATE;
v_month varchar2(30);
v_date date;
v_next_month_date date;
v_TIER_NAME VARCHAR2(50);
v_TOT_AVAILABLE NUMBER := 0;
v_EARNED NUMBER := 0;
v_TOT_EARNED NUMBER := 0;
v_TOT_REDEEMED NUMBER := 0;
v_TOT_EXPIRED NUMBER := 0;
v_EARNED_TOTAL NUMBER := 0;
v_TOT_EXPIRED_MONTH NUMBER := 0;
v_TOT_PTS_EXP NUMBER := 0;
v_TOT_RDMD_CANCELLED NUMBER :=0;
v_TOT_EARNED_POINTS NUMBER :=0;*/
v_FIRST_DT DATE;
v_LAST_DT DATE;
v_MEMBER_ID VARCHAR2(30);
V_EXPIRED_VAL Number;
v_TOT_PRDPTS_RDMD NUMBER := 0;
v_TOT_PTS_RDMD NUMBER := 0;
v_CAN_ACCRUAL_POINTS NUMBER := 0;
BEGIN
/*TotalRwdPoints and Tier Name*/
SELECT TR.NAME,MEM.POINT_TYPE_A_VAL,MEM.ROW_ID INTO v_TIER_NAME,v_TOT_AVAILABLE,v_MEMBER_ID
FROM SIEBEL.S_LOY_MEMBER MEM, SIEBEL.S_LOY_TIER TR WHERE MEM.PR_DOM_TIER_ID=TR.ROW_ID
AND MEM.PR_CON_ID=V_PR_CON_ID;
vTotPrdPtsRdmd
SELECT NVL(SUM(A.VALUE),0) INTO v_TOT_PRDPTS_RDMD from SIEBEL.S_LOY_RDM_ITM A,SIEBEL.S_LOY_ATTRDEFN B
WHERE A.MEMBER_ID = v_MEMBER_ID AND A.ATTRB_DEFN_ID = B.ROW_ID AND b.INTERNAL_NAME = 'Point 1 Value' AND A.TYPE_CD='Product'
AND A.TXN_ID IS NOT NULL;
vTotPtsRdmd
SELECT NVL(SUM(A.VALUE),0) INTO v_TOT_PTS_RDMD from SIEBEL.S_LOY_RDM_ITM A,SIEBEL.S_LOY_ATTRDEFN B
WHERE A.MEMBER_ID = v_MEMBER_ID AND A.ATTRB_DEFN_ID = B.ROW_ID AND b.INTERNAL_NAME = 'Point 1 Value' AND (A.TYPE_CD='Product' or A.TYPE_CD='Transfer')
AND A.TXN_ID IS NOT NULL;
vTotRewardPtExp
SELECT NVL(SUM(A.VALUE),0) INTO v_TOT_PTS_EXP FROM SIEBEL.S_LOY_RDM_ITM A,SIEBEL.S_LOY_ATTRDEFN B
WHERE A.MEMBER_ID = v_MEMBER_ID AND A.ATTRB_DEFN_ID = B.ROW_ID AND b.INTERNAL_NAME = 'Point 1 Value' AND A.TYPE_CD='Expired'
AND a.TXN_ID IS NULL;
vCanAccrualPoints
SELECT NVL(SUM(A.ACCRUALED_VALUE),0) INTO v_CAN_ACCRUAL_POINTS from SIEBEL.S_LOY_ACRL_ITM A,SIEBEL.S_LOY_ATTRDEFN B
WHERE A.MEMBER_ID = v_MEMBER_ID AND A.ATTRIB_DEFN_ID = B.ROW_ID AND b.INTERNAL_NAME = 'Point 1 Value' AND A.TYPE_CD='Cancellation';
v_Tot_Earned_Points := v_TOT_AVAILABLE+v_TOT_PRDPTS_RDMD+v_TOT_PTS_EXP-v_CAN_ACCRUAL_POINTS;
v_TOT_REDEEMED := v_TOT_PTS_RDMD-v_CAN_ACCRUAL_POINTS;
DBMS_OUTPUT.PUT_LINE(' Total Earned: '|| v_Tot_Earned_Points || ' Total Redeemed: '|| v_TOT_REDEEMED || ' Total Expired: '|| v_TOT_PTS_EXP
|| ' Balance Points: '|| v_TOT_AVAILABLE || ' Tier Name: '|| v_TIER_NAME);
select trunc(sysdate,'MONTH') INTO v_FIRST_DT from dual;
va:= t_varray(Null,Null,Null,Null,Null,Null);
FOR a in 1 .. 6 LOOP
select trunc(last_day(v_FIRST_DT)) INTO v_LAST_DT from dual;
SELECT SUM(AI.ACCRUALED_VALUE),SUM(AI.USED_VALUE) INTO v_ACCRUALED_VAL,v_USED_VAL from SIEBEL.S_LOY_ACRL_ITM AI,SIEBEL.S_LOY_ATTRDEFN A
WHERE AI.MEMBER_ID = v_MEMBER_ID AND A.ROW_ID = AI.ATTRIB_DEFN_ID AND A.INTERNAL_NAME = 'Point 1 Value'
AND trunc(AI.EXPIRATION_DT) >= v_FIRST_DT AND trunc(AI.EXPIRATION_DT) <= v_LAST_DT;
V_EXPIRED_VAL := NVL(v_ACCRUALED_VAL-v_USED_VAL,0);
va(a):=V_EXPIRED_VAL;
v_FIRST_DT := add_months(v_FIRST_DT,1);
End loop;
END;
end;
Package declaration
create or replace package Rewards_Summary_Package as
TYPE t_varray IS VARRAY(6) OF NUMBER;
PROCEDURE Rewards_Summary_Procedure
(v_Tot_Earned_Points OUT NUMBER, v_TOT_REDEEMED OUT NUMBER, v_TOT_PTS_EXP OUT NUMBER,
v_TOT_AVAILABLE OUT NUMBER, v_TIER_NAME OUT VARCHAR2,VA OUT t_varray,V_PR_CON_ID IN VARCHAR2);
end;
java code
I had tried using java types and Oracle types
conn=SiebelServiceDatasource.getConnection(SSBConstants.REWARDS_PROP_LOG_SUFIX);
// ArrayDescriptor.TYPE_VARRAY
ocstmt=(OracleCallableStatement)conn.prepareCall(" {call REWARDS_SUMMARY_PACKAGE.REWARDS_SUMMARY_PROCEDURE(?,?,?,?,?,?,?)}");
//ocstmt=(OracleCallableStatement)conn.prepareCall(" call Test_Array(?,?)");
ocstmt.registerOutParameter(1,OracleTypes.INTEGER);
ocstmt.registerOutParameter(2,OracleTypes.INTEGER);//1-616BH
ocstmt.registerOutParameter(3,OracleTypes.INTEGER);
ocstmt.registerOutParameter(4,OracleTypes.INTEGER);
ocstmt.registerOutParameter(5,OracleTypes.VARCHAR);
ocstmt.registerOutParameter(6,OracleTypes.ARRAY,"SIEBEL.T_VARRAY");
ocstmt.setString(7,contactSiebelRowId);
ocstmt.execute();
Showing the following invalid name pattern SIEBEL.T_VARRAY
Please help
Thanks in advance
Kiran
create or replace package Rewards_Summary_Package as
TYPE t_varray IS VARRAY(6) OF NUMBER;
end;You've declared your type inside the package. You need to declare it as a SQL type, which is not part of a PL/SQL package.
Similar Messages
-
Conversion of java Array to oracle SQL Array while calling Stored Procedure
How java Array can be converted to oracle SQL array while calling Stored procedure with callable statement.
i.e java Array ---> Sql Array in Oracle while setting the datatypes to callable statement arguments.Look at:
http://forum.java.sun.com/thread.jsp?forum=48&thread=376735&tstart=0&trange=15
Paul -
ORA-17002 and ORA-17009 while calling Stored Procedures
Hi,
We are developing a JDBC application using WebLogic 6.0 as AppServer. When we
rolled out the application in production, things work fine for about a day or
so, then calls to Stored Procedures start giving ORA-17002 (io exception) and
ORA-17009 (Closed Statement) exceptions while calling Stored Procedures. Restarting
the server 'fixes' the problem for one more day.... We are not able to reproduce
this behaviour in test or development servers.
Can anybody suggest something.....
Regards,
Usman.Usman wrote:
>
Hi,
We are developing a JDBC application using WebLogic 6.0 as AppServer. When we
rolled out the application in production, things work fine for about a day or
so, then calls to Stored Procedures start giving ORA-17002 (io exception) and
ORA-17009 (Closed Statement) exceptions while calling Stored Procedures. Restarting
the server 'fixes' the problem for one more day.... We are not able to reproduce
this behaviour in test or development servers.
Can anybody suggest something.....
Regards,
Usman.Hi. Describe how you are obtaining and using pool connections. Also, do download the
latest thin driver from Oracle, because they have recently fixed some serious
bugs in it.
Let me know,
Joe -
Calling a procedure in the loop
Just want to know one thing :
I am calling a procedure with the following parameters
DECLARE
PROFIT_CENTER NUMBER;
BEGIN
PROFIT_CENTER:= 1109 --( Similarly I am running the proc for 5 more profit_centers 1123,1132,1122,3211,1111 one by one by passing values manually, it is taking almost a minute for each profit center)
Prc_test_calc ( PROFIT_CENTER);
COMMIT;
END;
For each profit_center proc is taking 1 mins (Approx) time.
But when I am trying to loop it to call the procedure for each profit_center , I don’t know for what reason it is taking too much time for each profit_center
Please let me know is there anything wrong with the below loop
DECLARE
PROFIT_CENTER NUMBER;
cursor c_profit is
select distinct PROFIT_CENTER from plng_pc where profit_center in (1109, 1123,1132,1122,3211,1111); -- Plng_pc is a table from where profit_center information is getting fetched
BEGIN
For pc_rec in c_profit
loop
Prc_test_calc ( pc_rec .PROFIT_CENTER );
COMMIT;
End loop;
END;
Could you please sugget me if something is going wrong?That depends on what the code is doing inside the proc, however how do you know that the select is not consuming more time and it is the procedure only. Your select -
select distinct PROFIT_CENTER from plng_pc where profit_center in (1109, 1123,1132,1122,3211,1111);
Is there a need to be commit inside the loop. It seems incomprehensible to me. -
Call a procedure in the application. Frank kindly check this
Hi,
I hv downloaded the login screen from the following site. Now I am trying to connect the same with my database. i hv introduced the password field in the application as earlier only username is available in the UI.
[http://blogs.oracle.com/shay/simpleJSFDBlogin.zip]
The problem is that in my database password field is protected with inbuilt oracle encryption. There is a procedure i hv in the database for the password encryption. How can I call the Procedure in the application??? In the application i hv introduced the business components and i hv attached the procedure in the application like "Offline Database Source" I hv to attach each database source like this? is it right way which i am following to call the procedure??
Please guide me
Thanks in advance
Jithesh.Hi,
have a look at the developer guide of how to invoke stored procedures and functions. Instead of basing the query for the login form on a VO you use a stored procedure of function in a client method exposed on the VO or AM
http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcadvgen.htm#sm0297
Frank -
Call a function inside a package from a stored procedure
Hello:
I am kind of new to the stored procedure. Does anyone know how to call a function inside a package from another stored procedure?
I have a existing function (func_b) inside a package (pack_a) and it returns a cursor. I want to call this function from a stored procedure (proc_c) so that I use the data inside the cursor.
can I do the following in proc_c:
my_cursor1 SYS_REFCURSOR;
begin
my_cursor1 := exec pack_a.func_b
end
It will be very helpful if anyone can point me to any reading or example. Thank you very much for your information.guys:
Thank you for your information so far. I need some more help here. I was able to run the function in my stored procedure. However, I was not able to print the result on the screen to view the cursor result, although I am using dbms_output.put_line statement inside my stored procedure.
I use the following statement to execute my stored procedure on sql*plus. I can tell the stored procedure is executed successfully, but I did see anything printed:
DECLARE TEMP VARCHAR2(100);
BEGIN PROC_LAWS_CAD_NAME_SEARCH('LPD', 'TEST DEVICE ID', 'TEST LAST NAME', 'TEST FIRST NAME', 'F', '11112009', TEMP); END;
I tried to use 'set serveroutput on' and got the following error:
ERROR:
ORA-06502: PL/SQL: numeric or value error: host bind array too small
ORA-06512: at line 1
I am kind of confused now. thank you for your help.
Jack
Here is my procedure:
create or replace
PROCEDURE PROC_SEARCH
( AGENCY_ID IN VARCHAR2,
DEVICE_ID IN VARCHAR2,
L_NAME IN VARCHAR2,
F_NAME IN VARCHAR2,
SEX IN VARCHAR2,
DOB IN VARCHAR2,
CAD_NAME_SCH_RESULT_STR OUT VARCHAR2)
AS
v_agy_id varchar2(10);
v_device_id varchar2(20);
v_l_name varchar2(25);
v_f_name varchar2(15);
v_sex varchar2(1);
v_dob date;
-- this cursor is going to be used to store a list of warrant matching
-- name search criteria
cad_srch_cursor sys_refcursor;
objSrch SEARCH_RESULT_TEMP%ROWTYPE;
BEGIN
cad_srch_cursor := SEARCH_PKG.SEARCH('TESTING', 'TESTER', null, null,null, null, getPhonetic('TESTING'));
LOOP
FETCH cad_srch_cursor INTO objSrch;
EXIT WHEN cad_srch_cursor%NOTFOUND;
--insert into SEARCH_RESULT_TEMP (name_last) values (objSrch.name_last);
CAD_NAME_SCH_RESULT_STR := objSrch.name_last;
dbms_output.put_line('First:'||objSrch.name_first||':Last:'||objSrch.name_last||':Middle:'||objSrch.name_middle);
end LOOP;
END PROC_LAWS_SEARCH;
----------------------------------------- -
XSQL calling a procedure or a package
Hi all,
I am trying to call a procedure or a package from a .xsql file.
1) Is it possible ?
2) How to send the variables for the procedure, same as @name etc..
3) and in case there are some fields returning how do I exhibit it on the page, using the .xsl file.
I need these details urgently, if somebody could help I will be very thankful.
ShanthiThe next major release of the XSQL Servlet is ready, but won't be posted on OTN for another week or so.
Ozawa-san has been helping us test
some of the new Multibyte-aware
features/fixes that we've made
along with all the new features we've
added for the 0.9.8.5 release.
The <xsql:dml> tag is one of many
new useful tags that have been added
based on user feedback from this forum. -
Help on ORA-06550 & PLS-00363 Error while running a procedure from a packag
Greeting All,
I ran the following procedure from a package on a command line in sqlplus:
SQL> exec QUALITY_ASSURANCE.COPY_SW_RESOURCES(2009,2010,9508);Where '2009' is the old fiscal year, '2010' is the new fiscal year and '9508' is the error code passed from the calling program. But, I received the following error messages:
ERROR at line 1:
ORA-06550: line 1, column 53:
PLS-00363: expression '9508' cannot be used as an assignment target
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Any thoughts, suggestions and/or advice to resolve these errors.
Thanks in advance.Orchid wrote:
Justin,
Thanks for your response and information. Yes, Theoa was correct the 3rd parameter is an OUT variable, and it is a numeric field. The procedure was called by a form as follows:
QUALITY_ASSURANCE.COPY_SW_RESOURCES(:BLK_CONTROL.FROMFY,:BLK_CONTROL.TOFY,V_ERR);But the form does not work so I am trying to isolate the problem by running the procedure by itself in sqlplus to make sure there is no problem with the procedure.
Yesterday, I was able to run the procedure in Toad for Oracle to a successful completion by providing the 3 parameters: (2009, 2010, null). Just wonder why I cannot run the same procedure with the same parameters on a command line in sqlplus as follows:
exec QUALITY_ASSURANCE.COPY_SW_RESOURCES(2009,2010,null);So, if I understand your suggestion correctly, in order to run the procedure with the 3 parameter successfully in sqlplus,
I have to declare the 3rd parameter in PL/SQL. That is to create a PL/SQL file as suggested and run the file, correct? CORRECT! -
Query for getting all function and procedure inside the packages
hi All
Please provide me Query for getting all function and procedure inside the packages
thanksAs Todd said, you can use user_arguments data dictionary or you can join user_objects and user_procedures like below to get the name of the packaged function and procedure names.
If you are looking for the packaged procedures and functions source then use user_source data dictionary
select a.object_name,a.procedure_name from user_procedures a,
user_objects b
where a.object_name is not null
and a.procedure_name is not null
and b.object_type='PACKAGE'
and a.object_name=b.object_name -
Call Stored Procedure inside a db trigger
Is that possible to call stored procedure inside a db trigger ?
I User this code:
Create Or Replace Trigger Sale.Send_Auto_Email_Trg
After Insert
On Sale.Sale_Technical_Support
--Referencing New As New Old As Old
For Each Row
Declare
Pragma Autonomous_Transaction;
vn_count Number := 0;
vn_msg Number;
vv_exec Varchar2(5000);
Begin
If Inserting And :New.Ticket_Status = 2 Then
Begin
Begin
Select Count(*)
Into vn_count
From Sale_Technical_Support
Where Sending_Flag = 1
And Support_Type = 2;
Exception When No_Data_Found Then
vn_count := 0;
End;
If vn_count >= 1 And :New.Problem_Desc Is Not Null Then
Technical_Support_Mailing('[email protected]', -- To
'[email protected]',
'[email protected]', -- Bcc
'[email protected]', -- From
'رموز وصلاحيات',
2);
End If;
End;
End If;
End;
/No errors but the procedure doesn't executed !!!!!1) If you are using autonomous transactions for anything other that writing log data that you want to preserve even if the triggering transaction fails, you're probably doing something wrong. There is no reason to use an autonomous transaction here.
2) You don't want to send email from a trigger. You don't want to do anything non-transactional in a trigger. Oracle will, for example, rollback and re-execute parts of a statement for write consistency. If you send email in a trigger, you may get multiple emails for a single update. You may also get emails for updates that were never committed. And if the email server happens to be down, your transactions will fail.
3) If you use an autonomous transaction, the trigger will have a completely different transaction context from the parent. So when you query the table within the trigger, you won't be able to see any of the uncommitted changes including the changes that caused the trigger to fire. My guess is that you are assuming that the row that you inserted is visible to the trigger.
Justin -
My computer wont recognize my iphone 4. when i plug it into any computer it doesnt charge. i followed the procedure on the website but the device manager still says unknown device. any ideas how to fix this??? the weird thing is it use to work until yesterday. thanks
Will it charge when connected to a wall outlet? The USB port on your computer must be 2.0
Powering Apple and third party peripherals through USB -
I created a book and tried to place order but failed. I followed the procedures, when the book completed uploading, the message "An error occured uploading your order" appeard. There was no error message all along when I created the book. I tried several time but failed.
preview the order and try again - http://support.apple.com/kb/HT1040
If it still does not work boot into Safe Mode, preview again and try
With the number of reports in the last few days it may be server overload - if so trying during a time of lower activity might help
LN -
Please tell me the procedure to the run the interactive alv in the backgrou
please tell me the procedure to the run the interactive OO alv in the background?
Edited by: ramyav on Apr 4, 2008 3:56 PMHi,
If u want to run the interactive ALV in background how do u trigger At line-selection event? -
Thunderbolt Display Firmware 1.2 broke the USB inside the display.
So, I've had problems with this working since it came out.
I'm running a MBP Retina, 10.0.1 Yosemite.
TB Display (TBD) is on FW 1.2.
Just figured out,
When the MBP sleeps, then wakes, the USB inside the TBD is dead...no more.
Here's the things that won't work:
Audio
The ports (USB) on the rear of the TBD.
The Display FaceTime Camera.
This also kills the ports on the MBP until the TBD is disconnected...then everything on the MBP is fine.
Reconnect TBD, it works fine too...until the MBP sleeps...then it dies.
Anyone know how to downgrade firmware?
I've also checked the system report, everything is showing "connected" ... and all the firmwares are current.Have you tried o boot in recovery mode with Option down? when I do that I don't have the choice anymore to choose the startup disk. I discovered that On most portables, a yosemite install will convert your hard drive or SSD into a core storage volume. A core storage volume is used for things like fusion drives and more importantly file vault encryption. It seems that this core storage volume is the cause of the power loss in the TB display. I found out that
It is possible to revert the CS volume back to a normal volume (if you haven't encrypted it yet). I did that and all the power problem in my thunderbolt display are gone!
Run these 2 commands in a terminal.
diskutil cs list
and then
diskutil coreStorage revert lvUUID
where lvUUID is the last lvUUID reported by the previous Terminal command.
Then restart for everything to get back to normal after you have run these commands in Terminal.
Then also the recovery partition will show up again in the startup manager when you boot up with the option key. -
Is there any way to print the data inside the Notes field of MIR6 Report
Hello Gurús.
We need to include the data inside the Notes field in the report MIR6 - INVOICE OVERVIEW - report.
Is there any way to print the data inside (comments) the Notes field as well in the Report ?
We found that the only way is to open the Notes and print it, but it takes time, any idea ?
Rgds.
MCM.There's nothing built-in that does that. If you only have text fields and they don't have any formatting or other property that would prevent it (e.g., Date, character limit), you can run a simple script to populate each field with the field name, and then print. A more complicated approach would be a script that adds text annotations near/over each field that shows the field name. This would just be for documentation purposes, but it's possible. Post again if you'd like help with the first. You'll probably have to pay someone for the second approach if you don't want to do it yourself.
Maybe you are looking for
-
Hi, Could someone suggest me a good book covering core java security (not J2EE)?. I'm looking for a book that covers all security related APIs that are part of Java 2 SDK 1.3.x + JSSE + JCE + JAAS or Java 2 SDK 1.4.x. Any help would be highly appreci
-
CO-PA Realignment: Changes in Product Hierarchy
Hello all, We have changed the product hierarchy on some of our materials and we want to realign the PA data to reflect the same. Our product hierarchy which we have three levels is maintained in KES1. There are no derivation rules. KES1 is updated m
-
Hi, I have created a BSP in SEM-BPS using the web interface builder. In my BSP I have a planning function that starts a background job. I would like to give the users a web based link to SM37. Is there an easy way for someone with limited BSP expe
-
Row wise init block has no value defination.
Hi Experts, I ahve requirement where i need to pick the department of loged in users in dashboard prompt. So I created the session variable with row wise and written the query: SELECT DISTINCT 'Department', Department_Name FROM tableA WHERE A.LOGIN_I
-
Center thumbnail in an image using show thumbnail behaviour
Hi there everybody Still having some trouble and no replies from other post so will simplify my question......... Is it possible to center a thumb in the middle of an image ? or the center of a table cell? A thumb that is dynamically generated using