Error: PLS-00216: NUMBER precision constraint must be in range (1 .. 38)
While compiling one package i am getting the error>
PLS-00216: NUMBER precision constraint must be in range (1 .. 38)
The declaration is:
lServerImportRetVal number(40);
Database is Oracle10gdb.
Do i resize the variable to 38... is that advisable.?
last option is to change... Your only option is to change: Oracle supports a maximum of 38 digits.
(Why do you think you need 40 digits? What astronomical number are we talking about?)
Similar Messages
-
Reg: PLS-00418: array bind type must match PL/SQL table row type error
I am trying to access a table of records through JDBC OracleCallableStatement. I am able to do it fine for all mappings except for the ones below
TYPE CAT_CD_TYPE IS TABLE OF A.B %TYPE INDEX BY BINARY_INTEGER;
TYPE ORG_CD_TYPE IS TABLE OF C.D %TYPE INDEX BY BINARY_INTEGER;
Column B is CHAR(1) and Column D is CHAR(2). I am trying to register the out parameters of Oraclecallablestatement as
cstmt.registerIndexTableOutParameter(2, 2000, OracleTypes.CHAR, 0);
cstmt.registerIndexTableOutParameter(3, 2000, OracleTypes.CHAR, 0);
All the other mappings work fine. These two fail with the error
SQLException in invokeDBPackage() : ORA-06550: line 1, column 32:
PLS-00418: array bind type must match PL/SQL table row type
ORA-06550: line 1, column 35:
PLS-00418: array bind type must match PL/SQL table row type
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I tried other OracleTypes mappings too but no luck so far.
Any advice on this would be greatly appreciated.Hi,
I'm not sure it's reasonable to expect someone to sift through that much stuff.
Which parameter is it having a problem with?
Can you modify the following to reproduce the behavior?
Thanks
Greg
create package mypack5 as
TYPE v2array is table of emp.ename%type index by BINARY_INTEGER;
PROCEDURE test_it(thearray IN v2array, numrecs out number);
END;
CREATE or replace PACKAGE BODY MYPACK5 AS
PROCEDURE test_it(thearray IN v2array, numrecs out number)
IS
begin
numrecs := thearray.count;
END;
END;
using System;
using System.Data;
using Oracle.DataAccess.Client;
public class indexby
public static void Main()
OracleConnection con = new OracleConnection("data source=orcl;user id=scott;password=tiger;");
con.Open();
OracleCommand cmd = new OracleCommand("mypack5.test_it", con);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter Param1 = cmd.Parameters.Add("param1", OracleDbType.Varchar2);
Param1.Direction = ParameterDirection.Input;
Param1.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
Param1.Size = 3;
string[] vals = { "foo", "bar", "baz" };
Param1.Value = vals;
OracleParameter Param2 = cmd.Parameters.Add("param2", OracleDbType.Int32, DBNull.Value, ParameterDirection.Output);
cmd.ExecuteNonQuery();
Console.WriteLine("{0} records passed in", Param2.Value);
con.Close();
} -
PL/SQL: numeric or value error: number precision too large
hi ,
i am running my script and getting this error. i created a object and and make table type on this with fraction of number(2,2). and in my script i am calling a standard API which have hour in number only .i am also using a custome table also which also having number(2,2). so plz help me to resoulve thsi error.
description below:
DECLARE
l_Return_Status VARCHAR2 (30):=NULL;
l_Msg_Count NUMBER :=0;
l_Msg_Data VARCHAR2 (2000) := NULL;
v_Sape_Sco_info_Tbl SAPE_SCO_INFO_TBL;
v_Sape_Sco_info_rec SAPE_SCO_INFO_REC;
p_assignment number:=165316; -----165688;
p_project_id number:=74538; -----81993;
sco_id number:=10371;
BEGIN
v_Sape_Sco_info_Tbl := SAPE_SCO_INFO_TBL();
v_Sape_Sco_info_rec := SAPE_SCO_INFO_REC(p_assignment,p_project_id,sco_id,'15-Oct-2009','31-Oct-2009',15.00,'17-Oct-2009','20-Oct-2009','ADD_EXISTING_RESOURCES',02.50,NULL,'Y',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
v_Sape_Sco_info_Tbl.EXTEND;
v_Sape_Sco_info_Tbl(1) := v_Sape_Sco_info_rec;
SAPE_UPDATE_SCO_DETAILS_PKG.SCO_ROLE_INCREASE(
x_project_id =>p_project_id,
x_Assignment_Id =>p_assignment,
l_Sape_Sco_info_Tbl => v_Sape_Sco_info_Tbl,
x_called_function =>'ADD_EXISTING_RESOURCES',
x_Return_Status =>l_Return_Status,
x_Msg_Count =>l_Msg_Count,
x_Msg_Data =>l_Msg_Data
dbms_output.put_line('second Procedure executed sucessesfuly');
dbms_output.put_line('l_Return_Status '||l_Return_Status||' l_Msg_Count '||l_Msg_Count||'l_Msg_Data');
dbms_output.put_line('value'||' '||v_Sape_Sco_info_Tbl(1).Assignment_Id);
dbms_output.put_line('completed');
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqlerrm(sqlcode));
END;
error :PL/SQL: numeric or value error: number precision too large
CREATE OR REPLACE TYPE SAPE_PA.SAPE_SCO_INFO_TBL IS TABLE OF SAPE_SCO_INFO_REC;
Prompt OBJECT TYPE SAPE_PA.SAPE_SCO_INFO_REC
DROP TYPE SAPE_PA.SAPE_SCO_INFO_REC;
CREATE OR REPLACE TYPE SAPE_PA.SAPE_SCO_INFO_REC AS OBJECT
( Assignment_Id NUMBER,
project_id Number,
sco_id Number,
Role_START_DATE DATE,
Role_END_DATE DATE,
avg_hrs_per_day NUMBER(2,2),
sco_role_start_date DATE,
sco_role_end_date DATE,
sco_role_mode VARCHAR2(250),
sco_hrs_per_day NUMBER(2,2),
no_of_copies Number,
Active_Flag VARCHAR2(10),
BILLABLE_UPSIDE_INDICATIOR VARCHAR2(5),
RET_CODE VARCHAR2(5),
ERROR_MSG VARCHAR2(255),
ATTRIBUTE1 VARCHAR2(240),
ATTRIBUTE2 VARCHAR2(240),
ATTRIBUTE3 VARCHAR2(240),
ATTRIBUTE4 VARCHAR2(240),
NATTRIBUTE1 NUMBER,
NATTRIBUTE2 NUMBER
CREATE TABLE SAPE_PA.SAPE_SCO_STAFFING_MAPPINGS
( PROJECT_ID NUMBER,
SCO_ID NUMBER,
ASSIGNMENT_ID NUMBER PRIMARY KEY,
SCO_ROLE_START_DATE DATE,
SCO_ROLE_END_DATE DATE,
SCO_ROLE_HOURS NUMBER(2,2),
SCO_MODE VARCHAR2(80),
ACTIVE_FLAG VARCHAR2(5),
LAST_UPDATE_DATE DATE,
LAST_UPDATED_BY NUMBER(15,0),
CREATION_DATE DATE,
CREATED_BY NUMBER(15,0),
LAST_UPDATE_LOGIN NUMBER(15,0),
ATTRIBUTE1 VARCHAR2(240),
ATTRIBUTE2 VARCHAR2(240),
ATTRIBUTE3 VARCHAR2(240),
ATTRIBUTE4 VARCHAR2(240),
NATTRIBUTE1 NUMBER,
NATTRIBUTE2 NUMBER
)The problem here is with avg_hrs_per_day NUMBER(2,2)+ of SAPE_SCO_INFO_REC object.
user12226862 wrote:
CREATE OR REPLACE TYPE SAPE_PA.SAPE_SCO_INFO_REC AS OBJECT
( Assignment_Id NUMBER,
project_id Number,
sco_id Number,
Role_START_DATE DATE,
Role_END_DATE DATE,
avg_hrs_per_day NUMBER(2,2),
sco_role_start_date DATE,And while assigning the value it is:
user12226862 wrote:
v_Sape_Sco_info_rec := SAPE_SCO_INFO_REC(p_assignment,p_project_id,sco_id,'15-Oct-2009','31-
Oct-2009',15.00,'17-Oct-2009','20-
Oct-2009','ADD_EXISTING_RESOURCES',02.50,NULL,'Y',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);Note that number(2,2) means maximum total of digits in that case is 2 (including scale), not 4.
E.g.
SQL> declare
2 x number(2,2);
3 begin
4 x := 02.50;
5 end;
6 /
declare
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: number precision too large
ORA-06512: at line 4However, this works:
SQL> declare
2 x number(2,2);
3 begin
4 x := .50;
5 end;
6 /
PL/SQL procedure successfully completed.Cheers,
AA -
ERROR:number precision too large (WWV-16016)
Hi!
As I try to insert values into form items an error accurs:
ORA-06502: PL/SQL: numeric or value error: number precision too
large (WWV-16016)
P.S.-One form item inserts values into database table where
column is VARCHAR2, lenght 2000...
How can I fix this error?Thank you in advance!Table Structure:
ID NUMBER (5,0) , DATE_T1 DATE, ID_PROFESOR NUMBER(5,0), SUBJECT
VARCHAR2(50), MESSAGE VARCHAR2(2000).
The error accurs for example if I try to insert:
ID=1,DATE_T1=6.6.2001, ID_PROFESOR=3, SUBJECT="New uniforms",
MESSAGE="bla,bla,bla..."
I'm using Oracle portal version 8.1.2.
I hope, this will help you! -
ORA-06502: PL/SQL: numeric or value error: number precision too large
I am getting this error when my procedure is being invoked. I've checked if a calculation is attemting to assign an integer to a column that has a smaller data type...e.g 99 being inserted into NUMBER(2)....but this all seems fine...
any ideas where I should check?
thanks!>Is there a way to tell which column is throwing this error
As suggested by Guido it appears to be related to your variables, not the table;
SQL> create table t (col1 number(1))
Table created.
SQL> begin
insert into t values (11);
end;
ORA-01438: value larger than specified precision allowed for this column
ORA-06512: at line 2
SQL> declare
n number(1);
n2 number(2) :=11;
begin
n:= n2;
end;
ORA-06502: PL/SQL: numeric or value error: number precision too large
ORA-06512: at line 5The error message should tell you the line of code that is causing the problem, ie;
ORA-06512: at line 5A quick way to show the values is to display them using dbms_output.put_line inline or in the exception handler. -
Error PLS-00306: wrong number or types of arguments in call to
I am getting the following Error when calling stored Procedure, I have tried with Last Parameter PRESULT and WITHOUT IT, it fails in both the instance.
=======================================================================
"System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'UPDATECOTRACKING'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
=======================================================================
signature of Stored Procedure is as follow
(pmaster_key IN sca_costtrackinglog.master_key%type,
pdoc_master_key IN sca_costtrackinglog.master_key%type,
pfrenumber IN sca_costtrackinglog.fre_number%type,
pnotice1 IN sca_costtrackinglog.notice1%type,
pnotice2 IN sca_costtrackinglog.notice2%type,
padditreceived IN sca_costtrackinglog.additreceived%type,
pfreanticipate IN sca_costtrackinglog.freanticipate%type,
pdateofnot IN sca_costtrackinglog.dateofnot%type,
pdateofmeeting IN sca_costtrackinglog.dateofmeeting%type,
psenttocontractor IN sca_costtrackinglog.senttocontractor%type,
pcouforexecution IN sca_costtrackinglog.couforexecution%type,
pcomments IN sca_costtrackinglog.comments%type,
pcreateby IN sca_costtrackinglog.createby%type,
peditby IN sca_costtrackinglog.editby%type,
presult OUT number) is
This is the Trace of Parameters from actual Call, that fails with above error.
Parameter Name : PMASTER_KEY(Input),Type(AnsiString) Size(26), Value = 000328JYA30008HSWBCK01NYC
Parameter Name : pdoc_master_key(Input),Type(AnsiString) Size(26), Value = 310657KLF30025HSWBCK01NYC
Parameter Name : PFRENUMBER(Input),Type(AnsiString) Size(12), Value = 00015
Parameter Name : PNOTICE1(Input),Type(DateTime) Size(1), Value = 3/25/2010
Parameter Name : PNOTICE2(Input),Type(DateTime) Size(1), Value =
Parameter Name : PADDITRECEIVED(Input),Type(DateTime) Size(1), Value =
Parameter Name : PFREANTICIPATE(Input),Type(DateTime) Size(1), Value =
Parameter Name : PDATEOFNOT(Input),Type(DateTime) Size(1), Value =
Parameter Name : PDATEOFMEETING(Input),Type(DateTime) Size(1), Value =
Parameter Name : PSENTTOCONTRACTOR(Input),Type(DateTime) Size(1), Value =
Parameter Name : pcouforexecution(Input),Type(DateTime) Size(1), Value =
Parameter Name : pcomments(Input),Type(AnsiString) Size(250), Value =
Parameter Name : PCREATEBY(Input),Type(AnsiString) Size(50), Value = NYCSCA\tmpns2
Parameter Name : PEDITBY(Input),Type(AnsiString) Size(50), Value = NYCSCA\tmpns2
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Below is the trace from Data.OracleClient.OracleCommandBuilder.DeriveParameters(Cmd)
Parameter Name : PMASTER_KEY(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PDOC_MASTER_KEY(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PFRENUMBER(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PNOTICE1(Input),Type(DateTime) Size(0), Value =
Parameter Name : PNOTICE2(Input),Type(DateTime) Size(0), Value =
Parameter Name : PADDITRECEIVED(Input),Type(DateTime) Size(0), Value =
Parameter Name : PFREANTICIPATE(Input),Type(DateTime) Size(0), Value =
Parameter Name : PDATEOFNOT(Input),Type(DateTime) Size(0), Value =
Parameter Name : PDATEOFMEETING(Input),Type(DateTime) Size(0), Value =
Parameter Name : PSENTTOCONTRACTOR(Input),Type(DateTime) Size(0), Value =
Parameter Name : PCOUFOREXECUTION(Input),Type(DateTime) Size(0), Value =
Parameter Name : PCOMMENTS(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PCREATEBY(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PEDITBY(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PRESULT(Output),Type(VarNumeric) Size(0), Value =
******************************************************************************************************************In the Oracle database, the body of the package FWA_PRI API, the procedure ValidatePri declares P_PriREc as being :
PAYMENT_REQUEST_IMPORT%ROWTYPE
As you can see above, the DoPri Procedure expects a type p_PriRec as its second argument.
Therefore in my procedure I do the following:
create or replace procedure spMatchPayment is
BEGIN
DECLARE
CURSOR StageCurs IS SELECT * FROM PAYMENT_REQUEST_IMPORT;
p_payment_req_import PAYMENT_REQUEST_IMPORT%ROWTYPE;
BEGIN
OPEN StageCurs();
LOOP
FETCH StageCurs INTO P_payment_req_import;
EXIT WHEN StageCurs%NOTFOUND;
fwa_pri.DoPri(NULL, fwa_pri.DoPri('M',P_PriRec => p_payment_req_import);
END LOOP;
CLOSE StageCurs;
END;
end spMatchPayment;
Now, when I am trying to compile I am getting the Compilation errors for PROCEDURE IMPACT.SPMATCHPAYMENT
Error: PLS-00306: wrong number or types of arguments in call to 'DOPRI'
Line: 16
Text: fwa_pri.DoPri(NULL,P_PriRec => p_payment_req_import);
I don't see what's wrong on my code......HELP!! -
I have hit with above error and the code did run successfully before the minor change in the portion I have bolded. Appreciate your comment & help.
Attached with the code:
CREATE TABLE RPT1120B_CHANNEL_new
(SUBSCRIBER_NO NUMBER (9),
FP_CHANNEL VARCHAR2(255),
FP_DATE DATE,
FP_DYNASTY CHAR(1),
FP_MOVIE CHAR(1),
FP_FUN CHAR(1),
FP_LEARNING CHAR(1),
FP_NEWS CHAR(1),
FP_SPORTS CHAR(1),
FP_VARIETY CHAR(1),
FP_EMPEROR CHAR(1),
FP_SX1 CHAR(1),
FP_CEL CHAR(1),
LP_CHANNEL VARCHAR2(255),
LP_DATE DATE,
LP_DYNASTY CHAR(1),
LP_MOVIE CHAR(1),
LP_FUN CHAR(1),
LP_LEARNING CHAR(1),
LP_NEWS CHAR(1),
LP_SPORTS CHAR(1),
LP_VARIETY CHAR(1),
LP_EMPEROR CHAR(1),
LP_SX1 CHAR(1),
LP_CEL CHAR(1));
--truncate table RPT1120B_CHANNEL;
create or replace PROCEDURE sp_rpt1120b_new
AS
FP_CHANNEL VARCHAR2(255);
FP_DATE DATE;
LP_CHANNEL VARCHAR2(255);
LP_DATE DATE;
REC_COUNT NUMBER(3);
TYPE REC_SA IS RECORD
(AGREEMENT_NO NUMBER (9));
TYPE REC_CHANNEL IS RECORD
(CHANNEL VARCHAR2(3),
AGREEMENT_NO NUMBER (9));
BEGIN
FOR REC_SA IN (SELECT DISTINCT SUBSCRIBER_NO FROM RPT1120B_T1_new) LOOP
FP_CHANNEL := '';
LP_CHANNEL := '';
REC_COUNT := 0;
FP_DATE := '';
LP_DATE := '';
FOR REC_CHANNEL IN (SELECT distinct decode(SOC,
29990,'N',
29991,'V',
29993,'M',
29988,'F',
29989,'L',
29992,'S',
29994,'D',
29995,'E',
30277,'C',
30293,'C',
30319,'C',
30359,'C',
30276,'X',
30331,'X',
30299,'X',
30380,'X')
AS CHANNEL,SA.EFFECTIVE_DATE as soc_sts_date
FROM SERVICE_AGREEMENT SA
WHERE SA.SOC in ( 29990,
29991,
29993,
29988,
29989,
29992,
29994,
29995,
30277,
30293,
30319,
30359,
30276,
30331,
30299,
30380) AND
SA.AGREEMENT_NO = REC_SA.SUBSCRIBER_NO AND
TRUNC(SA.EFFECTIVE_DATE) <> TRUNC(NVL(SA.EXPIRATION_DATE,SYSDATE)) AND
SA.EFFECTIVE_DATE = (SELECT MIN(SA1.EFFECTIVE_DATE) FROM SERVICE_AGREEMENT SA1
WHERE SA1.AGREEMENT_NO = SA.AGREEMENT_NO AND
sa1.soc in (
29990,
29991,
29993,
29988,
29989,
29992,
29994,
29995,
30277,
30293,
30319,
30359,
30276,
30331,
30299,
30380))
order by DECODE(channel,'D',1,'M',2,'E',3,'C',4,'X',5,'F',6,'L',7,'N',8,'S',9,'V',10)) LOOP
REC_COUNT := REC_COUNT + 1;
if REC_COUNT < 254 then
FP_CHANNEL := FP_CHANNEL || REC_CHANNEL.CHANNEL;
end if;
FP_DATE := REC_CHANNEL.soc_sts_date;
END LOOP;
REC_COUNT := 0;
FOR REC_CHANNEL IN (SELECT distinct decode(sa.SOC,
29990,'N',
29991,'V',
29993,'M',
29988,'F',
29989,'L',
29992,'S',
29994,'D',
29995,'E',
30277,'C',
30293,'C',
30319,'C',
30359,'C',
30276,'X',
30331,'X',
30299,'X',
30380,'X')
AS CHANNEL,SA.soc_status_date as soc_sts_date
FROM SERVICE_AGREEMENT SA,
(SELECT MAX(SA1.soc_status_DATE) as soc_date, agreement_no, soc
FROM SERVICE_AGREEMENT SA1
WHERE soc in( 29990,
29991,
29993,
29988,
29989,
29992,
29994,
29995,
30277,
30293,
30319,
30359,
30276,
30331,
30299,
30380)
GROUP BY agreement_no, soc) sa1
WHERE SA.SOC in ( 29990,
29991,
29993,
29988,
29989,
29992,
29994,
29995,
30277,
30293,
30319,
30359,
30276,
30331,
30299,
30380) AND
SA.soc_status_date = sa1.soc_date AND
TRUNC(SA.SOC_STATUS_DATE) <> TRUNC(NVL(SA.EXPIRATION_DATE,SYSDATE)) AND
SA.SOC_STATUS = (SELECT MIN(SA2.SOC_STATUS) FROM SERVICE_AGREEMENT SA2
WHERE SA2.AGREEMENT_NO = SA.AGREEMENT_NO AND sa2.soc = sa.soc
and SA2.soc_status_date = SA.soc_status_date)
order by DECODE(channel,'D',1,'M',2,'E',3,'C',4,'X',5,'F',6,'L',7,'N',8,'S',9,'V',10)) LOOP
REC_COUNT := REC_COUNT + 1;
if REC_COUNT < 254 then
LP_CHANNEL := LP_CHANNEL || REC_CHANNEL.CHANNEL;
end if;
LP_DATE := REC_CHANNEL.soc_sts_date;
END LOOP;
INSERT INTO RPT1120B_CHANNEL_new values
(REC_SA.SUBSCRIBER_NO,
substr(FP_CHANNEL,1 essageID=1196758, I have hit with above error and the code did run successfully before the minor change in the portion I have bolded. Appreciate your comment & help.
Attached with the code:
CREATE TABLE RPT1120B_CHANNEL_new
(SUBSCRIBER_NO NUMBER (9),
FP_CHANNEL VARCHAR2(255),
FP_DATE DATE,
FP_DYNASTY CHAR(1),
FP_MOVIE CHAR(1),
FP_FUN CHAR(1),
FP_LEARNING CHAR(1),
FP_NEWS CHAR(1),
FP_SPORTS CHAR(1),
FP_VARIETY CHAR(1),
FP_EMPEROR CHAR(1),
FP_SX1 CHAR(1),
FP_CEL CHAR(1),
LP_CHANNEL VARCHAR2(255),
LP_DATE DATE,
LP_DYNASTY CHAR(1),
LP_MOVIE CHAR(1),
LP_FUN CHAR(1),
LP_LEARNING CHAR(1),
LP_NEWS CHAR(1),
LP_SPORTS CHAR(1),
LP_VARIETY CHAR(1),
LP_EMPEROR CHAR(1),
LP_SX1 CHAR(1),
LP_CEL CHAR(1));
--truncate table RPT1120B_CHANNEL;
create or replace PROCEDURE sp_rpt1120b_new
AS
FP_CHANNEL VARCHAR2(255);
FP_DATE DATE;
LP_CHANNEL VARCHAR2(255);
LP_DATE DATE;
REC_COUNT NUMBER(3);
TYPE REC_SA IS RECORD
(AGREEMENT_NO NUMBER (9));
TYPE REC_CHANNEL IS RECORD
(CHANNEL VARCHAR2(3),
AGREEMENT_NO NUMBER (9));
BEGIN
FOR REC_SA IN (SELECT DISTINCT SUBSCRIBER_NO FROM RPT1120B_T1_new) LOOP
FP_CHANNEL := '';
LP_CHANNEL := '';
REC_COUNT := 0;
FP_DATE := '';
LP_DATE := '';
FOR REC_CHANNEL IN (SELECT distinct decode(SOC,
29990,'N',
29991,'V',
29993,'M',
29988,'F',
29989,'L',
29992,'S',The error message has an important hint: "number precision too large"
Change REC_COUNT's type from NUMBER(3) to NUMBER and see what happens. -
Oracle Portal 11g- PLS-00201 identifier 'PORTAL.WWSRC_API' must be declared
Happy Thursday Community!
Hopefuly this is the right place to ask for help, I am fairly new to Portal. I am getting below WARNING and can't move forward. I tried to give 'PORTAL.WWSRC_API' permissions to PUBLIC, still no go. I am using Oracle Designer to genearate the search results from Portal. Please, see code being used after the error list.
ERROR:
Server Generator 10.1.2.6 (Build 10.1.2.11.12) , Thu May 16 10:41:10 2013
Copyright (c) Oracle Corporation 1995, 2010. All rights reserved.
Executing generated DDL ...
Creating Procedure 'PG_SEARCH' ...
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 8/22): PLS-00201: identifier 'PORTAL.WWSRC_API' must be declared
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 8/22): PL/SQL: Item ignored
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 10/21): PLS-00201: identifier 'PORTAL.WWSRC_API' must be declared
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 10/21): PL/SQL: Item ignored
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 11/17): PLS-00201: identifier 'PORTAL.WWSRC_API' must be declared
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 11/17): PL/SQL: Item ignored
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 24/1): PLS-00320: the declaration of the type of this expression is incomplete or malformed
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 24/1): PL/SQL: Statement ignored
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 27/1): PLS-00320: the declaration of the type of this expression is incomplete or malformed
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 27/1): PL/SQL: Statement ignored
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 44/16): PLS-00320: the declaration of the type of this expression is incomplete or malformed
CDS-11307 Warning: (compilation error in PROCEDURE 'PG_SEARCH' at 44/4): PL/SQL: Statement ignored
DDL execution complete
Processing Complete: 0 error(s), 12 warning(s)
BEGIN
DECLARE
l_rows number := 20 ;
l_pageId varchar2(100) ;
l_results portal.wwsrc_api.items_result_array_type;
l_count number;
l_scores portal.wwsrc_api.number_list_type;
l_pageGroups portal.wwsrc_api.number_list_type;
l_maxRows number;
l_text nvarchar2(30000) ;
l_url varchar2(250);
begin
-- set the response type
owa_util.mime_header('text/xml');
-- setting id of the pagegroup where your items lies
l_pageGroups(0) := 'MyPageGroup';
-- Use of the search API to get results.
l_results := portal.wwsrc_api.item_search(
p_page_groups => l_pageGroups,
p_rows => l_rows ,
p_out_count => l_count,
p_out_scores => l_scores );
-- generate response
htp.p('
<rss version="2.0">
<channel>
<generator>Oracle AS11g</generator>
<title>Some rss items</title>
<description>Description for this rss feed </description>
<language>US</language>
<buildDate>' || SYSDATE || '</buildDate>
for i in 1..l_results.count loop
htp.p('<item>');
htp.p('<title>' || l_results(i).display_name || '</title>');
htp.p('<link>http://server:port/portal/page/portal/pagegroup/page/' || l_results(i).display_name || '</link>');
htp.p('<description>' || l_results(i).description || '</description>');
htp.p('</item>');
end loop;
-- close the feed
htp.p('</channel></rss>');
end;
end; I also tried code from this URL: [http://docs.oracle.com/cd/E14571_01/portal.1111/e10238/pdg_cm_search.htm|http://docs.oracle.com/cd/E14571_01/portal.1111/e10238/pdg_cm_search.htm]
I still get the 'identifier 'WHATEVERTHEAPI' must be declared' error.
How do I avenge this one?
DököllWhat is <tt>MESSAGEUTIL</tt>?
use named parameters to keep track of the correct parameter count:"{ call MESSAGEUTIL.GET_IAF("
+ "V_PEID=> 'AVapp1lLQPakyVfqQ9UO1Q'"
+ ", V_START_TIME=> to_timestamp('21-Jan-11 01:00:00.0 AM','dd-MON-yy hh:mi:ss.F PM')"
...and leaving a space before <tt>call</tt> and before the final <tt>}</tt> meight also be a good idea...
There are some problems in here: your procedure defines out parameters that are not invoked by bind parameters in your java string. Since oracle tends to issue strange error messages this could be part of the problem. If you'r responsible for the procedure try to separate in parameters and out parameters.Defining a paramer to be both, IN and OUT is possible, but you should have a really, really good reason to do so.
BTW: the common naming convetion for parameters in PLSQL is <tt>p_...</tt>. <tt>v_...</tt> is for local variables inside a procedure.
BTW2: use java classes to pass parameters from java to PLSQL:CallableStatement cstmt = getCstmt("{ call MESSAGEUTIL.GET_IAF("
+ "V_PEID=> 'AVapp1lLQPakyVfqQ9UO1Q'"
+ ", V_START_TIME=> ? "
// how do you expect something like 'AVapp1lLQPakyVfqQ9UO1Q' beeing converted to an Integer?
cstmt.registerOutParameter(1,Types.INTEGER);
cstmt.registerOutParameter(2,Types.TIMESTAMP);
cstmt.execute();
java.sql.Timestamp timeStamp = cstmt.getTimestamp(2);bye
TPD -
Hi everybody. I wrote de following type
create or replace TYPE ALMACEN AS OBJECT
id_almacen number(10),
descripcion varchar2(40),
existencias number(6),
precio number(4),
member function movimiento (p_num number) return boolean
create or replace TYPE BODY ALMACEN AS
member function movimiento (p_num number) return boolean AS
v_inf boolean;
n number(6);
BEGIN
if self.existencias+p_num>=0 then
self.existencias:=existencias+p_num;
return TRUE;
else return FALSE;
end if;
END movimiento;
END;
I have Oracle 11g release I.
In previous releases it worked, but now SQLDeveloper marks
self.existencias:=existencias+p_num;
Error PLS 00363 expression "string" cannot be used as an assignment target in sentence
Please, What's wrong?
Thanking in advanceHi,
Not quite a PL/SQL XML question but anyway...
Since the member function modifies the object instance, the implicit argument "self" must be declared explicitly as "IN OUT" :
member function movimiento (self in out nocopy almacen, p_num number) return boolean -
It gives me a compilation error pls-000103..on line1
create or replace procedure sys_logon1
authid current_user
as
CURSOR sys_sess IS SELECT sid,username,osuser,logon_time FROM v$session WHERE username<>' ';
CURSOR sys_chk(mSID number) IS SELECT sid from sys_logon WHERE sid=mSID;
mSID v$session.sid%type;
mUSERNAME v$session.username%type;
mOSUSER v$session.osuser%type;
mLOGON v$session.logon_time%type;
mSID_view number(10);
BEGIN
OPEN sys_sess;
LOOP
FETCH sys_sess INTO mSID,mUSERNAME,mOSUSER,mLOGON;
EXIT WHEN sys_sess%NOTFOUND;
OPEN sys_chk (mSID);
FETCH sys_chk INTO mSID_view;
IF sys_chk%NOTFOUND THEN
INSERT INTO sys_logon VALUES(mSID,mUSERNAME,mOSUSER,mLOGON);
END IF;
CLOSE sys_chk;
END LOOP;
CLOSE sys_sess;
COMMIT;
END;
LINE/COL ERROR
4/20 PL/SQL: SQL Statement ignored
4/63 PL/SQL: ORA-00942: table or view does not exist
6/14 PLS-00201: identifier 'V$SESSION' must be declared
6/14 PL/SQL: Item ignored
7/14 PLS-00201: identifier 'V$SESSION' must be declared
7/14 PL/SQL: Item ignored
8/14 PLS-00201: identifier 'V$SESSION' must be declared
8/14 PL/SQL: Item ignored
9/14 PLS-00201: identifier 'V$SESSION' must be declared
9/14 PL/SQL: Item ignored
14/16 PL/SQL: SQL Statement ignored
14/36 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
16/16 PL/SQL: SQL Statement ignored
16/30 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
19/20 PL/SQL: SQL Statement ignored
19/72 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
19/72 PL/SQL: ORA-00904: "MLOGON": invalid identifier
Message was edited by:
shakil_zubairIt seems you have not the grant of select on v$session view.
SYSTEM@DEMO102> conn scott
Enter password: *******
Connected.
SCOTT@DEMO102> create or replace procedure sys_logon1
2 authid current_user
3 as
4 CURSOR sys_sess IS SELECT sid,username,osuser,logon_time FROM v$session WHERE username<>' ';
5 mSID v$session.sid%type;
6 mUSERNAME v$session.username%type;
7 mOSUSER v$session.osuser%type;
8 mLOGON v$session.logon_time%type;
9 mSID_view number(10);
10 BEGIN
11 OPEN sys_sess;
12 LOOP
13 FETCH sys_sess INTO mSID,mUSERNAME,mOSUSER,mLOGON;
14 EXIT WHEN sys_sess%NOTFOUND;
15 dbms_output.put_line(mSID);
16 END LOOP;
17 CLOSE sys_sess;
18 END;
19 /
Warning: Procedure created with compilation errors.
SCOTT@DEMO102> show err
Errors for PROCEDURE SYS_LOGON1:
LINE/COL ERROR
4/20 PL/SQL: SQL Statement ignored
4/63 PL/SQL: ORA-00942: table or view does not exist
5/6 PL/SQL: Item ignored
5/6 PLS-00201: identifier 'V$SESSION' must be declared
6/11 PL/SQL: Item ignored
6/11 PLS-00201: identifier 'V$SESSION' must be declared
7/9 PL/SQL: Item ignored
7/9 PLS-00201: identifier 'V$SESSION' must be declared
8/8 PL/SQL: Item ignored
8/8 PLS-00201: identifier 'V$SESSION' must be declared
13/1 PL/SQL: SQL Statement ignored
LINE/COL ERROR
13/21 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
15/1 PL/SQL: Statement ignored
15/22 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
SCOTT@DEMO102> conn / as sysdba
Connected.
SYS@DEMO102> grant select on v_$session to scott;
Grant succeeded.
SYS@DEMO102> conn scott
Enter password: *******
Connected.
SCOTT@DEMO102> create or replace procedure sys_logon1
2 authid current_user
3 as
4 CURSOR sys_sess IS SELECT sid,username,osuser,logon_time FROM v$session WHERE username<>' ';
5 mSID v$session.sid%type;
6 mUSERNAME v$session.username%type;
7 mOSUSER v$session.osuser%type;
8 mLOGON v$session.logon_time%type;
9 mSID_view number(10);
10 BEGIN
11 OPEN sys_sess;
12 LOOP
13 FETCH sys_sess INTO mSID,mUSERNAME,mOSUSER,mLOGON;
14 EXIT WHEN sys_sess%NOTFOUND;
15 dbms_output.put_line(mSID);
16 END LOOP;
17 CLOSE sys_sess;
18 END;
19 /
Procedure created.
SCOTT@DEMO102> Nicolas. -
PLS-00418: array bind type must match PL/SQL table row type
If a PL/SQL table is indexed by CHAR and is a parameter
in a Stored Program, we are not able to call the stored
program from the Java code.
We get the following error code.
java.sql.SQLException: ORA-06550: line 1, column 62:
PLS-00418: array bind type must match PL/SQL table row type
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
But if we change the CHAR into VARCHAR2 then it works.
We are using Oracle9i Enterprise Edition Release 9.2.0.5.0 -64bit Production ,
JServer Release 9.2.0.5.0 - Production
and JDK1.4.
Thanks
Push..Hi,
I'm not sure it's reasonable to expect someone to sift through that much stuff.
Which parameter is it having a problem with?
Can you modify the following to reproduce the behavior?
Thanks
Greg
create package mypack5 as
TYPE v2array is table of emp.ename%type index by BINARY_INTEGER;
PROCEDURE test_it(thearray IN v2array, numrecs out number);
END;
CREATE or replace PACKAGE BODY MYPACK5 AS
PROCEDURE test_it(thearray IN v2array, numrecs out number)
IS
begin
numrecs := thearray.count;
END;
END;
using System;
using System.Data;
using Oracle.DataAccess.Client;
public class indexby
public static void Main()
OracleConnection con = new OracleConnection("data source=orcl;user id=scott;password=tiger;");
con.Open();
OracleCommand cmd = new OracleCommand("mypack5.test_it", con);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter Param1 = cmd.Parameters.Add("param1", OracleDbType.Varchar2);
Param1.Direction = ParameterDirection.Input;
Param1.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
Param1.Size = 3;
string[] vals = { "foo", "bar", "baz" };
Param1.Value = vals;
OracleParameter Param2 = cmd.Parameters.Add("param2", OracleDbType.Int32, DBNull.Value, ParameterDirection.Output);
cmd.ExecuteNonQuery();
Console.WriteLine("{0} records passed in", Param2.Value);
con.Close();
} -
PLS-00201: identifier 'MESSAGEUTIL.GET_IAF' must be declared
My DB Procedure:
PROCEDURE GET_IAF (
V_PEID IN OUT VARCHAR2,
V_START_TIME IN OUT TIMESTAMP,
V_END_TIME IN OUT TIMESTAMP,
V_BATCH_ID IN OUT INTEGER,
V_EPS_ID IN OUT INTEGER,
V_EVENT_ID IN OUT INTEGER,
V_USER_INPUT IN OUT VARCHAR2,
V_STARTINDEX IN NUMBER,
V_MAXROWS IN NUMBER,
V_ACCESSCOUNT IN NUMBER DEFAULT -1,
Service_Instance_Id IN VARCHAR2,
V_RESULTSCOUNT OUT NUMBER,
V_STATUS OUT VARCHAR2,
V_ERROR OUT VARCHAR2,
V_MESSAGE OUT VARCHAR2,
V_RECORDSET OUT SYS_REFCURSOR);
My Java Code:
private static final String sqlGetIAF =
"{call MESSAGEUTIL.GET_IAF('AVapp1lLQPakyVfqQ9UO1Q',to_timestamp('21-Jan-11 01:00:00.0 AM','dd-MON-yy hh:mi:ss.F PM'),to_timestamp('21-Feb-11 01:00:00.0 AM','dd-MON-yy hh.mi.ss.F PM'),0,0,3,'A',-1,10,-1,51479661,?,?,?,?,?)}";
CallableStatement cstmt = getCstmt(sqlGetIAF);
cstmt.registerOutParameter(1,Types.INTEGER);
cstmt.registerOutParameter(2,Types.VARCHAR);
cstmt.registerOutParameter(3,Types.VARCHAR);
cstmt.registerOutParameter(4,Types.VARCHAR);
cstmt.registerOutParameter(5, OracleTypes.CURSOR);
rs=cstmt.executeQuery();
I am getting the below error when i am trying to run the above sql.
The user has execute grant on the stored procdure.
Error I am getting:
Caused By: java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00201: identifier 'MESSAGEUTIL.GET_IAF' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1223)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3430)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:128)
at com.cox.corp.crn.db.dao.IAFProcessDAO.getIAF(IAFProcessDAO.java:65)
at com.cox.corp.crn.mdb.IAFQueueEJBBean.onMessage(IAFQueueEJBBean.java:82)
at sun.reflect.GeneratedMethodAccessor1567.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy240.onMessage(Unknown Source)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4585)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:4271)
at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3747)
at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5096)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)What is <tt>MESSAGEUTIL</tt>?
use named parameters to keep track of the correct parameter count:"{ call MESSAGEUTIL.GET_IAF("
+ "V_PEID=> 'AVapp1lLQPakyVfqQ9UO1Q'"
+ ", V_START_TIME=> to_timestamp('21-Jan-11 01:00:00.0 AM','dd-MON-yy hh:mi:ss.F PM')"
...and leaving a space before <tt>call</tt> and before the final <tt>}</tt> meight also be a good idea...
There are some problems in here: your procedure defines out parameters that are not invoked by bind parameters in your java string. Since oracle tends to issue strange error messages this could be part of the problem. If you'r responsible for the procedure try to separate in parameters and out parameters.Defining a paramer to be both, IN and OUT is possible, but you should have a really, really good reason to do so.
BTW: the common naming convetion for parameters in PLSQL is <tt>p_...</tt>. <tt>v_...</tt> is for local variables inside a procedure.
BTW2: use java classes to pass parameters from java to PLSQL:CallableStatement cstmt = getCstmt("{ call MESSAGEUTIL.GET_IAF("
+ "V_PEID=> 'AVapp1lLQPakyVfqQ9UO1Q'"
+ ", V_START_TIME=> ? "
// how do you expect something like 'AVapp1lLQPakyVfqQ9UO1Q' beeing converted to an Integer?
cstmt.registerOutParameter(1,Types.INTEGER);
cstmt.registerOutParameter(2,Types.TIMESTAMP);
cstmt.execute();
java.sql.Timestamp timeStamp = cstmt.getTimestamp(2);bye
TPD -
Stored Procedure Call from Bean Error - PLS-00201
Hello all,
I am using the java stored procedure code in the examples dir of weblogic51/examples/jdbc/...
with one exception. I created the stored procedure as another user with more
permissions than
the user that the jdbc connection will be established with. I created a public
synonym so the stored
procedure doesn't have to be refered to as "username.proc_squareInt". I keep
getting the following
errors. The web user has execute permissions and I tried calling it both with
the owner.proc_name
and proc_name (which I know won't work since it won't be able to find it).
Any help would be greatly appreciated.
Sincerely,
Michael Prinsen
Tue Jul 17 13:47:41 MDT 2001:<E> <WebAppServletContext-et> Root cause of ServletException
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00201: identifier 'WTHDBM.PROC_SQUAREINT' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1330)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:757)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1353)
at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1807)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:332)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:376)
at weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java:35)
at csu.et.testBean.getWeatherData1(testBean.java:46)
at jsp_servlet._test._tester._jspService(_tester.java:107)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:120)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:138)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:915)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:879)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:269)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
// START CODE
package csu.et;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.text.*;
import java.beans.*;
import java.math.*;
import java.util.Date;
import java.util.Locale;
import csu.util.*;
public class testBean {
public String getWeatherData1() throws SQLException {
Connection conn = null;
conn = CSUConnection.getConnection("etSelectConnectionPool");
// Create a stored proc - (CREATED ALREADY)
// Statement stmt1 = conn.createStatement();
// stmt1.execute("CREATE OR REPLACE PROCEDURE proc_squareInt " +
// "(field1 IN OUT INTEGER, " +
// " field2 OUT INTEGER) IS " +
// "BEGIN field2 := field1 * field1; " +
// "field1 := field1 * field1; END proc_squareInt;");
// stmt1.close();
String sql = "{call proc_squareInt(?, ?)}";
CallableStatement cstmt1 = conn.prepareCall(sql);
cstmt1.registerOutParameter(2, java.sql.Types.INTEGER);
for (int i = 0; i < 5; i++) {
cstmt1.setInt(1, i);
cstmt1.execute();
System.out.println(i + " " + cstmt1.getInt(1) + " " + cstmt1.getInt(2));
cstmt1.close();
conn.close();
return("hard-coded stuff");
//END CODE
this is probably an oracle related issue, and has very little to do with
Weblogic transactions.
your easiest way to debug this is to open a SQL/Plus window, log in as user
WTHDBM and try to run the command
"execute proc_squareInt(5,5);"
"execute owner.proc_squareInt(5,5);"
if this doesn't work, consult Oracle technet on how to setup synonyms and
permissions
Filip
~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[email protected]
www.filip.net
"Michael Prinsen" <[email protected]> wrote in message
news:[email protected]...
>
> Hello all,
>
> I am using the java stored procedure code in the examples dir of
weblogic51/examples/jdbc/...
> with one exception. I created the stored procedure as another user with
more
> permissions than
> the user that the jdbc connection will be established with. I created a
public
> synonym so the stored
> procedure doesn't have to be refered to as "username.proc_squareInt". I
keep
> getting the following
> errors. The web user has execute permissions and I tried calling it both
with
> the owner.proc_name
> and proc_name (which I know won't work since it won't be able to find it).
>
> Any help would be greatly appreciated.
>
> Sincerely,
>
> Michael Prinsen
>
> Tue Jul 17 13:47:41 MDT 2001:<E> <WebAppServletContext-et> Root cause of
ServletException
> java.sql.SQLException: ORA-06550: line 1, column 7:
> PLS-00201: identifier 'WTHDBM.PROC_SQUAREINT' must be declared
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
>
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
> at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
> at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
> at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1330)
> at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:757)
> at
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1313
> at
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1232)
> at
oracle.jdbc.driver.OracleStatement.doExecuteWithBatch(OracleStatement.java:1
353)
> at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1760)
> at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java
:1807)
> at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedState
ment.java:332)
> at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.j
ava:376)
> at weblogic.jdbc.pool.PreparedStatement.execute(PreparedStatement.java:35)
> at csu.et.testBean.getWeatherData1(testBean.java:46)
> at jsp_servlet._test._tester._jspService(_tester.java:107)
> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:138)
> at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:915)
> at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:879)
> at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
> at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:365)
> at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
>
>
>
> // START CODE
>
> package csu.et;
>
> import java.io.*;
> import java.sql.*;
> import java.util.*;
> import java.text.*;
> import java.beans.*;
> import java.math.*;
> import java.util.Date;
> import java.util.Locale;
> import csu.util.*;
>
> public class testBean {
>
> public String getWeatherData1() throws SQLException
>
> Connection conn = null;
> conn = CSUConnection.getConnection("etSelectConnectionPool");
>
> // Create a stored proc - (CREATED ALREADY)
> // Statement stmt1 = conn.createStatement();
> // stmt1.execute("CREATE OR REPLACE PROCEDURE proc_squareInt " +
> // "(field1 IN OUT INTEGER, " +
> // " field2 OUT INTEGER) IS " +
> // "BEGIN field2 := field1 * field1; " +
> // "field1 := field1 * field1; END proc_squareInt;");
> // stmt1.close();
>
> String sql = "{call proc_squareInt(?, ?)}";
> CallableStatement cstmt1 = conn.prepareCall(sql);
>
> cstmt1.registerOutParameter(2, java.sql.Types.INTEGER);
> for (int i = 0; i < 5; i++) {
> cstmt1.setInt(1, i);
> cstmt1.execute();
> System.out.println(i + " " + cstmt1.getInt(1) + " " +
cstmt1.getInt(2));
> }
>
> cstmt1.close();
> conn.close();
> return("hard-coded stuff");
> }
>
> }
>
> file://END CODE
-
Error PLS-00428: an INTO clause is expected in this SELECT statement
Dear Experts,
I am new PL/SQL Programming
I am trying to run the following query i am getting Error.
Please help me to solve the error.
declare
var_cd number(20);
begin
if :P1_TYP_CAT is not null then
select max(CAT_cd + 1) as var_cd from IM_AST_CAT order by CAT_cd;
insert into IM_AST_CAT (CAT_NM, CAT_CD) values ((upper(:P1_TYP_CAT)),(:var_cd));
else
RAISE_APPLICATION_ERROR (-20001,'Both department and location must be provided');
end if;
end;Others have already explained you the cause of the error. You can simplify your code like this.
begin
if :p1_typ_cat is not null then
insert into im_ast_cat
cat_nm
, cat_cd
select upper(:p1_type_cat)
, max(cat_cd + 1)
from im_ast_cat;
else
raise_application_error (-20001,'Both department and location must be provided');
end if;
end; -
PLS-00201: identifier 'DBMS_JAVA.SET_OUTPUT' must be declared
We have recently upgraded to oracle 11g and when trying to execute the code:
begin DBMS_JAVA.SET_OUTPUT(10000); end;
We are returned the error:
ORA-06550: line 1, column 7:
PLS-00201: identifier 'DBMS_JAVA.SET_OUTPUT' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
The DBMS_JAVA package, both body and spec are valid & compiled.
Could there be an issue with permissions or missing dependencies?
Thank you.Hello Frank thank you for your quick response.
I have checked the database:
select * from dba_tab_privs where table_name = 'DBMS_JAVA'
Returns-------
Grantee: PUBLIC
Owner: SYS
Table Name: DBMS_JAVA
Grantor: SYS
Privilege: EXECUTE
Grantable: NO
HIERARCHY: NO
edit: sorry I just noticed the second part of your post.
"Also, make sure there's a public synonym DBMS_JAVA, referencing SYS.DBMS_JAVA."
I believe that this is the issue. I am sorry I only marked your response as 'helpful'..
Edited by: 912947 on Feb 7, 2012 11:33 AM
Maybe you are looking for
-
300gb doesn't work on K8n neo platinum
Hi guys! This is my first post ever so please bear with me if it confuses the hell out of everybody Here's my setup: Antec 480w 3400+ amd64 1mb L2 cache 754 pin MSI K8N Neo Platinum 1gb Crucial Ballistix pc3200 2 x 36gb WD raptors 1 200gb IDE seagate
-
Screen Goes Dark During iPhone Sync
This sounds strange and I can't seem to find a logical explanation for this. I noticed that I went I plug my iPhone via USB for iTunes to automatically synch, within seconds the screen goes dark. What I have been doing lately is to rest the phone o
-
After the upgrade to I06, no wi-fi!
I see everyone having this same problem, so I'm hoping there is someone who has an answer. After upgrading to I06, my iphone will no longer connect to wi-fi networks, even at home. I tried powering down and that worked the first time, but doesn't s
-
Transfer outlook calendar to ipad
Could someone explain how to transfer and sync my outlook calensar and contacts to my ipad2? Thank you.
-
How to use iSight camera as security centre
How to use iSight camera as security centre