ORA-02266: unique/primary keys - error while using Exchange Partition
Hi All,
While using EXCHANGE PARTITION statement as given below,
ALTER TABLE SOURCE_TABLE EXCHANGE PARTITION PRT_EXCG_PRTN WITH TABLE TARGET_TABLE
we are getting this error,
ORA-02266: unique/primary keys in table referenced by enabled foreign keys
However, there are no tables have foreign keys referring this TARGET_TABLE, we checked this by referring
USER_CONSTRAINTS table, it has only primary key and NOT NULL constraints.
SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME like 'TARGET_TABLE';
We are using the following version,
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
PL/SQL Release 9.2.0.6.0 - Production
CORE 9.2.0.6.0 Production
TNS for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production
NLSRTL Version 9.2.0.6.0 - Production
Is it due to any error in our end or it could be a bug in Oracle and should we go for any patch updation ?
Please guide us to resolve this error as soon as possible, thank you.
Regards,
Deva
*** Duplicate Post ***
Please Ignore.
Similar Messages
-
ORA-02266: unique/primary keys in table referenced by enabled foreign keys
Hi,
I am trying to delete data from a table by dropping a partition. I have identified all the child tables by running the following command.
select 'select count(*) from '||table_name||' where employee_id = 100;'
from dba_constraints
where constraint_type='R'
and r_constraint_name in
(select constraint_name from dba_constraints
where constraint_type in ('P','U') and table_name='EMPLOYEE);
'SELECTCOUNT(*)FROM'||TABLE_NAME||'WHEREEMPLOYEE_ID_ID=100;'
select count(*) from PT_ORDERS where employee_id = 100;
select count(*) from PT_DEP where employee_id = 100;
select count(*) from PT_SKILLSET where employee_id = 100;
I dropped the partition for employee_id 100 in all of the child tables. The select count(*) returns 0 rows for each of the above.
When I try to run the below command on the EMPLOYEE table, I get 'ORA-02266: unique/primary keys in table referenced by enabled foreign keys'.
alter table EMPLOYEE drop partition EMP_ID_100;
I cant see why I am unable to drop this partition now as there is now child data in any of the referenced tables. Any suggestions or help on this would be greatly appreciated.
Thanks.
Rgs,
RobYou should disable foreign key constraints first and drop partition. Deletion of rows or dropping partitions in childs don't work in this case
as you have the global dependency:
<PRE>
SQL> create table scott.t (x int primary key, y int)
2 partition by list (y) (
3 partition p_1 values(1), partition p_2 values(2))
4 /
Table created.
SQL> create table scott.t_c (x int references scott.t(x), y int)
2 partition by list (y) (
3 partition p_1 values(1), partition p_2 values(2))
4 /
Table created.
SQL> insert into scott.t values(1,1)
2 /
1 row created.
SQL> insert into scott.t values(2,2)
2 /
1 row created.
SQL> insert into scott.t_c values(1,1)
2 /
1 row created.
SQL> insert into scott.t_c values(2,2)
2 /
1 row created.
SQL> commit;
Commit complete.
SQL> alter table scott.t_c drop partition p_2;
Table altered.
SQL> alter table scott.t drop partition p_2;
alter table scott.t drop partition p_2
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys
SQL> select constraint_name from dba_constraints
2 where owner = 'SCOTT' and constraint_type = 'P'
3 and table_name = 'T';
CONSTRAINT_NAME
SYS_C0011058
SQL> select constraint_name from dba_constraints
2 where owner = 'SCOTT' and constraint_type = 'R'
3 and r_constraint_name = 'SYS_C0011058';
CONSTRAINT_NAME
SYS_C0011059
SQL> alter table scott.t_c disable constraint SYS_C0011059;
Table altered.
SQL> alter table scott.t drop partition p_2;
Table altered.
SQL> alter table scott.t_c enable novalidate constraint SYS_C0011059;
Table altered.
</PRE>
I guess you should consider such option as Referencial partitioning (with some restrictions).
Best wishes,
Dmitry. -
ORA-00902: invalid datatype comile error while using CAST function
Hi everyone,
I'm getting ORA-00902: invalid datatype compilation error while using CAST function.
open ref_cursor_list for select empName from TABLE(CAST(part_t AS partnumberlist));
The partnumberlist and ref_cursor_list is declared in the Package spec as given below.
TYPE ref_cursor_list IS REF CURSOR;
TYPE partnumberlist IS TABLE OF emp.empName%TYPE;
The error points the partnumberlist as invalid datatype in TOAD because of this i'm unable to compile the package.
Any suggestion
Thanks and regards
Sathish GopalHere is my code for
package Spec
CREATE OR REPLACE PACKAGE "HISTORICAL_COMMENTZ" AS
TYPE prior_part_data_record IS RECORD (
prior_part_row_id PGM_RPLCMNT_PART.PR_PART_ROW_S_ID%TYPE,
prior_pgm_chng_s_id PGM_RPLCMNT_PART.PR_PGM_CHNG_S_ID%TYPE
TYPE parts_list IS TABLE OF prior_part_data_record;
--TYPE parts_list IS TABLE OF NUMBER;
TYPE partnumberlist IS TABLE OF PGM_RPLCMNT_PART.PR_PART_ROW_S_ID%TYPE;
TYPE partnumber_cursor IS REF CURSOR;
TYPE comment_record IS RECORD (
pgm_s_id PGM_PART_CMNT.PGM_S_ID%TYPE,
part_row_s_id PGM_PART_CMNT.PART_ROW_S_ID%TYPE,
pgm_chng_s_id PGM_PART_CMNT.PGM_CHNG_S_ID%TYPE,
cmnt_txt PGM_PART_CMNT.CMNT_TXT%TYPE,
cmnt_dt PGM_PART_CMNT.CMNT_DT%TYPE,
updt_rsrc_id PGM_PART_CMNT.UPDT_RSRC_ID%TYPE
TYPE comment_list IS TABLE OF comment_record;
global_pgm_s_id INTEGER := 0;
global_part_row_s_id INTEGER := 0;
err_num NUMBER := 999999;
err_msg VARCHAR2 (250);
PROCEDURE getComments (
pgm_s_id IN NUMBER,
part_row_s_id IN NUMBER,
partnumber_cursorlist out partnumber_cursor);
END;
Package Body
CREATE OR REPLACE PACKAGE BODY HISTORICAL_COMMENTZ
AS
FUNCTION getPriorPart
(param_prior_pgm_chng_s_id IN PGM_RPLCMNT_PART.PR_PGM_CHNG_S_ID%TYPE,
return_prior_part_data_record IN OUT prior_part_data_record
RETURN INTEGER
IS
retVal INTEGER;
prior_part_row_id INTEGER;
prior_pgm_chng_s_id INTEGER;
local_prior_part_data_record prior_part_data_record;
BEGIN
SELECT PR_PART_ROW_S_ID AS prior_part_row_id, PR_PGM_CHNG_S_ID AS prior_pgm_chng_s_id
INTO local_prior_part_data_record
--SELECT PR_PART_ROW_S_ID INTO retVal
FROM PGM_RPLCMNT_PART
WHERE PGM_S_ID = global_pgm_s_id AND CUR_PGM_CHNG_S_ID = param_prior_pgm_chng_s_id;
return_prior_part_data_record := local_prior_part_data_record;
retVal := 0;
RETURN retVal;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
err_num := SQLCODE;
err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
retVal := -1;
RETURN retVal;
WHEN OTHERS
THEN
err_num := SQLCODE;
err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
retVal := -1;
RETURN retVal;
END getPriorPart;
FUNCTION getComment (found_parts_list IN parts_list, comments OUT comment_list)
RETURN INTEGER
IS
CURSOR init_cursor
IS
SELECT PGM_S_ID,PART_ROW_S_ID,PGM_CHNG_S_ID,CMNT_TXT,CMNT_DT,UPDT_RSRC_ID
FROM PGM_PART_CMNT WHERE 1 = 2;
retVal INTEGER;
indexNum PLS_INTEGER;
local_part_record prior_part_data_record;
local_comment_record comment_record;
local_part_row_s_id NUMBER;
i PLS_INTEGER;
BEGIN
OPEN init_cursor;
FETCH init_cursor
BULK COLLECT INTO comments;
i := 0;
indexNum := found_parts_list.FIRST;
WHILE indexNum IS NOT NULL
LOOP
local_part_record := found_parts_list(indexnum);
local_part_row_s_id := local_part_record.prior_part_row_id;
SELECT PGM_S_ID,PART_ROW_S_ID,PGM_CHNG_S_ID,CMNT_TXT,CMNT_DT,UPDT_RSRC_ID
INTO local_comment_record FROM PGM_PART_CMNT
WHERE PGM_S_ID = global_pgm_s_id
AND PART_ROW_S_ID = local_part_row_s_id;
comments(i) := local_comment_record;
i := i + 1;
END LOOP;
RETURN retval;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
err_num := SQLCODE;
err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
RETURN retval;
WHEN OTHERS
THEN
err_num := SQLCODE;
err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
RETURN retval;
END getComment;
PROCEDURE getComments
pgm_s_id IN NUMBER,
part_row_s_id IN NUMBER,
partnumber_cursorlist OUT partnumber_cursor)
IS
comment_recordlist comment_record;
retPartnumberlist partnumberlist;
found_parts_list parts_list;
local_part_record prior_part_data_record;
is_more_parts BOOLEAN;
driver_chng_s_id NUMBER;
num_parts NUMBER;
retVal NUMBER;
comments comment_list;
returnPartnumberlist partnumberlist;
iloopCounter PLS_INTEGER;
inx1 PLS_INTEGER;
part_t partnumberlist :=partnumberlist(100,200,300);
CURSOR part_list_init_cursor
IS
SELECT PR_PART_ROW_S_ID,PR_PGM_CHNG_S_ID FROM PGM_RPLCMNT_PART WHERE 1 = 2;
CURSOR inIt_cursor
IS
SELECT 0 FROM DUAL WHERE 1 = 2;
BEGIN
DBMS_OUTPUT.ENABLE (5000000);
global_pgm_s_id := pgm_s_id;
global_part_row_s_id := part_row_s_id;
SELECT PART_ROW_S_ID AS prior_part_row_id, PR_PGM_CHNG_S_ID AS prior_pgm_chng_s_id
INTO local_part_record
FROM PGM_RPLCMNT_PART
WHERE PGM_S_ID = global_pgm_s_id AND PART_ROW_S_ID = global_part_row_s_id AND
CUR_PGM_CHNG_S_ID IN (SELECT MAX(CUR_PGM_CHNG_S_ID) FROM PGM_RPLCMNT_PART WHERE
PGM_S_ID = global_pgm_s_id AND PART_ROW_S_ID = global_part_row_s_id
GROUP BY PART_ROW_S_ID);
OPEN part_list_init_cursor;
FETCH part_list_init_cursor
BULK COLLECT INTO found_parts_list;
-- Add the existing part to the found list
found_parts_list.EXTEND;
found_parts_list(1) := local_part_record;
driver_chng_s_id := local_part_record.prior_pgm_chng_s_id;
num_parts := 1;
is_more_parts := TRUE;
WHILE (is_more_parts) LOOP
retVal := getPriorPart(driver_chng_s_id,local_part_record);
IF (retVal != -1) THEN
found_parts_list.EXTEND;
num_parts := num_parts + 1;
found_parts_list(num_parts) := local_part_record;
driver_chng_s_id := local_part_record.prior_pgm_chng_s_id;
ELSE
is_more_parts := FALSE;
END IF;
END LOOP;
--num_parts := getComment(found_parts_list,comments);
OPEN init_cursor;
FETCH init_cursor
BULK COLLECT INTO returnPartnumberlist;
num_parts := found_parts_list.COUNT;
FOR iloopCounter IN 1 .. num_parts
LOOP
returnPartnumberlist.EXTEND;
returnPartnumberlist(iloopCounter) := found_parts_list(iloopCounter).prior_part_row_id;
END LOOP;
retPartnumberlist := returnPartnumberlist;
open
* partnumber_cursorlist for select PR_PART_ROW_S_ID from TABLE(CAST(retPartnumberlist AS historical_commentz.partnumberlist));*
DBMS_OUTPUT.put_line('Done....!');
EXCEPTION
some code..............................
END getComments;
END HISTORICAL_COMMENTZ;
/ -
Partitioned nested table error while dropping one partition
All,
I created a partitioned table which is also a nested table as you can see below. I got FK constraint error while attempting to drop a partition, however, I could not find the FK in order to disable it since it's underlying table emp_list_p which is not visiable to applications. How could I drop the partition in this case?
Thanks,
Jianhui
SQL>desc emp_t
Name Null? Type
ENO NUMBER
ENAME VARCHAR2(30)
SAL NUMBER
SQL>desc emp_list_t
emp_list_t TABLE OF EMP_T
Name Null? Type
ENO NUMBER
ENAME VARCHAR2(30)
SAL NUMBER
SQL>l
1 create table dept_p
2 (dno number,
3 dname varchar2(30),
4 emplist emp_list_t )
5 NESTED TABLE emplist store as emp_list_p
6 partition by range (dno)
7 (
8 partition p1 values less than (2),
9 partition p2 values less than (3)
10* )
SQL>/
Table created.
SQL>insert into dept_p (select * from dept);
2 rows created.
SQL>select * from dept_p;
DNO DNAME
EMPLIST(ENO, ENAME, SAL)
1 HR
EMP_LIST_T(EMP_T(1, 'scott', 1000), EMP_T(2, 'brain', 2000))
2 SALES
EMP_LIST_T(EMP_T(3, 'frank', 800))
2 rows selected.
SQL>alter table dept_p drop partition p1;
alter table dept_p drop partition p1
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys
SQL>l
1 select constraint_name, constraint_type, table_name
2 from user_constraints
3 where r_constraint_name=(select constraint_name
4* from user_constraints where table_name='DEPT_P' and constraint_type in ('P','U'))
SQL>/
no rows selectedSQL> create type emp_t as object(
2 ENO NUMBER,
3 ENAME VARCHAR2(30),
4 SAL NUMBER)
5 /
Type created.
SQL> create type emp_list_t as table of emp_t;
2 /
Type created.
SQL> desc emp_list_t
emp_list_t TABLE OF EMP_T
Name Null? Type
ENO NUMBER
ENAME VARCHAR2(30)
SAL NUMBER
SQL> create table dept_p
2 (dno number,
3 dname varchar2(30),
4 emplist emp_list_t )
5 NESTED TABLE emplist store as emp_list_p
6 partition by range (dno)
7 (
8 partition p1 values less than (2),
9 partition p2 values less than (3)
10 )
11 /
Table created.
SQL> insert into dept_p values(1, 'HR',
2 EMP_LIST_T(EMP_T(1, 'scott', 1000), EMP_T(2, 'brain', 2000)));
1 row created.
SQL>
SQL> insert into dept_p values(2, 'SALES',EMP_LIST_T(EMP_T(3, 'frank', 800)));
1 row created.
SQL> select * from dept_p;
DNO DNAME
EMPLIST(ENO, ENAME, SAL)
1 HR
EMP_LIST_T(EMP_T(1, 'scott', 1000), EMP_T(2, 'brain', 2000))
2 SALES
EMP_LIST_T(EMP_T(3, 'frank', 800))
SQL> alter table dept_p drop partition p1;
alter table dept_p drop partition p1
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys
SQL> select constraint_name,table_name,constraint_type from user_constraints
2 where table_name = 'DEPT_P';
CONSTRAINT_NAME TABLE_NAME C
SYS_C008224 DEPT_P U
SQL> select index_name from user_constraints
2 where table_name = 'DEPT_P';
INDEX_NAME
SYS_C008224
SQL> select index_name,column_name from user_ind_columns
2 where index_name = 'SYS_C008224';
INDEX_NAME COLUMN_NAME
SYS_C008224 EMPLIST
SQL>
SQL> disconnect
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options
If you look closely, there is a unique index on dept_p. Oracle does not advertise it.
One of the options is that you may have to delete the rows in the partition first,
then drop the partition. -
How do you insert new records into multiple tables using the same unique primary key?
I’ve created a PHP site and MySQL server using a free app called XAMPP. I have successfully created a form in Dreamweaver that will write data to a (name) table in the SQL database. Here’s my question: How do you write to two (or more) tables in the same database and pass the same primary key to both tables? In the SQL database, I defined the first field as ID and set it as the primary key with auto update. So, when you insert a new record, it creates a unique primary key for that record. In my form, I’m capturing info that needs to be stored to two tables at the same time; a Name table and Address table. Since the Name and Address tables use the ID field as the primary key, I believe I will need to pass the ID value from the Name table to the insert of the Address table to insure they both have the same primary key, right?
No. You probably need the primary key from one table to be a foreign key in the other tables. In any case, I believe you can use two methods to obtain the auto generated key. First with SQL:
http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html
And the other using a PHP function:
http://us3.php.net/mysql_insert_id -
I am facing ora-06508 error while using webutil. Have done all setup as per "How to Configure Webutil in Forms 11g ".
Error on following statement "Client_OLE2.create_obj('Excel.Application')"
FRM-40375, ORA-06508.
Waiting for Help.
Thanks;
Edited by: umairm on Apr 20, 2012 10:16 AMHi
It is mentioned in webutil doc that, you must regenerate webutil.pll before using it; otherwise you’ll encounter error ORA-06508 when running a form with the attached library.
Hope this helps...
Regards,
Amatu Allah -
Oracle Primary key error on a sequence number generator
I have a table called table 1 and I am trying to insert a few values in this table and i am constantly getting bogged down by a primary key error. Strange thing is this primary key called "ID" on the table is a sytem generated sequence value number. The error is
"ORA-00001: unique constraint (Schema1.LICN_PK) violated"
Any idea?
I will post the structure of the table below and my SQL statement as well.
Table structure:
CREATE TABLE schema1.table1
ID NUMBER(12),
LITM_ID NUMBER(12),
PROG_PROGRAM_CD VARCHAR2(2 BYTE),
SCHED_NBR VARCHAR2(3 BYTE),
SCHD_VERSION_YR NUMBER(4),
SCHD_VERSION_NBR NUMBER(3),
LITM_LINE_ITEM_NBR VARCHAR2(3 BYTE),
SLIN_LINE_ITEM_ID NUMBER(12),
COND_CD VARCHAR2(15 BYTE),
COND_TYPE VARCHAR2(1 BYTE) DEFAULT 'O',
COND_TEXT VARCHAR2(240 BYTE),
DERIVE_COMPRSN_IND VARCHAR2(1 BYTE),
DISPLAY_SEQ_NBR NUMBER(5),
SEVRTY_CD VARCHAR2(1 BYTE),
OVRRDBL_IND VARCHAR2(1 BYTE),
NEVER_OVRRDBL_IND VARCHAR2(1 BYTE),
CREATED_BY VARCHAR2(8 BYTE),
CREATED_TMST DATE,
MODIFIED_BY VARCHAR2(8 BYTE),
MODIFIED_TMST DATE
CREATE UNIQUE INDEX schema1.LICN_PK ON schema1.table1
(ID)
NOLOGGING
TABLESPACE INDEX_STAT1
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 128K
NEXT 128K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOPARALLEL;
CREATE UNIQUE INDEX schema1.LICN_UK ON schema1.table1
(LITM_ID, COND_CD)
NOLOGGING
TABLESPACE INDEX_STAT1
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 128K
NEXT 128K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOPARALLEL;
Table structure ends
****************Insert statement*************
insert into table1
(id,
litm_id,
prog_program_cd,
sched_nbr,
schd_version_yr,
schd_version_nbr,
litm_line_item_nbr,
slin_line_item_id,
cond_cd,
cond_type,
cond_text,
derive_comprsn_ind,
display_seq_nbr,
sevrty_cd,
ovrrdbl_ind,
never_ovrrdbl_ind,
created_by,
created_tmst,
modified_by,
modified_tmst)
values
(LITM_ID_SQ.nextval,
5678,
'28',
000,
2005,
1,
'007',
28,
'0008',
'E',
'No advance',
'N',
80,
'M',
'N',
'Y',
USER,
SYSDATE,
USER,
SYSDATE);
*************End***********************
Any idea why the error is coming up and any way to resolve it. I checked the max sequence number value and kept running it for a while and then tried to run my insert statement but no luck yet.
Please help!!!Hi,
Are you tring to do the same insert more than once?
The sequence for ID will be generated and there will be no problem with that.
But what about UNIQUE INDEX schema1.LICN_UK ON schema1.table1(LITM_ID, COND_CD)?
you are trying to insert the same values again into those columns... and there is a unique index.
Test your insert by dropping the unique index LICN_UK
DROP INDEX schema1.LICN_UK;Now it will work. But if you need the uniqueness, you need to insert different values for those columns each time you insert.
G. -
Application Translation Not Working - Primary Key Error
I had created an application translation to Spanish but it wasn't displaying my Spanish translation. I was going to try and redo it so I tried creating a new mapping and then seeding the translatable text. I got a primary key error "ORA-20001: Seed insert error: WWV_FLOW_TOPLEVEL_TABS.TAB_TEXT ORA-00001: unique constraint (FLOWS_030100.WWV_FLOW_TRANSLATABLE_TEXT_PK) violated".
I went in and deleted what I had done through APEX for this app and tried to create a new application but still get the primary key error when I try to seed it. I gave it a new translated application ID but that doesn't seem to help. Anyone have this problem or no of the reason I'm having this issue?
Thanks.Hi David,
Thanks for reporting this. This was an interesting problem to solve.
As it turns out, it was a logic error in Application Express (i.e., bug). When deleting a translation mapping, the associated strings in the translation repository would be deleted for that application, but if and only if you had actually published the application.
I think this is why you could never get Spanish working properly - you had never actually published the application the first time. So I'll bet what you did is deleted the original mapping, then you recreated the mapping for the same language but with a different translated application ID. Since you had never published the application from the original translation mapping, and there were orphaned rows in the translation repository, you encountered a "collision" when you tried to seed the second time with the different translated application ID.
Your action of deleting rows from WWV_FLOW_TRANSLATABLE_TEXT$ cleaned up these orphaned rows. As you stated, this isn't recommended to perform DML on the underlying APEX tables. A couple alternatives could have been:
1) Before deleting the translated application mapping, actually publish the application and then delete the mapping.
2) If you had deleted the mapping already, you could recreate the mapping for the same language and with the original translated application ID. Then, publish the application and then go back and delete the mapping.
I realize all this sounds crazy. But it was only an issue because you had not actually published the application. Not your fault, though, as this is a bug in APEX.
This bug will be fixed in Application Express 4.0. This way, you won't have to worry about if you published or didn't publish. The orphaned rows will be cleaned up when you delete a mapping.
Thanks again for reporting this.
Joel -
Hi,
I have created a package to populate data dynamically but i am getting error .Please help me out ....
ORA-00932: inconsistent datatypes: expected UDT got CHAR
Here i am giving you the code details :
CREATE TABLE ip_lov_hdr
(table_id VARCHAR2(50) NOT NULL,
table_name VARCHAR2(30) NOT NULL,
col_name VARCHAR2(30) NOT NULL,
codetype VARCHAR2(2))
PCTFREE 10
INITRANS 1
MAXTRANS 255
ALTER TABLE ip_lov_hdr
ADD CONSTRAINT pk_lov_hdr PRIMARY KEY (table_id)
USING INDEX
PCTFREE 10
INITRANS 2
MAXTRANS 255
CREATE TABLE ip_lov_dtl
(table_id VARCHAR2(50) NOT NULL,
col_name VARCHAR2(30) NOT NULL)
PCTFREE 10
INITRANS 1
MAXTRANS 255
ALTER TABLE ip_lov_dtl
ADD CONSTRAINT pk_lov_dtl PRIMARY KEY (table_id, col_name)
USING INDEX
PCTFREE 10
INITRANS 2
MAXTRANS 255
ALTER TABLE ip_lov_dtl
ADD CONSTRAINT fk_lov_hdr FOREIGN KEY (table_id)
REFERENCES ip_lov_hdr (table_id) ON DELETE SET NULL
create or replace PACKAGE PKG_LOV
AS
## Package Name : List of Values(LOV) ##
## Application : iProcurement ##
## Functionality : Fetches the vales for a indput tables ##
## Input parameters : tab_id ,col_value ##
## Output parameters: List of Values ##
## Author : Subhendu Bikash ##
## Date : 07/12/2008 ##
## Modification Log ##
## Author Date Changes ##
## xxxxxxx mm/dd/yyyy Added xxxx ##
PROCEDURE p_recordtypevariable (tab_id IN VARCHAR2, err_msg OUT VARCHAR2);
/* Table type variable declaration */
TYPE listtable IS TABLE OF out_rec_lov ;
PROCEDURE p_getlov (
tab_id IN VARCHAR2,
col_value IN VARCHAR2,
outlist OUT listtable,
err_msg OUT VARCHAR2);
END;
create or replace PACKAGE BODY PKG_LOV AS
PROCEDURE P_RECORDTYPEVARIABLE (tab_id IN VARCHAR2, err_msg OUT VARCHAR2)
IS
sqlstmt VARCHAR2 (2000);
col_str VARCHAR2 (2000);
i NUMBER := 0;
l_table_name ip_lov_hdr.table_name%TYPE;
l_col_name ip_lov_hdr.col_name%TYPE;
l_codetype ip_lov_hdr.codetype%TYPE;
l_datatype varchar2(100);
invalid_tableid EXCEPTION;
BEGIN
BEGIN
SELECT a.table_name,
a.codetype,
a.col_name,
b.data_type||'('||b.data_length||')'
INTO l_table_name,
l_codetype,
l_col_name ,
l_datatype
FROM ip_lov_hdr a,user_tab_columns b
WHERE UPPER (a.table_id) = UPPER ('emp_id')
AND upper(a.table_name)=upper(b.table_name)
AND upper(a.col_name) = upper(b.column_name);
EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE invalid_tableid;
END;
col_str := 'CREATE OR REPLACE TYPE out_rec_lov AS OBJECT('||l_col_name||' '||l_datatype;
FOR rec IN (SELECT b.col_name,c.data_type||'('||c.data_length||')' datatype FROM ip_lov_hdr a,ip_lov_dtl b,user_tab_columns c
WHERE UPPER (b.table_id) = UPPER (tab_id)
AND UPPER (a.table_id) = UPPER (b.table_id)
AND UPPER (a.table_name)=UPPER (c.table_name)
AND UPPER (b.col_name ) = UPPER (c.column_name))
LOOP
col_str := col_str || ','|| rec.col_name|| ' '|| rec.datatype;
END LOOP;
sqlstmt := col_str || ')';
EXECUTE IMMEDIATE (sqlstmt);
EXCEPTION
WHEN invalid_tableid THEN
err_msg := 'Table is not defined ';
WHEN OTHERS THEN
err_msg := SUBSTR (SQLERRM, 1, 500);
END p_recordtypevariable;
PROCEDURE P_getLov(tab_id in VARCHAR2 ,
col_value in varchar2 ,
outlist out listtable,
Err_msg out varchar2 )
IS
query_str varchar2(2000);
col_str varchar2(2000);
TYPE cur_typ IS REF CURSOR;
c cur_typ;
i number:=0;
l_table_name IP_LOV_HDR.table_name%Type;
l_col_name IP_LOV_HDR.col_name%Type;
l_codetype IP_LOV_HDR.codetype%Type;
BEGIN
Begin
Select Table_name,Codetype,col_name Into l_table_name,l_codetype,l_col_name
From IP_LOV_HDR
Where upper(Table_id)=upper(tab_id);
Exception When No_data_Found Then
Null;
End;
col_str :=l_Col_name;
For Rec in (Select Col_name From IP_LOV_Dtl Where Table_id=tab_id)
Loop
col_str :=col_str||','||Rec.Col_name;
End loop;
--col_str :=substr(col_str,8 );
If l_Codetype is Null then
query_str := 'SELECT ' ||col_str|| ' FROM ' || l_table_name || ' WHERE '|| l_col_name || ' like :col_value';
Else
query_str := 'SELECT ' ||col_str|| ' FROM '
|| l_table_name || ' WHERE Codetype ='||l_Codetype||' And '|| l_col_name || ' like :col_value';
End If;
Begin
OPEN c FOR query_str USING col_value;
LOOP
FETCH c INTO outlist(i);
i := i + 1;
EXIT WHEN c%NOTFOUND;
END LOOP;
CLOSE c;
Exception When Others then
err_msg := SUBSTR(SQLERRM, 1, 500);
End;
Exception When Others then
err_msg := SUBSTR(SQLERRM, 1, 500);
End P_getLov;
END pkg_lov;
/Hi,
Welcome to the forum!
Please add the code for the type out_rec_lov because it's missing and I can't compile without errors the package.
Regards,
Tip: to improve code readability enclose it between {noformat}{noformat} tags (start and end tags are the same) :) -
Error while using UTL_FILE
I am getting the following error while using UTL_FILE procedure while using UTL_FILE.FOPEN procedure
from system account. I am using Windows XP with NTFS.
SQL> create or replace directory FILE_DIR as 'C:\'
2 /
Directory created.
SQL> grant read on directory FILE_DIR to public;
Grant succeeded.
1 create or replace PROCEDURE file_upload IS
2 v_file_name VARCHAR2(200);
3 v_file_type UTL_FILE.FILE_TYPE;
4 v_line VARCHAR2(1000);
5 BEGIN
6 v_file_name := 'customers_'||TO_CHAR(SYSDATE,'dd')||TO_CHAR(SYSDATE,'MON')||TO_CHAR(SYSDATE,'YYYY')||'.txt';
7 v_file_type := UTL_FILE.FOPEN('FILE_DIR','V_FILE_NAME','r',1000);
8 UTL_FILE.GET_LINE(v_file_type,V_LINE,1000);
9 UTL_FILE.FCLOSE(v_file_type);
10 DBMS_OUTPUT.PUT_LINE(V_LINE);
11* END;
SQL> exec file_upload;
BEGIN file_upload; END;
ERROR at line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475
ORA-29283: invalid file operation
ORA-06512: at "SYSTEM.FILE_UPLOAD", line 7
ORA-06512: at line 1
I appreciate if someone can help me in this regard.
Thanks in Advance.
Regards
Muhammad ALiHello,
What exactly are you trying to do? Here I got 2 examples for you , replace with your directory name and pick right option for 'a' (append) or 'w' (write) or 'R' (read).
To read from a directory_ . This will read an existing file 'customer.txt" from the directory
{code}
CREATE OR REPLACE PROCEDURE .file_upload
IS
v_file_name VARCHAR2 (200);
v_file_type UTL_FILE.file_type;
v_line VARCHAR2 (1000);
BEGIN
v_file_name := 'customers.txt';
v_file_type := UTL_FILE.fopen ('EXT_TABLES', v_file_name, 'R');
UTL_FILE.get_line (v_file_type, v_line); -- Error was here
DBMS_OUTPUT.put_line (v_line);
UTL_FILE.fclose (v_file_type);
END;
{code}
_*To open a file*_ This will create customer_XXXXX file under the directory
{code}
CREATE OR REPLACE PROCEDURE testme.file_upload
IS
v_file_name VARCHAR2 (200);
v_file_type UTL_FILE.file_type;
v_line VARCHAR2 (1000);
BEGIN
v_file_name := 'customers_'
|| TO_CHAR (SYSDATE, 'dd')
|| TO_CHAR (SYSDATE, 'MON')
|| TO_CHAR (SYSDATE, 'YYYY')
|| '.txt';
v_file_type := UTL_FILE.fopen ('EXT_TABLES', v_file_name, 'a');
UTL_FILE.put_line (v_file_type, v_line);
DBMS_OUTPUT.put_line (v_line);
UTL_FILE.fclose (v_file_type);
END;
{code}
Regards
Edited by: OrionNet on Jan 29, 2009 12:30 AM -
In Oracle 10g Error while using COLLECT
I getting error while using collect in 10g
SQL> ed
Wrote file afiedt.buf
1 SELECT deptno
2 , COLLECT(ename) AS emps
3 FROM emp
4 GROUP BY
5* deptno
SQL> /
, COLLECT(ename) AS emps
ERROR at line 2:
ORA-00932: inconsistent datatypes: expected NUMBER got -
Please give me the solution.you are using old version of SQL*Plus. if you use later version it will give you correct result.
Edited by: unus on Mar 14, 2010 4:25 AM -
Hi,
I am getting the following oracle error while using exp,
can someone please suggest on this,
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user SIEBEL
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user SIEBEL
About to export SIEBEL's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export SIEBEL's tables via Conventional Path ...
. . exporting table EIM_ACCDTL_TNT
EXP-00008: ORACLE error 904 encountered
ORA-00904: "MAXSIZE": invalid identifier
. . exporting table EIM_ACCNTROUTE
EXP-00008: ORACLE error 1003 encountered
ORA-01003: no statement parsed
. . exporting table EIM_ACCNT_CUT
EXP-00008: ORACLE error 904 encountered
ORA-00904: "MAXSIZE": invalid identifier
. . exporting table EIM_ACCNT_DTL
EXP-00008: ORACLE error 1003 encountered
ORA-01003: no statement parsedSatish is right, there exists bug for 11.1.0.6.
Look at metalink note 741984.1.
Bug number is 5872788 - there exists patch as well. -
Error while using the export utility
Dear all of
I am getting the following error while using the export utility in the Oracle database 9i
I have run the catexp.sql and catrm.sql suggested by the experts in this forum. But it did not help me. Kindly help me in solving this issue.
FOLLOWING ARE THE ERROR ----------------------------
EXP-00008: ORACLE error 942 encountered
ORA-00942: table or view does not exist
EXP-00024: Export views not installed, please notify your DBA
EXP-00000: Export terminated unsuccessfully
-----------------------------------------------------------------------------------------------------------------------------------Can you go to this discussion please.
Re: Getting a strange error for Exp
-aijaz -
3-1674105521 Multiple Paths error while using Bridge Table
https://support.us.oracle.com/oip/faces/secure/srm/srview/SRViewStandalone.jspx?sr=3-1674105521
Customer Smiths Medical International Limited
Description: Multiple Paths error while using Bridge Table
1. I have a urgent customer encounterd a design issue and customer was trying to add 3 logical joins between SDI_GPOUP_MEMBERSHIP and these 3 tables (FACT_HOSPITAL_FINANCE_DTLS, FACT_HOSPITAL_BEDS_UTILZN and FACT_HOSPITAL_ATRIBUTES)
2. They found found out by adding these 3 joins, they ended with circular error.
[nQSError: 15001] Could not load navigation space for subject area GXODS.
[nQSError: 15009] Multiple paths exist to table DIM_SDI_CUSTOMER_DEMOGRAPHICS. Circular logical schemas are not supported.
In response to this circular error, the developer was able to bypass the error using aliases, but this is not desired by client.
3. They want to know how to avoid this error totally without using alias table and suggest a way to resolve the circular join(Multiple Path) error.
Appreciated if someone can give some pointer or suggestion as the customer is in stiff deadline.
Thanks
TeikThe strange thing compared to your output is that I get an error when I have table prefix in the query block:
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** DUMPFILE=TMP1.dmp LOGFILE=imp.log PARALLEL=8 QUERY=SYSADM.TMP1:"WHERE TMP1.A = 2" REMAP_TABLE=SYSADM.TMP1:TMP3 CONTENT=DATA_ONLY
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
ORA-31693: Table data object "SYSADM"."TMP3" failed to load/unload and is being skipped due to error:
ORA-38500: Unsupported operation: Oracle XML DB not present
Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 1 error(s) at Fri Dec 13 10:39:11 2013 elapsed 0 00:00:03
And if I remove it, it works:
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** DUMPFILE=TMP1.dmp LOGFILE=imp.log PARALLEL=8 QUERY=SYSADM.TMP1:"WHERE A = 2" REMAP_TABLE=SYSADM.TMP1:TMP3 CONTENT=DATA_ONLY
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "SYSADM"."TMP3" 5.406 KB 1 out of 2 rows
Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Fri Dec 13 10:36:50 2013 elapsed 0 00:00:01
Nicolas.
PS: as you can see, I'm on 11.2.0.4, I do not have 11.2.0.1 that you seem to use. -
Error while using pt:standard.choose tag
Hi,
I am getting error while using the ALUI 6.5 Adaptive tags. The details are given below. Can anyone help?
The code I am using is
<pt:standard.choose>
<pt:standard.when pt:test="stringToACLGroup('user=13009;').isMember($currentUser)">
<div class="ali-portlet-controlone">Adit</div>
<pt:logic.value pt:value="$currentUser"/>
<pt:logic.value pt:value="checking Tags"/>
</pt:standard.when>
</pt:standard.choose>
Also I checked for the variable $currentUser and it was displaying null so I set the variable as
<pt:logic.variable pt:key="currentUser" pt:value="13009"/>
I aslo checked by giving the group id in stringToACLGroup('group=301;') but same result.
The stack trace is ::
<!--Error displaying tag when in library standard. String index out of range: -19: com.plumtree.openfoundation.util.XPIndexOutOfBoundsException: String index out of range: -19
at com.plumtree.openfoundation.util.XPException.GetInstance(XPException.java:403)
at com.plumtree.openfoundation.util.XPException.GetInstance(XPException.java:350)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:165)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.standard.ChooseTag.DisplayTag(ChooseTag.java:110)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.logic.IfFalseTag.DisplayTag(IfFalseTag.java:75)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.logic.IfTag.DisplayTag(IfTag.java:71)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.core.HTMLTag.DisplayTag(HTMLTag.java:78)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.core.HTMLTag.DisplayTag(HTMLTag.java:78)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.logic.ForEachTag.DisplayTag(ForEachTag.java:162)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.bea.alui.taglib.portletpage.PortletRegionDisplayTag.DisplayTag(PortletRegionDisplayTag.java:91)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.displaytree.DisplayTree.ExecuteTags(DisplayTree.java:235)
at com.plumtree.portaluiinfrastructure.tags.displaytree.DisplayTree.ProcessTagMarkup(DisplayTree.java:39)
at com.plumtree.portaluiinfrastructure.layout.impl.LayoutDisplay.ProcessLayout(LayoutDisplay.java:24)
at com.plumtree.portalpages.common.uiparts.PlumtreeDP.DisplayLayout(PlumtreeDP.java:243)
at com.plumtree.portalpages.browsing.myportal.MyPortalDP.PageDisplay(MyPortalDP.java:166)
at com.bea.alui.taglib.basepage.ContentTag.DisplayTag(ContentTag.java:71)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.bea.alui.taglib.basepage.PageBodyTag.DisplayTag(PageBodyTag.java:135)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.displaytree.DisplayTree.ExecuteTags(DisplayTree.java:235)
at com.plumtree.portaluiinfrastructure.tags.displaytree.DisplayTree.ProcessTagMarkup(DisplayTree.java:39)
at com.plumtree.portaluiinfrastructure.layout.impl.LayoutDisplay.ProcessLayout(LayoutDisplay.java:24)
at com.plumtree.portaluiinfrastructure.layout.impl.LayoutDisplay.ProcessMainPageLayout(LayoutDisplay.java:44)
at com.plumtree.portalpages.common.uiparts.PlumtreeDP.DisplayLayout(PlumtreeDP.java:240)
at com.plumtree.portalpages.common.uiparts.PlumtreeDP.DisplayLayout(PlumtreeDP.java:219)
at com.plumtree.portalpages.common.uiparts.PlumtreeDP.Display(PlumtreeDP.java:151)
at com.plumtree.uiinfrastructure.interpreter.Interpreter.HandleDisplayPage(Interpreter.java:2140)
at com.plumtree.uiinfrastructure.interpreter.Interpreter.HandleRequest(Interpreter.java:657)
at com.plumtree.uiinfrastructure.interpreter.Interpreter.DoService(Interpreter.java:190)
at com.plumtree.uiinfrastructure.web.XPPage.service(XPPage.java:300)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -19
at java.lang.String.substring(String.java:1938)
at com.plumtree.taglib.standard.WhenTag.DisplayTag(WhenTag.java:72)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.standard.ChooseTag.DisplayTag(ChooseTag.java:110)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.logic.IfFalseTag.DisplayTag(IfFalseTag.java:75)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.logic.IfTag.DisplayTag(IfTag.java:71)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.core.HTMLTag.DisplayTag(HTMLTag.java:78)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.core.HTMLTag.DisplayTag(HTMLTag.java:78)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.plumtree.taglib.logic.ForEachTag.DisplayTag(ForEachTag.java:162)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.bea.alui.taglib.portletpage.PortletRegionDisplayTag.DisplayTag(PortletRegionDisplayTag.java:91)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.displaytree.DisplayTree.ExecuteTags(DisplayTree.java:235)
at com.plumtree.portaluiinfrastructure.tags.displaytree.DisplayTree.ProcessTagMarkup(DisplayTree.java:39)
at com.plumtree.portaluiinfrastructure.layout.impl.LayoutDisplay.ProcessLayout(LayoutDisplay.java:24)
at com.plumtree.portalpages.common.uiparts.PlumtreeDP.DisplayLayout(PlumtreeDP.java:243)
at com.plumtree.portalpages.browsing.myportal.MyPortalDP.PageDisplay(MyPortalDP.java:166)
at com.bea.alui.taglib.basepage.ContentTag.DisplayTag(ContentTag.java:71)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.ProcessTagBody(TagHelper.java:124)
at com.plumtree.portaluiinfrastructure.tags.ATag.ProcessTagBody(ATag.java:401)
at com.bea.alui.taglib.basepage.PageBodyTag.DisplayTag(PageBodyTag.java:135)
at com.plumtree.portaluiinfrastructure.tags.helper.TagHelper.DisplayTag(TagHelper.java:1231)
at com.plumtree.portaluiinfrastructure.tags.displaytree.TagDisplayElement.Display(TagDisplayElement.java:145)
at com.plumtree.portaluiinfrastructure.tags.displaytree.CompositeDisplayElement.Display(CompositeDisplayElement.java:66)
at com.plumtree.portaluiinfrastructure.tags.displaytree.DisplayTree.ExecuteTags(DisplayTree.java:235)
at com.plumtree.portaluiinfrastructure.tags.displaytree.DisplayTree.ProcessTagMarkup(DisplayTree.java:39)
at com.plumtree.portaluiinfrastructure.layout.impl.LayoutDisplay.ProcessLayout(LayoutDisplay.java:24)
at com.plumtree.portaluiinfrastructure.layout.impl.LayoutDisplay.ProcessMainPageLayout(LayoutDisplay.java:44)
at com.plumtree.portalpages.common.uiparts.PlumtreeDP.DisplayLayout(PlumtreeDP.java:240)
at com.plumtree.portalpages.common.uiparts.PlumtreeDP.DisplayLayout(PlumtreeDP.java:219)
at com.plumtree.portalpages.common.uiparts.PlumtreeDP.Display(PlumtreeDP.java:151)
at com.plumtree.uiinfrastructure.interpreter.Interpreter.HandleDisplayPage(Interpreter.java:2140)
at com.plumtree.uiinfrastructure.interpreter.Interpreter.HandleRequest(Interpreter.java:657)
at com.plumtree.uiinfrastructure.interpreter.Interpreter.DoService(Interpreter.java:190)
at com.plumtree.uiinfrastructure.web.XPPage.service(XPPage.java:300)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3495)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Edited by: user590322 on Oct 29, 2009 12:22 AMProper usage:
<pt:standard.choose>
<pt:when pt:test="stringToACLGroup('user=1;').isMember($currentuser)">
... secret administrator content ...
</pt:when>
</pt:standard.choose>
Note that it's pt:when and not pt:standard.when. Also, Joel is right -- I think $currentuser is case sensitive.
Chris Bucchere
http://bucchere.com
http://twitter.com/bucchere
Maybe you are looking for
-
IPad Mini Retina not syncing with iTunes
My iPad Mini Retina has not been syncing with iTunes for some time. I have reset it - by holding down the home and power key. I am using the new Macbook Air 2014 - because it has crashed on a few occasions it has also been restarted recently. I am
-
Flash player goes green and crackling
For the last couple of months any time i use the flash player for anything after either a few mins or even a few seconds the video stops, the timer on the bottom starts fast forwarding and the screen goes green. All you can hear then is a crackling s
-
I have just purchased an iMac for home - am I able to network an iMac with a windows laptop?
I have just purchased an iMac for home - am I able to network an iMac with a windows laptop?
-
Experts, I need to transport the portal content (only the IViews, pages, systems etc and not the background WD application!) from the dev box to the QA and later Production. Do i use the transport functionality provided in the portal for this?? Can t
-
Photoshop Elements 12 Installation Problems
Photoshop Elements 12 installs fine on a Windows XPSP3 platform (from C:\Documents and Settings\UserName\Desktop\Adobe Photoshop Elements 12). On a Windows 7 SP1 platform C:\Users\....\Desktop\Adobe Photoshop Elements 12, but will not run Error 1000