Trying to implement a ENABLE NOVALIDATE constraint.....

Hi ,
In order to see how the ENABLE NOVALIDATE constraint in the DEPT table of SCOTT schema , i followed the following steps:
1)Disable state
SQL> alter table dept modify constraint pk_dept disable;
Table altered2)Perform the operation (insert a row in for which the deptno preexists )
SQL> insert into dept(deptno,dname) values(10,'dname10');
1 row inserted
SQL> commit;
Commit complete3)Enable novalidate state
SQL> alter table dept modify constraint pk_dept novalidate;
Table altered4)Enable state
SQL> alter table dept modify constraint pk_dept enable;
alter table dept modify constraint pk_dept enable
ORA-02437:cannot validate (SCOTT.PK_DEPT) - primary key violatedHow can i solve the problem.....?????
Many thanks,
Simon

Hi,
I haven't found any use of the NOVALIDATE parameter in the constraint.....
In Oracle doc ... it's pointed out:
"When a constraint is in the enable novalidate state, all subsequent statements are checked for conformity to the constraint. However, any existing data in the table is not checked. A table with enable novalidated constraints can contain invalid data, but it is not possible to add new invalid data to it. Enabling constraints in the novalidated state is most useful in data warehouse configurations that are uploading valid OLTP data.
Enabling a constraint does not require validation. Enabling a constraint novalidate is much faster than enabling and validating a constraint. Also, validating a constraint that is already enabled does not require any DML locks during validation (unlike validating a previously disabled constraint). Enforcement guarantees that no violations are introduced during the validation. Hence, enabling without validating enables you to reduce the downtime typically associated with enabling a constraint."
I have followed the steps in my first post to run a test case in order to see that the sentence above in bold, is implemented....
But an error is displayed.....
What should i have to do......????
Many thanks ,
Simon

Similar Messages

  • ENABLE NOVALIDATE CONSTRAINT SYNTAX

    Hi,
    I have a table it's called loadsurvey which having some duplicate records. I would like to implement unique constraint on my table using following command which should not allow any new duplicate record into table and do not wants to validate existing record.
    ALTER TABLE LOADSURVEY ADD ENABLE NOVALIDATE
    CONSTRAINT LOAD_UNIQUE_CONS UNIQUE (METERNO,DAT,TIM);
    SQL COMMAND WINDOWS SHOWS "ORA-01735: INVALID ALTER TABLE OPTION"
    Any help me to come out the problem.
    Regards,
    Saravanan.

    The syntax is
    alter table .... add constraint ... (<column>) enable novalidate;
    Please try to avoid using all uppercase for the subject line.
    You don't need to shout.
    Sybrand Bakker
    Senior Oracle DBA

  • Speeding up enable of constraints

    I have various constraints that used to take seconds and now are taking up to half an hr to enable. The data in the tables is static, it has increased or decreased. Does anyone know how to speed up the enabling of constraints on a table? What goes on behind the scenes after issuing alter table <table_name> enable constraint <constraint_name>;
    Thankis

    Dear HouseofHunger,
    Please tell me if that online documentation is enough for you or not?
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_3001.htm#i2183600
    +"+
    +Restrictions on Modifying Constraints Modifying constraints is subject to the following restrictions:+
    +*You cannot change the state of a NOT DEFERRABLE constraint to INITIALLY DEFERRED.+
    +*If you specify this clause for an index-organized table, then you cannot specify any other clauses in the same statement.+
    +*You cannot change the NOT NULL constraint on a foreign key column of a reference-partitioned table, and you cannot change the state of a partitioning referential constraint of a reference-partitioned table.+
    +See Also:+
    +"*Changing the State of a Constraint: Examples*"+
    +"+
    +"+
    +Changing the State of a Constraint: Examples The following statement places in ENABLE VALIDATE state an integrity constraint named emp_manager_fk in the employees table:+
    +ALTER TABLE employees+
    +ENABLE VALIDATE CONSTRAINT emp_manager_fk+
    +EXCEPTIONS INTO exceptions;+
    +Each row of the employees table must satisfy the constraint for Oracle Database to enable the constraint. If any row violates the constraint, then the constraint remains disabled. The database lists any exceptions in the table exceptions. You can also identify the exceptions in the employees table with the following statement:+
    +SELECT e.*+
    +FROM employees e, exceptions ex+
    +WHERE e.rowid = ex.row_id+
    +AND ex.table_name = 'EMPLOYEES'+
    +AND ex.constraint = 'EMP_MANAGER_FK';+
    +The following statement tries to place in ENABLE NOVALIDATE state two constraints on the employees table:+
    +ALTER TABLE employees+
    +ENABLE NOVALIDATE PRIMARY KEY+
    +ENABLE NOVALIDATE CONSTRAINT emp_last_name_nn;+
    +This statement has two ENABLE clauses:+
    +*The first places a primary key constraint on the table in ENABLE NOVALIDATE state.+
    +*The second places the constraint named emp_last_name_nn in ENABLE NOVALIDATE state.+
    +In this case, Oracle Database enables the constraints only if both are satisfied by each row in the table. If any row violates either constraint, then the database returns an error and both constraints remain disabled.+
    +Consider the foreign key constraint on the location_id column of the departments table, which references the primary key of the locations table. The following statement disables the primary key of the locations table:+
    +ALTER TABLE locations+
    +MODIFY PRIMARY KEY DISABLE CASCADE;+
    +The unique key in the locations table is referenced by the foreign key in the departments table, so you must specify CASCADE to disable the primary key. This clause disables the foreign key as well.+
    +"+
    Hope That Helps.
    Ogan

  • Enable Novalidate a table constraint

    I created a table with a unique constraint on one column DISABLED. I then proceeded to insert duplicate data in this field. When I try to ENABLE NOVALIDATE this constraint, I get the error ORA-02299: cannot validate (SCOTT.SARAH_U) - duplicate keys found. With the NOVALIDATE option, shouldn't it ignore existing records?
    My statement was: alter table sarah enable novalidate unique (cd);
    It seems as if the "novalidate" keyword is not being read.
    Thanks for any help.

    The syntax is:
    SQL> ALTER TABLE scott.sarah_u MODIFY CONSTRAINT <constraint_name> ENABLE NOVALIDATE;
    Hope this helps!
    Rob
    I created a table with a unique constraint on one column DISABLED. I then proceeded to insert duplicate data in this field. When I try to ENABLE NOVALIDATE this constraint, I get the error ORA-02299: cannot validate (SCOTT.SARAH_U) - duplicate keys found. With the NOVALIDATE option, shouldn't it ignore existing records?
    My statement was: alter table sarah enable novalidate unique (cd);
    It seems as if the "novalidate" keyword is not being read.
    Thanks for any help.

  • Questions on ENABLE NOVALIDATE a constraint

    I run the command on Oracle 11.2.0.1 on Redhat 5.2SQL> alter table agency add constraint agency_agcy_ori unique (agcy_ori) ENABLE NOVALIDATE;
    alter table agency add constraint agency_agcy_ori unique (agcy_ori) ENABLE NOVALIDATE
    ERROR at line 1:
    ORA-02299: cannot validate (DEVPF.AGENCY_AGCY_ORI) - duplicate keys found I knew the table has duplicate and null in the column which I want to add unique constraint. Using NOVALIDATE, I expect it tolarates the exist duplicate and valid new added data for uniqueness. Because it is stated in Oracle DOc B28286 that (page 8-15) ENABLE NOVALIDATE ensures that all new DML operations on the constrained
    data comply with the constraint. This clause does not ensure that existing data in
    the table complies with the constraintHowever, my database does not agree with this. Did I misunderstood the doc?
    Other related questions
    1) I have two rows with the column agcy_ori is NULL. Would that be considered duplicate and fails VALIDATE when create a unique constraint.
    2) The same doc also states (page 8-16) DISABLE VALIDATE disables the constraint and drops the index on the constraint,
    but keeps the constraint valid. This feature is most useful in data warehousing
    situations, because it lets you load large amounts of data while also saving space
    by not having an index. This setting lets you load data from a nonpartitioned table
    into a partitioned table using the exchange_partition_clause of the ALTER
    TABLE statement or using SQL*Loader. All other modifications to the table
    (inserts, updates, and deletes) by other SQL statements are disallowedThis raises more questions:
    a) DISABLE VALIDATE an unique constraint drop the unique index but still validate uniqueness. This is saying that te uniqueness is maintained without an unique index. If that is possible, why ENABLE an unique constraint need to create an unique index?
    b) The last setense 'All other modifications to the table by other SQL statements are disallowed'. This actually make the table read only except for partition/nonpartition and SQL*LOADER. This can be a useful feature but I do not see the logic here: Cannot update column2 of the table just because a constraint in column 10 is DISABLE VALIDATE.
    Hope people can help me here. Thanks.

    Re-read the documentation on the ENABLE clause
    at http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/clauses002.htm#g1053592
    ENABLE Clause
    Specify ENABLE if you want the constraint to be applied to the data in the table.
    +If you enable a unique or primary key constraint, and if no index exists on the key, then Oracle Database creates a unique index. Unless you specify KEEP INDEX when subsequently disabling the constraint, this index is dropped and the database rebuilds the index every time the constraint is reenabled.+
    You can also avoid rebuilding the index and eliminate redundant indexes by creating new primary key and unique constraints initially disabled. Then create (or use existing) nonunique indexes to enforce the constraint. Oracle does not drop a nonunique index when the constraint is disabled, so subsequent ENABLE operations are facilitated.
    Create a non-unique Index first.
    Hemant K Chitale

  • ENABLE NOVALIDATE

    Hi ALL,
    I have a table app_news_likee.
    Column Name     ID     Pk     Null?     Data Type     Default     Histogram     Encryption Alg     Salt
    TITLE     1          Y     VARCHAR2 (2000 Char)          Yes          
    CONTENT     2          Y     VARCHAR2 (2000 Byte)          Yes          
    START_DATE     3          Y     DATE          Yes          
    END_DATE     4          Y     DATE          Yes          
    CREATED_BY     5          Y     VARCHAR2 (8 Byte)          Yes          
    CREATED_TS     6          Y     DATE          Yes          
    NEWS_LINK     7          Y     VARCHAR2 (100 Byte)          Yes          
    NEWS_URL     8          Y     VARCHAR2 (256 Byte)          Yes          
    BANNER     9          Y     CHAR (1 Byte)          Yes     
    I would like to modify the column BANNER to varchar2(1BYTE) instead of CHAR (1 Byte) without affecting the existing records.
    I tried
    alter table app_news_likee modify BANNER VARCHAR2(1BYTE) ENABLE NOVALIDATE;
    It errored out saying : missing keyword
    Am I missing something here?
    Appreciate your help!
    Thanks in advance!
    BM

    your constraint modification should be seperate from your column modification:
    SQL> create table xyz (
      2  banner char(1) ,
      3  constraint check_xyz check (banner in ('X','Y','Z'))
      4  )
      5  /
    Table created.
    SQL>
    SQL>
    SQL> alter table xyz modify BANNER VARCHAR2(1)
      2  /
    Table altered.
    SQL>
    SQL> alter table xyz modify constraints check_xyz enable novalidate
      2  /
    Table altered.Edited by: bluefrog on Mar 4, 2010 3:06 PM

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader.

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader.
    For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer.
    "C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>".
    Current Situation: The above command line parameter when executed is working as expected in a User's Workspace.
    When executed in a command line on the Application Server, it is working as expected.
    But, the same is not working while executing it from Deployed environment.
    Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2.
    Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a

    We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.

    This is the Acrobat.com forum.  Your question will have a much better chance being addressed in the Acrobat SDK forum.

  • Paralell in enable unique constraint

    TO use the feature of EXCEPTION into when creating unique index, I run the folllwing command to enable a unique constraints:
    alter table TEST_DUP2 enable constraint UNQ_TEST_DUP2     
    using index tablespace EDWSALESINDEX nologging
    EXCEPTIONS into exceptions
    This will create the unique index and when duplicate uniqe key encountered, the command fails and store the rowid of the duplicating row to exceptions table.
    Now I want to run this commnad in parallel to enhance performance. I tried
    alter table TEST_DUP2 enable constraint UNQ_TEST_DUP2     
    using index tablespace EDWSALESINDEX nologging PARALLEL
    EXCEPTIONS into exceptions
    and I got SQL Error: ORA-00933: SQL command not properly ended.
    Can this be done, or are there any worka around ?
    I do not want create unique index explicitly as that does not have the EXCEPTION into feature.
    Thanks

    Here is an example for exceptions,
    SQL> create table e( a number);
    Table created.
    SQL> alter table add constraint a_uk unique(a);
    alter table add constraint a_uk unique(a)
    ERROR at line 1:
    ORA-00903: invalid table name
    SQL> alter table e add constraint a_uk unique(a);
    Table altered.
    SQL> alter table e modify constraint a_uk disable;
    Table altered.
    SQL> host
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Aman>d:
    D:\>cd oracle\product\11.1.0\db_1\RDBMS\ADMIN
    D:\oracle\product\11.1.0\db_1\RDBMS\ADMIN>exit
    SQL> @utlexcpt.sql
    SP2-0310: unable to open file "utlexcpt.sql"
    SQL> host dir utlex*
    Volume in drive C is VAIO
    Volume Serial Number is 54A5-8EF0
    Directory of C:\Documents and Settings\Aman
    File Not Found
    SQL> host dir utl*
    Volume in drive C is VAIO
    Volume Serial Number is 54A5-8EF0
    Directory of C:\Documents and Settings\Aman
    File Not Found
    SQL> hist
    SP2-0042: unknown command "hist" - rest of line ignored.
    SQL> host
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Aman>d:\oracle\product\11.1.0\db_1\RDBMS\ADMIN
    'd:\oracle\product\11.1.0\db_1\RDBMS\ADMIN' is not recognized as an internal or extern
    operable program or batch file.
    C:\Documents and Settings\Aman>cd d:\oracle\product\11.1.0\db_1\RDBMS\ADMIN
    C:\Documents and Settings\Aman>sqlplus aman/aman
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon Sep 15 22:02:20 2008
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing options
    SQL>
    SQL> d:\oracle\product\11.1.0\db_1\RDBMS\ADMIN
    SP2-0734: unknown command beginning "d:\oracle\..." - rest of line ignored.
    SQL> @d:\oracle\product\11.1.0\db_1\RDBMS\ADMIN\utlexcpt.sql
    Table created.
    SQL> insert into e values(1);
    1 row created.
    SQL> /
    1 row created.
    SQL> /
    1 row created.
    SQL> alter table e modify constraint a_uk  enable validate exceptions into exceptions;
    alter table e modify constraint a_uk  enable validate exceptions into exceptions
    ERROR at line 1:
    ORA-02299: cannot validate (AMAN.A_UK) - duplicate keys found
    SQL> select * from exceptions;
    ROW_ID             OWNER                          TABLE_NAME
    CONSTRAINT
    AAARXIAAGAAAAAVAAC AMAN                           E
    A_UK
    AAARXIAAGAAAAAVAAB AMAN                           E
    A_UK
    AAARXIAAGAAAAAVAAA AMAN                           E
    A_UK
    SQL> select * from exceptions;Its on 11106.The same must work on pre 11g also.Do this and let me know.
    Yup,Parallel is unimplemented surely enough,
    SQL> alter table e
      2  enable validate constraint a_uk using index  tablespace nologging parallel;
    enable validate constraint a_uk using index  tablespace nologging parallel
    ERROR at line 2:
    ORA-03001: unimplemented featureAnd here is the reason for it,
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_3001.htm#i2054940
    The clause Parallel is not a right clase for this command.
    Hope this helps
    Aman....
    Edited by: Aman.... on Sep 15, 2008 10:08 PM

  • Trying to implement MAA on 4node race

    Subject: Trying to implement MAA on 4node race
    RDBMS Version: 10.2.0.3
    Operating System and Version: Solaris 5.9
    Error Number (if applicable): ORA-12154
    Product (i.e. SQL*Loader, Import, etc.): DATAGUARD
    Product Version: 10.2.0.3
    Trying to implement MAA on 4node race
    Can anyone clarify my questions related to RAC & DATAGUARD.
    We are trying to implement 4node physical standby, our primary is a 4node RAC.
    How does oracle ship the archive logs and apply at the secondary(physical standby). Does we need to mount all the instances on the physical standby or only one instance?
    what we have done is mounted one instance recovered the primary database at physical standby.
    We are currently shipping the logs manually and recovering at the physical. we are hoping that the automatic shipping of archive logs and recovery at the physical, will catch up when its current. Is my assumption correct???
    On the primary we see the following eroors:
    Redo shipping client performing standby login
    OCIServerAttach failed -1
    .. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 14:56:12.338 61287 kcrr.c
    Error 12154 received logging on to the standby
    Error 12154 connecting to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    Error 12154 attaching to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 14:56:12.338 61287 kcrr.c
    PING[ARC1]: Heartbeat failed to connect to standby 'CP00TSG002'. Error is 12154.
    *** 2007-11-05 14:56:12.338 59530 kcrr.c
    kcrrfail: dest:3 err:12154 force:0 blast:1
    *** 2007-11-05 15:01:16.450
    Redo shipping client performing standby login
    OCIServerAttach failed -1
    .. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 15:01:18.208 61287 kcrr.c
    Error 12154 received logging on to the standby
    Error 12154 connecting to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    Error 12154 attaching to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 15:01:18.209 61287 kcrr.c
    PING[ARC1]: Heartbeat failed to connect to standby 'CP00TSG002'. Error is 12154.
    *** 2007-11-05 15:01:18.209 59530 kcrr.c
    kcrrfail: dest:3 err:12154 force:0 blast:1
    *** 2007-11-05 15:06:22.682
    Redo shipping client performing standby login
    OCIServerAttach failed -1
    .. Detailed OCI error val is 12154 and errmsg is 'ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 15:06:23.460 61287 kcrr.c
    Error 12154 received logging on to the standby
    Error 12154 connecting to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    Error 12154 attaching to destination LOG_ARCHIVE_DEST_3 standby host 'CP00TSG002'
    ORA-12154: TNS:could not resolve the connect identifier specified
    *** 2007-11-05 15:06:23.460 61287 kcrr.c
    PING[ARC1]: Heartbeat failed to connect to standby 'CP00TSG002'. Error is 12154.
    *** 2007-11-05 15:06:23.460 59530 kcrr.c
    kcrrfail: dest:3 err:12154 force:0 blast:1
    we are unable to find why we are getting these errors.
    Can anyone let me know how MAA functions. I mean..4 node RAC shipping logs and applying at 4 node physical standby.........
    Message was edited by:
    raghu559

    Hi josefli
    i got quite different response from oracle metalink forum. can you explain me about this and how we can achive failover?
    here is what it said:
    In a RAC configuration, you need to make sure you load balance
    the archive receiving on standby site. If you just use
    one instance to receive all the archive logs and apply them,
    it could potentially create bottleneck on a very busy
    environment. So you have to use all the RAC instances
    even on the DR site and they all need to be mounted.
    You need to designate one instance as the applier, which would
    run the MRP, and all the instances as receiver.
    Primary 1 ===> Standby 1 (receiver and applier)
    Primary 2 ===> Standby 2 (receiver only)
    Primary 3 ===> Standby 3 (receiver only)
    Primary 4 ===> Standby 4 (receiver only)
    Let us assume your database name is "finp"
    Primary Site
    finp1.log_archive_dest_2='SERVICE=finp1_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp2.log_archive_dest_2='SERVICE=finp2_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp3.log_archive_dest_2='SERVICE=finp3_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp4.log_archive_dest_2='SERVICE=finp4_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp1.fal_client=finp1_stby
    finp2.fal_client=finp2_stby
    finp3.fal_client=finp3_stby
    finp4.fal_client=finp4_stby
    finp1.fal_server=finp1_stby, finp2_stby, finp3_stby, finp4_stby
    finp2.fal_server=finp2_stby, finp3_stby, finp4_stby, finp1_stby
    finp3.fal_server=finp3_stby, finp4_stby, finp1_stby, finp2_stby
    finp4.fal_server=finp4_stby, finp1_stby, finp2_stby, finp3_stby
    *.log_archive_dest_state_2=enable
    Add tns entries for finp1_stby, finp2_stby, finp3_stby and finp4_stby on
    primary site tnsnames.ora. All these entries would be pointing
    to DR site.
    Standby Site
    finp1.log_archive_dest_2='SERVICE=finp1_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp2.log_archive_dest_2='SERVICE=finp2_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp3.log_archive_dest_2='SERVICE=finp3_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp4.log_archive_dest_2='SERVICE=finp4_stby LGWR ASYNC=20480 NOAFFIRM reopen=10 max_failure=5 net_timeout=180 delay=0'
    finp1.fal_client=finp1_stby
    finp2.fal_client=finp2_stby
    finp3.fal_client=finp3_stby
    finp4.fal_client=finp4_stby
    finp1.fal_server=finp1_stby, finp2_stby, finp3_stby, finp4_stby
    finp2.fal_server=finp2_stby, finp3_stby, finp4_stby, finp1_stby
    finp3.fal_server=finp3_stby, finp4_stby, finp1_stby, finp2_stby
    finp4.fal_server=finp4_stby, finp1_stby, finp2_stby, finp3_stby
    *.log_archive_dest_state_2=defer
    Add tns entries for finp1_stby, finp2_stby, finp3_stby and finp4_stby on
    standby site tnsnames.ora. All these entries would be pointing
    to primary site.
    What is good about this type of setup is that if one of the
    server is unavailable, still the configuration would work
    withoout any chagnes. During switch over and switch back,
    you don't need to any changes on spfile or tnsnames.ora file.
    Note the fal_server is listing all the server names so that
    it could get the archive files from other servers if
    one of the server would be unavailable.
    So i need to place all the instances on physical standby in mount stage? like i said currently we are recovering on one instance. Do we need to make any changes to other 3 instances(physical standby)? or just do a startup mount on those 3nodes?

  • Doubt on ENABLE VALIDATE and ENABLE NOVALIDATE?

    Hi,
    I am doing the following things:
    SQL> create table xx_con(col1 number);
    Table created.
    SQL> insert into xx_con values(1);
    1 row created.
    SQL> insert into xx_con values(1);
    1 row created.
    SQL> insert into xx_con values(2);
    1 row created.
    SQL> alter table xx_con add constraint col1_uk unique(col1) enable validate;
    alter table xx_con add constraint col1_uk unique(col1) enable validate
    ERROR at line 1:
    ORA-02299: cannot validate (APPS.COL1_UK) - duplicate keys foundThis is exactly the same as the previous one.As per the documentation,when we specify "ENABLE VALIDATE" , all the existing and new data should comply with the constraint.But since the data violates the constraint,the constraint is not created .
    SQL> drop table xx_con;
    Table dropped.
    SQL> create table xx_con(col1 number);
    Table created.
    SQL> insert into xx_con values(1);
    1 row created.
    SQL> insert into xx_con values(1);
    1 row created.
    SQL> insert into xx_con values(2);
    1 row created.
    SQL> alter table xx_con add constraint col1_uk unique(col1) enable novalidate;
    alter table xx_con add constraint col1_uk unique(col1) enable novalidate
    ERROR at line 1:
    ORA-02299: cannot validate (APPS.COL1_UK) - duplicate keys foundAs per the documentation,when we specify "ENABLE NOVALIDATE", all the DML operations performed after this should comply with the constraint.But there can be existing data which voilates the constraint.If this is the case then why it is erroring out?
    please clarify this.

    Davide:
    By default, when you create a unique constraint, Oracle creates a unique index to enforce the constraint. In this case, duplicates are not allowed in the index itself.
    SQL> CREATE TABLE t (id number, descr VARCHAR2(10));
    Table created.
    SQL> ALTER TABLE t ADD CONSTRAINT t_unq UNIQUE (id);
    Table altered.
    SQL> SELECT index_name, uniqueness FROM user_indexes
      2  WHERE table_name = 'T';
    INDEX_NAME                     UNIQUENES
    T_UNQ                          UNIQUE
    SQL> SELECT constraint_name, constraint_type FROM user_constraints
      2  WHERE table_name = 'T';
    CONSTRAINT_NAME                C
    T_UNQ                          USince Oracle can and will use an existing index to enforce a unique constraint, when you pre-create the index as non-unique, it will be used to enforce the constraint. Since the index itself is not unique, duplicates are allowed in it.
    Note that a unique index by itself does not imply a unique constraint on the table.
    SQL> ALTER TABLE t DROP CONSTRAINT t_unq;
    Table altered.
    SQL> CREATE UNIQUE INDEX t_unq ON t(id);
    Index created.
    SQL> SELECT index_name, uniqueness FROM user_indexes
      2  WHERE table_name = 'T';
    INDEX_NAME                     UNIQUENES
    T_UNQ                          UNIQUE
    SQL> SELECT constraint_name, constraint_type FROM user_constraints
      2  WHERE table_name = 'T';
    no rows selectedSo, in a sense, with a unique index, it is the index itself which is constrained unique, not the table,
    HTH
    John

  • Trying to implement a VPD policy but got the following error ORA-20001

    hey good day,
    I'm trying to implement a VPD policy to my application. After I have performed the below task (Label 1) in oracle 10g database. When I'm about to access my application page in ApEx 3.2.1 I got the following error
    ORA-20001: get_dbms_sql_cursor error ORA-28110: policy function or package CHARLES.VPD_PREDICATE has error
    any form of assistance will be greatly appreciated.
    thanks in advance
    Label 1
    USER is "VPD_ADMIN"
    SQL> create or replace context empnum_ctx using set_empnum_ctx_pkg;
    Context created.
    SQL> CREATE OR REPLACE PACKAGE set_empnum_ctx_pkg IS
      2    PROCEDURE set_empnum;
      3  END;
      4  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY set_empnum_ctx_pkg IS
      2    PROCEDURE set_empnum IS
      3     emp_id NUMBER;
      4    BEGIN
      5     SELECT EMPNUM INTO emp_id FROM CHARLES.INSTRUCTOR
      6     WHERE upper(username) = nvl(v('APP_USER'), USER);
      7     DBMS_SESSION.SET_CONTEXT('empnum_ctx', 'empnum', emp_id);
      8
      9    EXCEPTION
    10      WHEN NO_DATA_FOUND THEN NULL;
    11    END;
    12  END;
    13  /
    Package body created.
    SQL> create or replace package vpd_policy as
      2    function vpd_predicate(object_schema in varchar2 default null, object_name in varchar2 default null)
      3     return varchar2;
      4  end;
      5  /
    Package created.
    SQL> create or replace package body vpd_policy as  function vpd_predicate(
      2   object_schema in varchar2 default null, object_name in varchar2 default null)
      3     return varchar2 as
      4
      5      BEGIN
      6     if (USER = 'ADMIN') and (v('APP_USER') is null) or
      7        (USER = 'MICHAEL.GRAY') and (v('APP_USER') is NULL) then
      8       return '';
      9     else
    10       return '(
    11             exists (
    12                     select  "INSTRUCTOR"."EMPNUM" as "EMPNUM",
    13                             "INSTRUCTOR"."FIRSTNAME" as "FIRSTNAME",
    14                             "INSTRUCTOR"."LASTNAME" as "LASTNAME",
    15                             "LOAD"."COURSEID" as "COURSEID",
    16                             "COURSE"."CREDIT" as "CREDIT",
    17                             "COURSE"."HPW" as "HPW",
    18                             "LOAD"."CAMPID" as "CAMPID",
    19                             "LOAD"."YR" as "YR",
    20                             "INSTRUCTOR"."POS" as "POS",
    21                             "INSTRUCTOR"."USERNAME" as "USERNAME",
    22                             "INSTRUCTOR"."DEPARTMENT_NAME" as "DEPARTMENT_NAME",
    23                             "LOAD"."SEMESTER" as "SEMESTER"
    24                     from    "COURSE" "COURSE",
    25                             "INSTRUCTOR" "INSTRUCTOR",
    26                             "LOAD" "LOAD"
    27                     where   "INSTRUCTOR"."EMPNUM"="LOAD"."EMPNUM"
    28                     and     "LOAD"."COURSEID"="COURSE"."COURSEID"
    29                     and     department_name = (
    30                                     select department_name from departments
    31                                     where upper (assigned_to) = nvl(v(''APP_USER''),USER) )
    32                                     )
    33
    34                     or upper(username) = nvl(v(''APP_USER''), USER)
    35                                                ) ';
    36
    37     END IF;
    38  END vpd_predicate;
    39  END vpd_policy;
    40  /
    Package body created.
    SQL> begin
      2  dbms_rls.add_policy(
      3  object_schema => 'charles',
      4  object_name => 'load',
      5  policy_name => 'Loading Policy',
      6  function_schema => 'charles',
      7  policy_function => 'vpd_predicate',
      8  statement_types => 'select, update, insert, delete');
      9  end;
    10  /
    PL/SQL procedure successfully completed.

    ORA-20001 isn't an Oracle error message it was coded into your application by a developer: Look it up.
    Consider too the following:
    EXCEPTION
       WHEN NO_DATA_FOUND THEN NULL;so if the employee identifier is not found ... is this really what you want? If an employee isn't valid shouldn't you know it?

  • Trying to implement a mail queue

    I'm trying to implement a very basic mail queue using ExecutorService and a Callable split into a producer which builds the email and an email queue and a consumer to send the queued message out but I keep getting:
    java.lang.NullPointerException
         at javax.mail.Transport.send(Transport.java:97)
         at org.bedework.mail.sendMail.call(sendMail.java:45)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I'm not sure how to get the transport variable passed across and read by the consumer thread.
    The consumer code is:
    public class sendMail implements Callable<Object> {
         private ArrayBlockingQueue<Object>  queuedMail;
         private Transport trans;
         private MimeMessage msg;
         private Logger log = Logger.getLogger(sendMail.class);
         public sendMail (ArrayBlockingQueue<Object> queuedMail, Transport trans) {
              this.trans = trans;
              this.queuedMail = queuedMail;
         public Object call() throws Exception {
              try {
                   queuedMail.poll();
                   synchronized (queuedMail) {
                      if (queuedMail.isEmpty()) {
                         queuedMail.wait(1000);
                   try {
                        trans.send(msg);
                        Thread.sleep(1000);
                   } catch (Exception e) {
                        e.printStackTrace();
              } catch (Exception e) {
                   e.printStackTrace();
              return null;
    }The code that calls it is:
    tr = sess.getTransport(config.getProtocol());
            pool.submit(new buildMail(sess, cal, originator, to, subject));
            pool.submit(new sendMail (mailqueue, tr));I'd be grateful for any pointers in getting this sorted out.

    First, read this FAQ item:
    [http://java.sun.com/products/javamail/FAQ.html#send|http://java.sun.com/products/javamail/FAQ.html#send]
    Then explain to me how "msg" is ever set in your sendMail class.

  • Trying to implement EAP/TLS using java (as part of RADIUS server)

    Hi
    This is a cross port since I didn't know which forum to post in!
    I'm trying to implement a RADIUS server (EAP/TLS) as part of my master thesis. I'm not used to Java SSL libraries and can't get it to work. The server will respond to an accesspoint that uses 802.1x. I have created certificates using openssl and imported the "cert-clt.pl2"and "root.pem" to a laptop trying to connect to the accesspoint. On the server side i imported the "cacert.pem" and "cert-srv.der" using keytool to a keystore. In my code I read the keystore and create the SSLEngine with following code:
              KeyStore ksKeys = KeyStore.getInstance("JKS");
                ksKeys.load(new FileInputStream("certs/FeebeeCommunity.keystore"), passphrase);
                KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
                kmf.init(ksKeys, passphrase);
                KeyStore ksTrust = KeyStore.getInstance("JKS");
                ksTrust.load(new FileInputStream("FeebeeCommunity.keystore"), passphrase);
                TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
                tmf.init(ksKeys);
                sslContext = SSLContext.getInstance("TLS");
                sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
                sslEngine = sslContext.createSSLEngine();
                sslEngine.setUseClientMode(false);
                sslEngine.setNeedClientAuth(true);
                sslEngine.setWantClientAuth(true);
                sslEngine.setEnableSessionCreation(true);
                appBuffer = ByteBuffer.allocate(sslEngine.getSession().getApplicationBufferSize());
                appBuffer.clear();
                netBuffer = ByteBuffer.allocate(sslEngine.getSession().getPacketBufferSize());
                netBuffer.clear();All I want to do with TLS is a handshake.
    I'm not talking ssl using sockets instead I receive and send all TLS data encapsulated in EAP packet that are incapsulated in RADIUS packets. I start off with sending TLS-Start upon I recive TLS data. I handle it with the following code:
           SSLEngineResult result = null;
            SSLEngineResult.HandshakeStatus hsStatus = null;
            if( internalState != EAPTLSState.Handshaking ) {
                if( internalState == EAPTLSState.None ) {
                    TLSPacket tlsPacket = new TLSPacket( packet.getData() );
                    peerIdentity = tlsPacket.getData();
                    internalState = EAPTLSState.Starting;
                    try {
                        sslEngine.beginHandshake();
                    } catch (SSLException e) {
                        e.printStackTrace();
                    return;
                else if(internalState == EAPTLSState.Starting ) {
                    internalState = EAPTLSState.Handshaking;
                    try {
                        sslEngine.beginHandshake();
                    } catch (SSLException e) {
                        e.printStackTrace();
            TLSPacket tlsPacket = new TLSPacket( packet.getData() );
            netBuffer.put( tlsPacket.getData() );
            netBuffer.flip();
            while(true) {
                hsStatus = sslEngine.getHandshakeStatus();
                if(hsStatus == SSLEngineResult.HandshakeStatus.NEED_TASK) {
                    Runnable task;
                    while((task=sslEngine.getDelegatedTask()) != null) {
                        new Thread(task).start();
                else if(hsStatus == SSLEngineResult.HandshakeStatus.NEED_UNWRAP) {
                    try {
                        result = sslEngine.unwrap( netBuffer, appBuffer );
                    } catch (SSLException e) {
                        e.printStackTrace();
                else {
                    return;
            }When I try to send data I use the following code:
               SSLEngineResult.HandshakeStatus hsStatus = null;
                SSLEngineResult result = null;
    //            netBuffer = ByteBuffer.allocate(EAPTLSMethod.BUFFER_SIZE);
                netBuffer.clear();
                while(true) {
                    hsStatus = sslEngine.getHandshakeStatus();
                    if(hsStatus == SSLEngineResult.HandshakeStatus.NEED_TASK) {
                        Runnable task;
                        while((task=sslEngine.getDelegatedTask()) != null) {
                            new Thread(task).start();
                    else if(hsStatus == SSLEngineResult.HandshakeStatus.NEED_WRAP) {
                        try {
                            result = sslEngine.wrap( dummyBuffer, netBuffer );
                        } catch (SSLException e) {
                            e.printStackTrace();
                    else {
                        if( result != null && result.getStatus() == SSLEngineResult.Status.OK ) {
                            int size = Math.min(result.bytesProduced(),this.MTU);
                            byte [] tlsData = new byte[size];
                            netBuffer.flip();
                            netBuffer.get(tlsData,0,size);
                            TLSPacket tlsPacket = new TLSPacket((byte)0,tlsData);
                            if( size < result.bytesProduced() ) {
                                tlsPacket.setFlag(TLSFlag.MoreFragments);
                            return new EAPTLSRequestPacket( ID,
                                    (short)(tlsPacket.getData().length + 6),
                                    stateMachine.getCurrentMethod(), tlsPacket );
                        else {
                            return null;
                    }After I sent TLS-Start I receive data and manage to process it but when then trying to produce TLS data I get the following error:
    javax.net.ssl.SSLHandshakeException: no cipher suites in common
    at com.sun.net.ssl.internal.ssl.Handshaker.checkThrown(Handshaker.java:992)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:459)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.writeAppRecord(SSLEngineImpl.java:1054)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.wrap(SSLEngineImpl.java:1026)
    at javax.net.ssl.SSLEngine.wrap(SSLEngine.java:411)
    at RadiusServerSimulator.EAPModule.EAPTLSMethod.buildReq(EAPTLSMethod.java:125)
    at RadiusServerSimulator.EAPModule.EAPStateMachine.methodRequest(EAPStateMachine.java:358)
    at RadiusServerSimulator.EAPModule.EAPStateMachine.run(EAPStateMachine.java:262)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.net.ssl.SSLHandshakeException: no cipher suites in common
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1352)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:176)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:164)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.chooseCipherSuite(ServerHandshaker.java:638)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.clientHello(ServerHandshaker.java:450)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:178)
    at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
    at com.sun.net.ssl.internal.ssl.Handshaker$1.run(Handshaker.java:437)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.net.ssl.internal.ssl.Handshaker$DelegatedTask.run(Handshaker.java:930)
    Any help wold be most greatfull, if any questions or anything unclear plz let me know.
    add some additional information here is a debug output
    Before this I have sent a TLS-star package and this is when I receive new information and then try to create the answer
    [Raw read]: length = 5
    0000: 16 03 01 00 41 ....A
    [Raw read]: length = 65
    0000: 01 00 00 3D 03 01 41 A4 FC 16 A8 14 89 F0 59 81 ...=..A.......Y.
    0010: C8 C9 29 C2 09 D1 0A 70 18 58 DC 2E B0 C8 14 90 ..)....p.X......
    0020: D4 FD A4 C6 32 C9 00 00 16 00 04 00 05 00 0A 00 ....2...........
    0030: 09 00 64 00 62 00 03 00 06 00 13 00 12 00 63 01 ..d.b.........c.
    0040: 00 .
    Thread-2, READ: TLSv1 Handshake, length = 65
    *** ClientHello, TLSv1
    RandomCookie: GMT: 1084488726 bytes = { 168, 20, 137, 240, 89, 129, 200, 201, 4
    1, 194, 9, 209, 10, 112, 24, 88, 220, 46, 176, 200, 20, 144, 212, 253, 164, 198,
    50, 201 }
    Session ID: {}
    Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, SSL_RSA_WITH
    _3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_RSA_EXPORT1024_WITH_RC4_56_SHA,
    SSL_RSA_EXPORT1024_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EX
    PORT_WITH_RC2_CBC_40_MD5, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_DE
    S_CBC_SHA, SSL_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA]
    Compression Methods: { 0 }
    [read] MD5 and SHA1 hashes: len = 65
    0000: 01 00 00 3D 03 01 41 A4 FC 16 A8 14 89 F0 59 81 ...=..A.......Y.
    0010: C8 C9 29 C2 09 D1 0A 70 18 58 DC 2E B0 C8 14 90 ..)....p.X......
    0020: D4 FD A4 C6 32 C9 00 00 16 00 04 00 05 00 0A 00 ....2...........
    0030: 09 00 64 00 62 00 03 00 06 00 13 00 12 00 63 01 ..d.b.........c.
    0040: 00 .
    Thread-5, fatal error: 40: no cipher suites in common
    javax.net.ssl.SSLHandshakeException: no cipher suites in common
    Thread-5, SEND TLSv1 ALERT: fatal, description = handshake_failure
    Thread-5, WRITE: TLSv1 Alert, length = 2
    Thread-2, fatal: engine already closed. Rethrowing javax.net.ssl.SSLHandshakeEx
    ception: no cipher suites in common
    javax.net.ssl.SSLHandshakeException: no cipher suites in common
    at com.sun.net.ssl.internal.ssl.Handshaker.checkThrown(Handshaker.java:9
    92)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineI
    mpl.java:459)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.writeAppRecord(SSLEngineIm
    pl.java:1054)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.wrap(SSLEngineImpl.java:10
    26)
    at javax.net.ssl.SSLEngine.wrap(SSLEngine.java:411)
    at RadiusServerSimulator.EAPModule.EAPTLSMethod.buildReq(EAPTLSMethod.ja
    va:153)
    at RadiusServerSimulator.EAPModule.EAPStateMachine.methodRequest(EAPStat
    eMachine.java:358)
    at RadiusServerSimulator.EAPModule.EAPStateMachine.run(EAPStateMachine.j
    ava:262)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.net.ssl.SSLHandshakeException: no cipher suites in common
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
    at com.sun.net.ssl.internal.ssl.SSLEngineImpl.fatal(SSLEngineImpl.java:1
    352)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:176)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:164)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.chooseCipherSuite(Serve
    rHandshaker.java:638)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.clientHello(ServerHands
    haker.java:450)
    at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(ServerHa
    ndshaker.java:178)
    at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:4
    95)
    at com.sun.net.ssl.internal.ssl.Handshaker$1.run(Handshaker.java:437)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.net.ssl.internal.ssl.Handshaker$DelegatedTask.run(Handshaker.
    java:930)
    ... 1 more

    I am developing a simple client/server SSL app using sdk 1.4 (no SSLEngine) and am faced with the same problem. Could anybody track down the problem further?

  • I have tried to implement jasper report but getting exceptions at run time

    I have tried to implement jasper report but getting exceptions at run time and I couldn't get the reason of these exceptions. please give me idea to solve this problem.
    I am using following jar files for this :
    commons-beanutils-1.6.1.jar
    commons-digester-1.7.jar
    commons-logging.jar
    jasperreports-1.2.0.jar
    code is as follows:-
    (1) xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jasperReport
    PUBLIC "-//JasperReports//DTD Report Design//EN"
    "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
    <jasperReport name="Simple_Report">
    <detail>
    <band height="20">
    <staticText>
    <reportElement x="180" y="0" width="200" height="20"/>
    <text><![CDATA[Hello World!]]></text>
    </staticText>
    </band>
    </detail>
    </jasperReport>
    (2.) java file
    import net.sf.jasperreports.engine.*;
    import net.sf.jasperreports.engine.xml.*;
    import org.xml.sax.*;
    import org.apache.commons.digester.Digester;
    import org.apache.commons.digester.RuleSetBase;
    import java.util.*;
    public class JasperReportsIntro
    public static void main(String[] args)
    JasperReport jasperReport;
    JasperPrint jasperPrint;
    try
         jasperReport = JasperCompileManager.compileReport(
    "jasperreports_demo.jrxml");
    jasperPrint = JasperFillManager.fillReport(
    jasperReport, new HashMap(), new JREmptyDataSource());
    // JasperExportManager.exportReportToPdfFile(
    // jasperPrint, "jasperReports/simple_report.pdf");
    catch (JRException e)
    e.printStackTrace();
    I am getting exceptions like:
    net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
    /home/navneet/Simple_Report_1143636234024_954843.java:4: package net.sf.jasperreports.engine does not exist
    import net.sf.jasperreports.engine.*;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:5: package net.sf.jasperreports.engine.fill does not exist
    import net.sf.jasperreports.engine.fill.*;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:18: cannot find symbol
    symbol: class JREvaluator
    public class Simple_Report_1143636234024_954843 extends JREvaluator
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:25: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_RESOURCE_BUNDLE = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:26: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_CONNECTION = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:27: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_PARAMETERS_MAP = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:28: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_IS_IGNORE_PAGINATION = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:29: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_CLASS_LOADER = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:30: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_VIRTUALIZER = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:31: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_LOCALE = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:32: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_DATA_SOURCE = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:33: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_SCRIPTLET = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:34: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    private JRFillParameter parameter_REPORT_MAX_COUNT = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:35: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    private JRFillVariable variable_PAGE_NUMBER = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:36: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    private JRFillVariable variable_COLUMN_NUMBER = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:37: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    private JRFillVariable variable_REPORT_COUNT = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:38: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    private JRFillVariable variable_PAGE_COUNT = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:39: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    private JRFillVariable variable_COLUMN_COUNT = null;
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:62: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_RESOURCE_BUNDLE = (JRFillParameter)pm.get("REPORT_RESOURCE_BUNDLE");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:63: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_CONNECTION = (JRFillParameter)pm.get("REPORT_CONNECTION");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:64: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_PARAMETERS_MAP = (JRFillParameter)pm.get("REPORT_PARAMETERS_MAP");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:65: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_IS_IGNORE_PAGINATION = (JRFillParameter)pm.get("IS_IGNORE_PAGINATION");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:66: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_CLASS_LOADER = (JRFillParameter)pm.get("REPORT_CLASS_LOADER");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:67: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_VIRTUALIZER = (JRFillParameter)pm.get("REPORT_VIRTUALIZER");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:68: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_LOCALE = (JRFillParameter)pm.get("REPORT_LOCALE");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:69: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_DATA_SOURCE = (JRFillParameter)pm.get("REPORT_DATA_SOURCE");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:70: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_SCRIPTLET = (JRFillParameter)pm.get("REPORT_SCRIPTLET");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:71: cannot find symbol
    symbol : class JRFillParameter
    location: class Simple_Report_1143636234024_954843
    parameter_REPORT_MAX_COUNT = (JRFillParameter)pm.get("REPORT_MAX_COUNT");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:88: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    variable_PAGE_NUMBER = (JRFillVariable)vm.get("PAGE_NUMBER");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:89: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    variable_COLUMN_NUMBER = (JRFillVariable)vm.get("COLUMN_NUMBER");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:90: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    variable_REPORT_COUNT = (JRFillVariable)vm.get("REPORT_COUNT");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:91: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    variable_PAGE_COUNT = (JRFillVariable)vm.get("PAGE_COUNT");
    ^
    /home/navneet/Simple_Report_1143636234024_954843.java:92: cannot find symbol
    symbol : class JRFillVariable
    location: class Simple_Report_1143636234024_954843
    variable_COLUMN_COUNT = (JRFillVariable)vm.get("COLUMN_COUNT");
    ^
    33 errors
    at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:193)
    at net.sf.jasperreports.engine.design.JRDefaultCompiler.compileReport(JRDefaultCompiler.java:131)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:211)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:144)
    at com.appnetix.app.portal.financials.reports.RoyaltyReportAction.execute(RoyaltyReportAction.java:68)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at com.appnetix.app.control.web.AppnetixRequestProcessor.process(AppnetixRequestProcessor.java:149)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at com.appnetix.app.control.web.AppnetixControllerServlet.doPost(AppnetixControllerServlet.java:262)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:595)

    You have no permission to create a report. You have to create a permisson-entry into your server.policy. Then it would be work.

Maybe you are looking for

  • Move graphics with text--but not inline--in PM...??

    Hello, is there a way in PageMaker to move graphics with text but not inline? I ask because right now I see two options for graphics: --inline, so you cannot place the graphic exactly where you want AND the text only flows way above or below--but not

  • Schedule Background job using transaction CATM

    Hi all, Since we cannot schedule a background job using transaction CATM, I have created a program calling the CATM transaction through batch-input. I have done a recording and entered the coding in a Z-program. For a vendor, I have recorded time in

  • IWeb '08 movie playback problem on Windows

    Hello, I used iWeb '08 to create a Photo Page that I've uploaded to my .Mac space. The Photo Page is mostly photos, but also contains two movie clips. One is a 1 MB .AVI file. The other one is an 8.7 MB .m4v file. When I load up the photo page in Fir

  • Graph cursor move by keyboard

    I have ComponentWorks 3.01 and VB is it possible to move the cursor of a graph BY KEYBOARD When i use mouse ok, but not keyboard Thank you

  • The best option for running Windows on a Mac?

    Though I'm loving my MacBook Pro, the only thing I would like to improve is the capacity for playing games. And for that I really need Windows. So, I have a copy of Windows XP, and I have a copy of Parallel. I've installed Parallel and Windows XP, bu