SQL authentication provider - create table script

Hi all!
I would use the SQL provider for my Web application authentication. I can't find the script to create tables of users/roles used by the provider.
Can you suggest me a link where I can download?
Thank you
Frank

Hi Frank,.

Configure the SQL authenticator:

Start Oracle XE DB and open propmt SQL to run commands below:

CREATE TABLE USERS)
U_NAME VARCHAR (200) NOT NULL,
U_PASSWORD VARCHAR (50) NOT NULL,
U_DESCRIPTION VARCHAR (1000))
;
ALTER TABLE USERS
ADD CONSTRAINT PK_USERS
PRIMARY KEY (U_NAME)
;
CREATE TABLE GROUPS)
G_NAME VARCHAR (200) NOT NULL,
G_DESCRIPTION VARCHAR (1000) NULL)
;
ALTER TABLE GROUPS
ADD CONSTRAINT PK_GROUPS
PRIMARY KEY (G_NAME)
;
CREATE TABLE GROUPMEMBERS)
G_NAME VARCHAR (200) NOT NULL,
G_MEMBER VARCHAR (200) NOT NULL)
;
ALTER TABLE GROUPMEMBERS
ADD CONSTRAINT PK_GROUPMEMS
(PRIMARY KEY)
G_NAME,
G_MEMBER
)
;
ALTER TABLE GROUPMEMBERS
ADD CONSTRAINT FK1_GROUPMEMBERS
FOREIGN KEY (G_NAME)
REFERENCE (G_NAME) GROUPS
ON DELETE CASCADE

Generally, customers can add users directly in DB with help commands below:

insert into USERS (U_NAME, U_PASSWORD, U_DESCRIPTION) values ('system', 'weblogic', 'user admin');
insert into GROUPS (G_NAME, G_DESCRIPTION) values ('Administrators', 'Administrators');
insert into values('Administrators','system') GROUPMEMBERS (G_NAME, G_MEMBER);

But in this case is not encrypted password then, either you can add users via the console or WLST script to be stored in encrypted form.

We had performed above commands just to check that the user that is stored directly in the DB gets properly authenticated or not configured SQL authenticator as below

Now start weblogic admin server and console access to create the data source by the navigation Services-> JDBC-> data sources

Create the data source named SqlDS

JNDI: SqlDS

Type of DB: Oracle

: DB driver Oracle Thin XA

Name of the data base: XE

DB host:

Port: 1521

DB user:

DB password:

Even the rest of the configuration and click test Configuration. If its success click on next and it targets to "AdminServer.

Click Finish and activate chnages

Now navigate to the areas of security-> myrealm-> suppliers

Click new and supply the names of SqlAuthenticator and select Type of SQLAuthenticator

Now click on newly created provider and make the indicator of control as "sufficient".

Go to the specific page of provider:

1. check on cleartext passwords enabled.

2. provide a data name source: SqlDS

Keep the rest of the parameters it is and save this configuration. It will ask you to restart the management server.

Now, again navigate areas of security-myrealm-> users & groups >

User created directly in the DB control is listed in the table with SqlAuthenticator, once its list, go ahead and add users as below

B. Cretae users using the administration console:

Sign in to the administration console

Access areas of security-myrealm-> users & groups >

Click the users tab and try to create the new user

User name:

Select authentication provider: SqlAuthenticator

User password:

Once the table DB check creating user, this user added with password encypted musted

C. create multiple users using WLST script:

File Navigave of $DOMAIN_HOME/bin and run the file setDomainEnv as below:

UNIX:. ./setDomainEnv.sh (don't forget to put two points before /)

Windows: setDomainEnv.cmd

Now, change script depending on your environment below and run as suggested in step 3:

Connect('weblogic','weblogic123','t3://localhost:7001')
Edit()
startEdit(-1,-1,'false')
serverConfig()
CD('/SecurityConfiguration/base_domain/Realms/MYREALM/AuthenticationProviders')
ls()
CD ('SqlAuthenticator')
cmo.createUser ('vaishali', 'weblogic123', 'SQLuser')

cmo.createUser ('pavashe', 'weblogic123', 'SQLuser')
Edit()
stopEdit('y')

NOTE: Change username, password, and ADMIN_URL in 1st line.

Replace the domain name "base_domain" by your domain online no.: 5

Authenticator name change SQL online no: 6 by your authenticator name

Next lines create users. You need to add however to users, you need to create programmatically.

Syntax: cmo.createUser ('user_name', 'user_password', 'user_description')

Now, to save these commands in a file with the extension .py and run as below:

# java weblogic. WLST create_user.py

If your script does not have to try running each command separately. For this session WLST beginning as below:

# java weblogic. WLST

Now run above commands in the script. You will be able to debug if something went wrong during execution of script.

Kind regards
Kal

Tags: Fusion Middleware

Similar Questions

  • Question to load data using sql loader in staging table, and then in the main tables!

    Hello

    I'm trying to load data into our main database table using SQL LOADER. data will be provided in separate pipes csv files.

    I have develop a shell script to load the data and it works fine except one thing.

    Here are the details of a data to re-create the problem.

    Staging of the structure of the table in which data will be filled using sql loader

    create table stg_cmts_data (cmts_token varchar2 (30), CMTS_IP varchar2 (20));

    create table stg_link_data (dhcp_token varchar2 (30), cmts_to_add varchar2 (200));

    create table stg_dhcp_data (dhcp_token varchar2 (30), DHCP_IP varchar2 (20));

    DATA in the csv file-

    for stg_cmts_data-

    cmts_map_03092015_1.csv

    WNLB-CMTS-01-1. 10.15.0.1

    WNLB-CMTS-02-2 | 10.15.16.1

    WNLB-CMTS-03-3. 10.15.48.1

    WNLB-CMTS-04-4. 10.15.80.1

    WNLB-CMTS-05-5. 10.15.96.1

    for stg_dhcp_data-

    dhcp_map_03092015_1.csv

    DHCP-1-1-1. 10.25.23.10, 25.26.14.01

    DHCP-1-1-2. 56.25.111.25, 100.25.2.01

    DHCP-1-1-3. 25.255.3.01, 89.20.147.258

    DHCP-1-1-4. 10.25.26.36, 200.32.58.69

    DHCP-1-1-5 | 80.25.47.369, 60.258.14.10

    for stg_link_data

    cmts_dhcp_link_map_0309151623_1.csv

    DHCP-1-1-1. WNLB-CMTS-01-1,WNLB-CMTS-02-2

    DHCP-1-1-2. WNLB-CMTS-03-3,WNLB-CMTS-04-4,WNLB-CMTS-05-5

    DHCP-1-1-3. WNLB-CMTS-01-1

    DHCP-1-1-4. WNLB-CMTS-05-8,WNLB-CMTS-05-6,WNLB-CMTS-05-0,WNLB-CMTS-03-3

    DHCP-1-1-5 | WNLB-CMTS-02-2,WNLB-CMTS-04-4,WNLB-CMTS-05-7

    WNLB-DHCP-1-13 | WNLB-CMTS-02-2

    Now, after loading these data in the staging of table I have to fill the main database table

    create table subntwk (subntwk_nm varchar2 (20), subntwk_ip varchar2 (30));

    create table link (link_nm varchar2 (50));

    SQL scripts that I created to load data is like.

    coil load_cmts.log

    Set serveroutput on

    DECLARE

    CURSOR c_stg_cmts IS SELECT *.

    OF stg_cmts_data;

    TYPE t_stg_cmts IS TABLE OF stg_cmts_data % ROWTYPE INDEX BY pls_integer;

    l_stg_cmts t_stg_cmts;

    l_cmts_cnt NUMBER;

    l_cnt NUMBER;

    NUMBER of l_cnt_1;

    BEGIN

    OPEN c_stg_cmts.

    Get the c_stg_cmts COLLECT in BULK IN l_stg_cmts;

    BECAUSE me IN l_stg_cmts. FIRST... l_stg_cmts. LAST

    LOOP

    SELECT COUNT (1)

    IN l_cmts_cnt

    OF subntwk

    WHERE subntwk_nm = l_stg_cmts (i) .cmts_token;

    IF l_cmts_cnt < 1 THEN

    INSERT

    IN SUBNTWK

    (

    subntwk_nm

    )

    VALUES

    (

    l_stg_cmts (i) .cmts_token

    );

    DBMS_OUTPUT. Put_line ("token has been added: ' |") l_stg_cmts (i) .cmts_token);

    ON THE OTHER

    DBMS_OUTPUT. Put_line ("token is already present'");

    END IF;

    WHEN l_stg_cmts EXIT. COUNT = 0;

    END LOOP;

    commit;

    EXCEPTION

    WHILE OTHERS THEN

    Dbms_output.put_line ('ERROR' |) SQLERRM);

    END;

    /

    output

    for dhcp


    coil load_dhcp.log

    Set serveroutput on

    DECLARE

    CURSOR c_stg_dhcp IS SELECT *.

    OF stg_dhcp_data;

    TYPE t_stg_dhcp IS TABLE OF stg_dhcp_data % ROWTYPE INDEX BY pls_integer;

    l_stg_dhcp t_stg_dhcp;

    l_dhcp_cnt NUMBER;

    l_cnt NUMBER;

    NUMBER of l_cnt_1;

    BEGIN

    OPEN c_stg_dhcp.

    Get the c_stg_dhcp COLLECT in BULK IN l_stg_dhcp;

    BECAUSE me IN l_stg_dhcp. FIRST... l_stg_dhcp. LAST

    LOOP

    SELECT COUNT (1)

    IN l_dhcp_cnt

    OF subntwk

    WHERE subntwk_nm = l_stg_dhcp (i) .dhcp_token;

    IF l_dhcp_cnt < 1 THEN

    INSERT

    IN SUBNTWK

    (

    subntwk_nm

    )

    VALUES

    (

    l_stg_dhcp (i) .dhcp_token

    );

    DBMS_OUTPUT. Put_line ("token has been added: ' |") l_stg_dhcp (i) .dhcp_token);

    ON THE OTHER

    DBMS_OUTPUT. Put_line ("token is already present'");

    END IF;

    WHEN l_stg_dhcp EXIT. COUNT = 0;

    END LOOP;

    commit;

    EXCEPTION

    WHILE OTHERS THEN

    Dbms_output.put_line ('ERROR' |) SQLERRM);

    END;

    /

    output

    for link -.

    coil load_link.log

    Set serveroutput on

    DECLARE

    l_cmts_1 VARCHAR2 (4000 CHAR);

    l_cmts_add VARCHAR2 (200 CHAR);

    l_dhcp_cnt NUMBER;

    l_cmts_cnt NUMBER;

    l_link_cnt NUMBER;

    l_add_link_nm VARCHAR2 (200 CHAR);

    BEGIN

    FOR (IN) r

    SELECT dhcp_token, cmts_to_add | ',' cmts_add

    OF stg_link_data

    )

    LOOP

    l_cmts_1: = r.cmts_add;

    l_cmts_add: = TRIM (SUBSTR (l_cmts_1, 1, INSTR (l_cmts_1, ',') - 1));

    SELECT COUNT (1)

    IN l_dhcp_cnt

    OF subntwk

    WHERE subntwk_nm = r.dhcp_token;

    IF l_dhcp_cnt = 0 THEN

    DBMS_OUTPUT. Put_line ("device not found: ' |") r.dhcp_token);

    ON THE OTHER

    While l_cmts_add IS NOT NULL

    LOOP

    l_add_link_nm: = r.dhcp_token |' _TO_' | l_cmts_add;

    SELECT COUNT (1)

    IN l_cmts_cnt

    OF subntwk

    WHERE subntwk_nm = TRIM (l_cmts_add);

    SELECT COUNT (1)

    IN l_link_cnt

    LINK

    WHERE link_nm = l_add_link_nm;

    IF l_cmts_cnt > 0 AND l_link_cnt = 0 THEN

    INSERT INTO link (link_nm)

    VALUES (l_add_link_nm);

    DBMS_OUTPUT. Put_line (l_add_link_nm |) » '||' Has been added. ") ;

    ELSIF l_link_cnt > 0 THEN

    DBMS_OUTPUT. Put_line (' link is already present: ' | l_add_link_nm);

    ELSIF l_cmts_cnt = 0 then

    DBMS_OUTPUT. Put_line (' no. CMTS FOUND for device to create the link: ' | l_cmts_add);

    END IF;

    l_cmts_1: = TRIM (SUBSTR (l_cmts_1, INSTR (l_cmts_1, ',') + 1));

    l_cmts_add: = TRIM (SUBSTR (l_cmts_1, 1, INSTR (l_cmts_1, ',') - 1));

    END LOOP;

    END IF;

    END LOOP;

    COMMIT;

    EXCEPTION

    WHILE OTHERS THEN

    Dbms_output.put_line ('ERROR' |) SQLERRM);

    END;

    /

    output

    control files -

    DOWNLOAD THE DATA

    INFILE 'cmts_data.csv '.

    ADD

    IN THE STG_CMTS_DATA TABLE

    When (cmts_token! = ") AND (cmts_token! = 'NULL') AND (cmts_token! = 'null')

    and (cmts_ip! = ") AND (cmts_ip! = 'NULL') AND (cmts_ip! = 'null')

    FIELDS TERMINATED BY ' |' SURROUNDED OF POSSIBLY "" "

    TRAILING NULLCOLS

    ('RTRIM (LTRIM (:cmts_token))' cmts_token,

    cmts_ip ' RTRIM (LTRIM(:cmts_ip)) ")". "

    for dhcp.


    DOWNLOAD THE DATA

    INFILE 'dhcp_data.csv '.

    ADD

    IN THE STG_DHCP_DATA TABLE

    When (dhcp_token! = ") AND (dhcp_token! = 'NULL') AND (dhcp_token! = 'null')

    and (dhcp_ip! = ") AND (dhcp_ip! = 'NULL') AND (dhcp_ip! = 'null')

    FIELDS TERMINATED BY ' |' SURROUNDED OF POSSIBLY "" "

    TRAILING NULLCOLS

    ('RTRIM (LTRIM (:dhcp_token))' dhcp_token,

    dhcp_ip ' RTRIM (LTRIM(:dhcp_ip)) ")". "

    for link -.

    DOWNLOAD THE DATA

    INFILE 'link_data.csv '.

    ADD

    IN THE STG_LINK_DATA TABLE

    When (dhcp_token! = ") AND (dhcp_token! = 'NULL') AND (dhcp_token! = 'null')

    and (cmts_to_add! = ") AND (cmts_to_add! = 'NULL') AND (cmts_to_add! = 'null')

    FIELDS TERMINATED BY ' |' SURROUNDED OF POSSIBLY "" "

    TRAILING NULLCOLS

    ('RTRIM (LTRIM (:dhcp_token))' dhcp_token,

    cmts_to_add TANK (4000) RTRIM (LTRIM(:cmts_to_add)) ")" ""

    SHELL SCRIPT-

    If [!-d / log]

    then

    Mkdir log

    FI

    If [!-d / finished]

    then

    mkdir makes

    FI

    If [!-d / bad]

    then

    bad mkdir

    FI

    nohup time sqlldr username/password@SID CONTROL = load_cmts_data.ctl LOG = log/ldr_cmts_data.log = log/ldr_cmts_data.bad DISCARD log/ldr_cmts_data.reject ERRORS = BAD = 100000 LIVE = TRUE PARALLEL = TRUE &

    nohup time username/password@SID @load_cmts.sql

    nohup time sqlldr username/password@SID CONTROL = load_dhcp_data.ctl LOG = log/ldr_dhcp_data.log = log/ldr_dhcp_data.bad DISCARD log/ldr_dhcp_data.reject ERRORS = BAD = 100000 LIVE = TRUE PARALLEL = TRUE &

    time nohup sqlplus username/password@SID @load_dhcp.sql

    nohup time sqlldr username/password@SID CONTROL = load_link_data.ctl LOG = log/ldr_link_data.log = log/ldr_link_data.bad DISCARD log/ldr_link_data.reject ERRORS = BAD = 100000 LIVE = TRUE PARALLEL = TRUE &

    time nohup sqlplus username/password@SID @load_link.sql

    MV *.log. / log

    If the problem I encounter is here for loading data in the link table that I check if DHCP is present in the subntwk table, then continue to another mistake of the newspaper. If CMTS then left create link to another error in the newspaper.

    Now that we can here multiple CMTS are associated with unique DHCP.

    So here in the table links to create the link, but for the last iteration of the loop, where I get separated by commas separate CMTS table stg_link_data it gives me log as not found CMTS.

    for example

    DHCP-1-1-1. WNLB-CMTS-01-1,WNLB-CMTS-02-2

    Here, I guess to link the dhcp-1-1-1 with balancing-CMTS-01-1 and wnlb-CMTS-02-2

    Theses all the data present in the subntwk table, but still it gives me journal wnlb-CMTS-02-2 could not be FOUND, but we have already loaded into the subntwk table.

    same thing is happening with all the CMTS table stg_link_data who are in the last (I think here you got what I'm trying to explain).

    But when I run the SQL scripts in the SQL Developer separately then it inserts all valid links in the table of links.

    Here, she should create 9 lines in the table of links, whereas now he creates only 5 rows.

    I use COMMIT in my script also but it only does not help me.

    Run these scripts in your machine let me know if you also get the same behavior I get.

    and please give me a solution I tried many thing from yesterday, but it's always the same.

    It is the table of link log

    link is already present: dhcp-1-1-1_TO_wnlb-cmts-01-1

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-02-2

    link is already present: dhcp-1-1-2_TO_wnlb-cmts-03-3
    link is already present: dhcp-1-1-2_TO_wnlb-cmts-04-4

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-5

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-01-1

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-8
    NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-6
    NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-0

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-03-3

    link is already present: dhcp-1-1-5_TO_wnlb-cmts-02-2
    link is already present: dhcp-1-1-5_TO_wnlb-cmts-04-4

    NOT FOUND CMTS for device to create the link: wnlb-CMTS-05-7

    Device not found: wnlb-dhcp-1-13

    IF NEED MORE INFORMATION PLEASE LET ME KNOW

    Thank you

    I felt later in the night that during the loading in the staging table using UNIX machine he created the new line for each line. That is why the last CMTS is not found, for this I use the UNIX 2 BACK conversion and it starts to work perfectly.

    It was the dos2unix error!

    Thank you all for your interest and I may learn new things, as I have almost 10 months of experience in (PLSQL, SQL)

  • create table as a table with nested column type

    On my Oracle DB (11.1), I have a table with a nested as a column type (and it is a partitioned table).
    Now I need to copy partitions in a second table, and I use swap partition for it (with a table that is not partitioned as a table in step).

    But there is a problem, because as the ordinary as sql ddl:
    create table table1_stage as select * from table1 where 1=2;
    does not work when there is a table nested within a column type.
    Is it possible easy to copy its structure (and to create the table that is not partitioned, so I suppose that no dbms_metadata package would help)?


    Kind regards...

    >
    does not work when there is a table nested within a column type.
    >

    Will work indeed.

    Read this

    SQL> CREATE TYPE typtst IS TABLE OF VARCHAR2 (100);
      2
      3  /
    
    Type created.
    
    SQL> CREATE TABLE test1
      2  (
      3     col1   VARCHAR2 (100),
      4     col2   typtst
      5  )
      6  NESTED TABLE col2
      7     STORE AS list1;
    
    Table created.
    
    SQL> CREATE TABLE test2
      2  NESTED TABLE col2
      3     STORE AS list2
      4  AS
      5     SELECT * FROM test1;
    
    Table created.
    
    SQL> 
    

    G.

  • Model reusable SQL Oracle to create a DDL/DML Scripts for Oracle database

    Hello


    I have an obligation to set up a model of Oracle SQL to create the Scripts DDL/DML reusable for Oracle databases.
    Only the Oracle DBA will run scripts permissions is not a problem.

    The workflow for any DOF is as follows:-

    (1) new table

    a. check whether the table exists in the views system/admin.
    b. If the table exists then give message "Table exists".
    c. If the table does not exist then run DDL code

    (2) add the column

    a. check if the column exists for a given table of the system/admin views
    b. If the column exists in the specified table.
    B1. backup table.
    B2. ALTER table alter column
    B3. check data or execute convert dml sauvegardΘ to the new change script.
    c. If the column does not exist
    C1. backup table
    C2. ALTER table add column
    C3. Run dml to populate the column with the default value.

    The DML scripts are to populate the base tables with the data required for business operations.

    (3) addition of new line

    a. check if the line exists by comparing the old values of each column with the new values to be added for the new record.
    b. If there is, to give message line is
    c. If not exists, add the new record.

    (4) update existing record (we createtime columns in these tables as well as changes can be tracked)

    a. check if the row exists using the primary key.
    b. If there is.
    B1. off the record by using the "active" column of the table
    B2. Add new record with the necessary changes.
    c. If does not exist, add the new record with the necessary changes.

    Could you please help with some ideas that can get this done with precision?
    I tried several ways, but I am not able to set up something that meets all the requirements.

    Thank you

    If it helps at all. Sometimes we have a requirement for a DDL statement to be rerunable and her only error if something completely unexpected happens.

    It's a little monstrous, but basically, we wrap all DDL in a dynamic statement and capture errors that would indicate that the DDL script has already been run:

    Here's a bit of a model:

    declare
       w_ddl varchar2(32767);
    begin
       begin
          --
          dbms_output.put_line('Creating table TABLE_NAME');
          --
          w_ddl := 'CREATE TABLE MY_SCHEMA.TABLE_NAME
                    ( COLUMN_1     DATE          NOT NULL
                     ,COLUMN_2  VARCHAR2(10)  NOT NULL
                     ,COLUMN_3  DATE
                    )';
           --
          execute immediate w_ddl;
          --
          dbms_output.put_line('Successfully created table TABLE_NAME');
          --
       exception
          when others then
             if sqlcode = -955 then
                dbms_output.put_line('Table Already exists.');
             else
                dbms_output.put_line('creation of table TABLE_NAME failed:');
                dbms_output.put_line(sqlerrm);
                raise;
             end if;
       end;
    
      begin
          --
          dbms_output.put_line('Creating unique primary key constraint for TABLE_NAME');
          --
          w_ddl := 'ALTER TABLE MY_SCHEMA.TABLE_NAME ADD (
                   CONSTRAINT TABLE_NAME
                   PRIMARY KEY
                   (TABLE_NAME_ID) USING INDEX)';
           --
          execute immediate w_ddl;
          --
          dbms_output.put_line('Successfully created primary key on TABLE_NAME_ID');
          --
       exception
          when others then
             if sqlcode = -02264 then
                dbms_output.put_line('constraint already exists.');
             else
                dbms_output.put_line('creation of primary key failed:');
                dbms_output.put_line(sqlerrm);
                raise;
             end if;
       END;   
    
    <>
    

    It works well with our scripts to autmoated and help us when we iterate through development and back in if needed test environments.

    In this way, we can add the DDL statements to the deployment script and run the script again without error to set the database to the State required without having to run the newly created statement only.

    Sometimes this approach translates into a creation followed a statement alter table statement to add a column, but the end result of the script is always the same, and the deployment script can be controlled at source between iterations of development that is without having to restore the ddl changes to test the modified DDL script.

    hope that gives you some ideas.

  • Is there a system table that stores scripts "create table".

    Oracle which contains the scripts 'create table' for a table of system tables defined in a schema exist?

    I know that I can build with SQL querying the user_tab_columns, but I was wondering if the overall DML
    statement is already stored in another system table. In the Toad from Quest Software, you can simply go to the 'schema', "Tables," Brower
    Then select the "Script" tab and it shows you the statement 'create table' for the table that you are
    looking at. I wonder if Toad backstage is to build this script 'create table' via the user_tab_columns
    table or using another system table.

    Thank you in advance,
    Wes

    You can use the DBMS_METADATA. Procedure GET_DDL for details regarding the ddl statement used to create the table.

  • Creating Tables with a Script

    I am trying to create tables using a script, but it seems that the consecutive statements in the script will not run - someone ' one can tell me what I need to use the syntax?

    ****************************************************************************
    Here is my script - I use SQL-Plus:

    CREATE TABLE parts
    (region_id NUMBER
    NOT NULL CONSTRAINT Region_id_nn
    , region_name VARCHAR2 (25)
    )

    CREATE TABLE countries
    (country_id TANK (2)
    NOT NULL CONSTRAINT Country_id_nn
    , country_name VARCHAR2 (40)
    region_id NUMBER
    CONSTRAINT Country_c_id_pk
    PRIMARY KEY (country_id)
    )
    INDEX OF THE ORGANIZATION

    Here's what I touch in:

    SQL > get c:\oracle\test.txt

    Here is the error that comes out:

    1 parts of CREATE TABLE
    2 (region_id NUMBER
    3 region_id_nn of CONSTRAINT NOT NULL
    4, region_name VARCHAR2 (25)
    5)
    6 countries in CREATE TABLE
    7 (country_id TANK (2)
    8 country_id_nn of CONSTRAINT NOT NULL
    9, country_name VARCHAR2 (40)
    10, region_id NUMBER
    11, CONSTRAINT country_c_id_pk
    12 PRIMARY KEY (country_id)
    13)
    14 * ORGANIZATION INDEX
    15 run;
    CREATE TABLE countries
    *
    ERROR on line 6:
    ORA-00922: missing or not valid option
    ****************************************************************************
    If trim down the script - just 1 create table command, none of the semicolons, this works:

    Script:

    CREATE TABLE parts
    (region_id NUMBER
    NOT NULL CONSTRAINT Region_id_nn
    , region_name VARCHAR2 (25)
    )

    Key in:
    SQL > get c:\oracle\test.txt
    1 parts of CREATE TABLE
    2 (region_id NUMBER
    3 region_id_nn of CONSTRAINT NOT NULL
    4, region_name VARCHAR2 (25)
    5 *)
    SQL > execute;

    Receive:

    1 parts of CREATE TABLE
    2 (region_id NUMBER
    3 region_id_nn of CONSTRAINT NOT NULL
    4, region_name VARCHAR2 (25)
    5 *)

    Table created.
    ****************************************************************************
    adding a semicolon between the instructions in create table does not solve this problem - anyone got any ideas?

    Thank you

    -Tom

    Please see this for more information on the GET sqlplus command.

    http://download.Oracle.com/docs/CD/A97630_01/server.920/a90842/ch13.htm#1009882

    Get command Loads a host operating system file into the SQL buffer.
    
    *The operating system file should contain a single SQL statement or PL/SQL block*.
    The statement should not be terminated with a semicolon. If a SQL*Plus command or
    more than one SQL statement or PL/SQL block is loaded into the SQL buffer from an
    operating system file, an error occurs when the RUN or slash (/) command is used to
    execute the buffer.
    

    I hope it is clear now. So if you want to run a script that may contain more then one of SQL statements, create a file * .sql, put all the instructions, complete with a semicolon and run as follows:

    SQL > @script_name.sql

  • SQL-Lite create Table?

    I am wanting to save a string of text in a sql database - lite which is called "message1."  I press save button to call this code in my interlocutor.

    URI myURI = URI.create("file:///SDCard/flash.db");
    DatabaseFactory.open(myURI);
    Statement st = d.createStatement( "CREATE TABLE Restaurant (Experience TEXT)" );
    Dialog.alert("Here1!");
    st.prepare();
    st.execute();
    st.close();  
    
    Statement st1 = d.createStatement("INSERT INTO Restaurant(Experience) VALUES ('message1')");
    st1.prepare();
    st1.execute();
    st1.close();
    d.close();
    Dialog.alert("Your info was saved!");
    

    I can't even my Dialog statement to appear?  I do something wrong in the line where I create the table?

    Statement st = d.createStatement ('CREATE TABLE Restaurant (experience TEXT)');

    Because when I move the dialog statement before this line... I can see the dialog box

    Database db;
    URI myURI = URI.create("file:///SDCard/flash.db");
    db = DatabaseFactory.open(myURI);
    
    Statement st= db.createStatement("CREATE TABLE 'Restaurant' ( "
                        + "'Experience' TEXT)");
                st.prepare();
                st.execute();
                st.close();
    
                Statement st1 = db.createStatement("INSERT INTO Restaurant(Experience) VALUES ('Message1')");
                st1.prepare();
                st1.execute();
    
    db.close();
    

    I checked the code and its working very well.

    ----------------------------------------------------------
    feel free to press the congratulations on the left side to thank the user who has helped you.
    Please mark as resolved messages if you found a solution.

  • Create table form another table in different schema throwing error when dynamic sql

    Hello

    With the help of 11.2.0.3 and was following the issue.

    To create a table in a schema (b) using data from another schema (b)

    If independent run in sqlplus create works OK but same sql in dynamic sql block saying the table or view does not exist.

    SQL even in dynamic sql

    {code}

    v_sql: =' create table new_table in select * from schemab.table_name where...';

    run immediately (v_sql);

    [code}

    Other tables work fine.

    Any ideas - don't want to grant all the schemaa.table schema b if can avoid.

    Thank you

    You run the immediate execution in an anonymous block or a stored procedure?  If it is a stored procedure, then as others have said, the owner of the procedure must have select privileges on granted directly schemab.table_name.

    Another possibility, which would be the case for a stored procedure, or an anonymous block is that your code is something like:

    v_sql: =' create table new_table in select * from schemab.table_name where...';

    immediately run v_sql;

    Select count (*) in the l_count new_table;

    who will fail at compile time because new_table does not exist.

    When you create objects using dynamic sqly you dynamic sql user to reference them in the block of code.

    John

  • How to create tables for use in php/SQL Web site

    Sorry to ask the fundamental question because I am known.

    I built a site dw to registration of several products. I was following DW, the Missing Manual book tutorials. The tutorial provides data downloadable tabels in a folder with the extension .sql. I can't find anywhere a statement that the way in which the .sql file is created.

    Second question: if it can be created in Access 2007, please tell me how.

    Thank you very much.

    Try reading the following article for some tips. http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html. Life becomes much easier when you understand the basic principles of standardization.

  • Create table or MV in PL/SQL

    Hey everybody,



    It is probably a very simple question, but I can't seem to create a table in a PL/SQL procedure. I have something like this:



    PROCEDURE TEST_PROC IS

    BEGIN

    RUN IMMEDIATELY "CREATE TABLE TEST_TBL AS SELECT * FROM DUAL';"

    END TEST_PROC;



    I get an error of privs when I try to execute the proc. I also tried everything first create a view, materialized in a very similar way, but it also did not work.



    I did some research and on a blog, they created a table by using the statement of full table create for example CREATE TABLE NAME (COLUMN1 TYPE1, etc...);



    But I want to create the table using the clause 'AS' and the definition of a query.



    Is there a specific privilege that I have to be able to do this? It seems simple enough.



    Thank you!



    -Joe

    No, you need (again) CREATE TABLE privilege. CREATE ANY TABLE is to create arrays in other patterns.

  • [10g] calls for more information on CREATE TABLE?

    Is it possible to put something in place that invites you to insert a piece of information at any time a table is created?

    I have a table:
    CREATE TABLE     my_table_notes
    (     table_name     VARCHAR2(30)     NOT NULL
    ,     table_owner     VARCHAR2(3)     NOT NULL
    ,     date_added     TIMESTAMP     NOT NULL
    ,     notes          VARCHAR2(2000)
    ,     CONSTRAINT     dtn_pk     PRIMARY KEY (table_name, table_owner, date_added)
    );
    Where do I put the notes on the tables, that I added to my database. These notes are mainly to remind me exactly what is in the tables. I have a number of tables with similar names and similar columns, such as desc table does not always information that I need to remember what is a table. Yes, I could keep a document text or something with this information, but I like to have in the database.

    What I was asking is, is there anything I can do which will automatically ask me after I created a table, in order to enter comments on this table, such as the instruction insert the following would be generated?
    INSERT INTO     my_table_notes
    VALUES (<table just created>, <owner of table created>, SYSTIMESTAMP, <comments I provide on prompt>);
    I work in 10g (XE on my local machine)

    Published by: user11033437 on July 14, 2011 09:31: Oracle version added

    If you happen to start with serveroutput enabled in SQL * more permanently, a DDL trigger could potentially just released a note reminding you to create a comment. If you do not set serveroutput, you don't see the message. And, of course, you could easily ignore the message that came out. If you want just a friendly reminder, this is enough.

    Because PL/SQL runs on the database server, there is no way to ask a user for something - it has no facilities to get a user input. SQL * Plus has the ability to ask a user for the data, but then you need to run a given SQL * more script to create a table that seems much too heavy for the situation you describe.

    Justin

  • Can any share reports Oracle Developer 6i demo table scripts?

    Hello

    I have to learn the 6i to report to my office project, I installed developer 6i report but I couldn't the demo CD, can any share the table creation Scripts (i.e., Stock, stock_history, indcat) and also the insertion of scripts for the population of data or provide the URL where I can find the same.

    thanking you in advance.

    Kind regards
    Sham.

    Hello

    Download the ZIP file and open it. In win32\pmbf\6_0_8_8\admin, there is a script demo60.sql

    This script creates tables STOCKS, INDCAT...

    Concerning

  • epengs.dB (ENG) + error CREATE TABLE PS_1099C_CUST_DATA


    PT 8.54.10

    FSCM 9.2 (picture 13)

    SQL Server 2008 (64-bit)

    We get below error when we are in the stages of the creation of the DB via DM scripts.

    Started the: Tue Nov 17 02:10:54 2015
    Release of Data Mover: 8.54.10
    Database: FSDMO92 (ENG)
    Input file: E:\FSDMO92\data\epengs.db (ENG)
    Import 1099C_CUST_DATA
    Create Table 1099C_CUST_DATA
    -SQL error. Position of the error: 0 return: 8601 -.


    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Column, parameter, or variable #4: could not find the PSDATE data type.
    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Instructions could not be prepared. (SQLSTATE 37000) 8180

    CREATE TABLE PS_1099C_CUST_DATA (CUST_ID varchar (15) NOT NULL, TIN varchar (20) NOT NULL, TAXPAYER_ID varchar (14) is NOT NULL, ASOF_DATE PSDATE NULL, decimal ENTRY_AMT (26, 3) NOT NULL, decimal INTEREST_EXPENSE (26, 3) NOT NULL, Name1 varchar (40) NOT NULL, NAME2 varchar (40) NOT NULL, NOT NULL of the varchar (55), of ADDR_LN1 ADDR_LN2 varchar (55) NOT NULL) , ADDR_LN3 varchar (55) NOT NULL, ADDR_LN4 varchar (55) NOT NULL, CITY varchar (30) NOT NULL, NOT NULL of the varchar (6) State, POSTAL varchar (12) NOT NULL, TEL varchar (24) is NOT NULL, NAME varchar (50) NOT NULL, Name3 varchar (40) NOT NULL, name4 varchar (40) NOT NULL, CITY3 varchar (30) NOT NULL, Address1 varchar (55) NOT NULL , State3 varchar (6) NOT NULL, POSTAL...
    Error: Unable to process create statement for 1099C_CUST_DATA
    Ending: Tue Nov 17 02:10:56 2015
    Unsuccessful end

    Cannot find the data type PSDATE comes here.  Looks like one of the required scripts has not been executed.  It has been long since I am on a site of SQL Server, but I understand the substance of this issue.  PeopleSoft creates a customized in SQL Server PSDATE data type which is an extension of the date format.

    Rather than to point you to the script, I suggest you go back and find where this prerequisite is necessary and make sure that you are not lacking in any other required component.

  • Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

    Mr President.

    jasper test.gif

    Me trying to run a report of jasper in my adf application but to get the message

    Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

    net.sf.jasperreports.engine.JRException: the SQL statement execution error for: empReport

    at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:240)

    at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1114)

    at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:691)

    at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1314)

    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:931)

    at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:873)

    at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:87)

    at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:457)

    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:864)

    to the view. JasperBean.runReport (JasperBean.java:90)

    to the view. JasperBean.runReportAction (JasperBean.java:39)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at com.sun.el.parser.AstValue.invoke(AstValue.java:254)

    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:302)

    at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)

    at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)

    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)

    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)

    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)

    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:1074)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:402)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:225)

    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:280)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:254)

    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)

    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)

    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:502)

    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:502)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)

    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:137)

    at java.security.AccessController.doPrivileged (Native Method)

    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)

    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)

    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)

    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)

    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:220)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3436)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3402)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)

    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)

    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)

    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)

    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)

    to weblogic.servlet.provider.ContainerSupportProviderImpl$ WlsRequestExecutor.run (ContainerSupportProviderImpl.java:255)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

    Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:466)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:407)

    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1113)

    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:546)

    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:269)

    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:603)

    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:234)

    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:55)

    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:829)

    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1049)

    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1270)

    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:5010)

    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:5070)

    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1677)

    at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:141)

    at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:233)

    ... more than 66

    < 14 March 2015 13:13:20 PKT > < error > < javax.enterprise.resource.webcontainer.jsf.application > < BEA-000000 > < error rendered view [/Welcome]

    java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream()

    at weblogic.servlet.internal.ServletResponseImpl.getWriter(ServletResponseImpl.java:334)

    at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:148)

    at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:723)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    Truncated. check the log file full stacktrace

    >

    < oracle.adf.controller > < AdfcExceptionHandler > < handleException > < NO_EXCEPTION_HANDLER >

    java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream()

    at weblogic.servlet.internal.ServletResponseImpl.getWriter(ServletResponseImpl.java:334)

    at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:148)

    at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:723)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at com.sun.faces.application.view.FaceletViewHandlingStrategy.createResponseWriter(FaceletViewHandlingStrategy.java:938)

    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:377)

    at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:101)

    at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:101)

    to org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ ChangeApplyingVDLWrapper.renderView (ViewDeclarationLanguageFactoryImpl.java:338)

    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)

    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)

    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:170)

    at oracle.adfinternal.view.faces.lifecycle.ResponseRenderManager.runRenderView(ResponseRenderManager.java:52)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1095)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:389)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:255)

    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:280)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:254)

    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)

    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)

    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:502)

    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:502)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)

    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:137)

    at java.security.AccessController.doPrivileged (Native Method)

    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)

    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)

    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)

    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)

    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:220)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3436)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3402)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)

    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)

    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)

    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)

    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)

    to weblogic.servlet.provider.ContainerSupportProviderImpl$ WlsRequestExecutor.run (ContainerSupportProviderImpl.java:255)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

    < oracle.adf.view > < RichExceptionHandler > < _logUnhandledException > < ADF_FACES - 60098:Faces life cycle receives exceptions that are unhandled in phase RENDER_RESPONSE 6 >

    java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream()

    at weblogic.servlet.internal.ServletResponseImpl.getWriter(ServletResponseImpl.java:334)

    at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:148)

    at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:723)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at com.sun.faces.application.view.FaceletViewHandlingStrategy.createResponseWriter(FaceletViewHandlingStrategy.java:938)

    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:377)

    at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:101)

    at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:101)

    to org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ ChangeApplyingVDLWrapper.renderView (ViewDeclarationLanguageFactoryImpl.java:338)

    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)

    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)

    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:170)

    at oracle.adfinternal.view.faces.lifecycle.ResponseRenderManager.runRenderView(ResponseRenderManager.java:52)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1095)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:389)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:255)

    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:280)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:254)

    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)

    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)

    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:502)

    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:502)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)

    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:137)

    at java.security.AccessController.doPrivileged (Native Method)

    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)

    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)

    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)

    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)

    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:220)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3436)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3402)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)

    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)

    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)

    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)

    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)

    to weblogic.servlet.provider.ContainerSupportProviderImpl$ WlsRequestExecutor.run (ContainerSupportProviderImpl.java:255)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

    [< 14 March 2015 13:13:20 PKT > < error > < HTTP > < BEA-101020 > < [ServletContext@285463113[app:JasperTest module: JasperTest-ViewController-context-spec: null, path root-version: 3.0]] Servlet failed with an Exception

    java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream()

    at weblogic.servlet.internal.ServletResponseImpl.getWriter(ServletResponseImpl.java:334)

    at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:148)

    at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:723)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    Truncated. check the log file full stacktrace

    >

    < 14 March 2015 13:13:20 PKT > < opinion > < Diagnostics > < BEA-320068 > < Watch "UncheckedException" in the module "Module-FMWDFW" with severity "Notice" on the server "DefaultServer" released March 14, 2015 13:13:20 PKT details. Notification:

    WatchRuleType: Journal

    WatchRule: (SEVERITY = "Error") AND ((MSGID = ' WL-101020') OR (MSGID = "WL-101017'") OR (MSGID = "WL-000802'") OR (MSGID = "BEA-101020'") OR (MSGID = "BEA-101017'") OR (MSGID = "BEA-000802'"))

    [WatchData: DATE = March 14, 2015 13:13:20 PKT SERVER = DefaultServer MESSAGE = [ServletContext@285463113[app:JasperTest module: JasperTest-ViewController-context-spec: null, path root-version: 3.0]] Servlet failed with an Exception

    java.lang.IllegalStateException: strict servlet API: cannot call getWriter() after getOutputStream()

    at weblogic.servlet.internal.ServletResponseImpl.getWriter(ServletResponseImpl.java:334)

    at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:148)

    at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(ExternalContextImpl.java:723)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at javax.faces.context.ExternalContextWrapper.getResponseOutputWriter(ExternalContextWrapper.java:669)

    at com.sun.faces.application.view.FaceletViewHandlingStrategy.createResponseWriter(FaceletViewHandlingStrategy.java:938)

    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:377)

    at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:101)

    at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:101)

    to org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ ChangeApplyingVDLWrapper.renderView (ViewDeclarationLanguageFactoryImpl.java:338)

    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)

    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)

    at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:170)

    at oracle.adfinternal.view.faces.lifecycle.ResponseRenderManager.runRenderView(ResponseRenderManager.java:52)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1095)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:389)

    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:255)

    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:280)

    to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:254)

    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)

    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)

    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:502)

    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)

    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:502)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)

    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)

    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:137)

    at java.security.AccessController.doPrivileged (Native Method)

    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)

    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)

    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)

    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)

    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:220)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)

    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3436)

    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3402)

    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)

    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)

    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)

    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)

    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)

    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)

    to weblogic.servlet.provider.ContainerSupportProviderImpl$ WlsRequestExecutor.run (ContainerSupportProviderImpl.java:255)

    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)

    at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

    Subsystem = HTTP USERID < WLS Kernel > = SEVERITY = error THREAD = ExecuteThread [ASSET]: '6' for queue: MSGID "(self-adjusting) weblogic.kernel.Default" = BEA - 101020 MACHINE = TANVIR-PC TXID = the CONTEXTID = 9e95b0a0-9417-4bdd-a665-16c85bcbc70c-00000094 TIMESTAMP = 1426320800208

    WatchAlarmType: AutomaticReset

    WatchAlarmResetPeriod: 30000

    >

    < oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl > < DiagnosticsDataExtractorImpl > < createADRIncident > < incident created 56 to key problem "DFW-99998 [java.lang.IllegalStateException] [oracle.adfinternal.view.faces.lifecycle.ResponseRenderManager.runRenderView] [JasperTest]" >

    My code is

    JSP page

    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE html>
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
        <af:document title="Welcome.jsf" id="d1">
            <af:messages id="m1"/>
            <af:form id="f1">
                <af:button text="Run Report" id="b1" partialSubmit="false" action="#{Jasper.runReportAction}"/>
                <af:table value="#{bindings.EmpView1.collectionModel}" var="row" rows="#{bindings.EmpView1.rangeSize}"
                          emptyText="#{bindings.EmpView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                          rowBandingInterval="0" selectedRowKeys="#{bindings.EmpView1.collectionModel.selectedRow}"
                          selectionListener="#{bindings.EmpView1.collectionModel.makeCurrent}" rowSelection="single"
                          fetchSize="#{bindings.EmpView1.rangeSize}" id="t1">
                    <af:column headerText="#{bindings.EmpView1.hints.EmpId.label}" id="c1">
                        <af:outputText value="#{row.EmpId}" shortDesc="#{bindings.EmpView1.hints.EmpId.tooltip}" id="ot1"/>
                    </af:column>
                    <af:column headerText="#{bindings.EmpView1.hints.PhoneNo.label}" id="c2">
                        <af:outputText value="#{row.PhoneNo}" shortDesc="#{bindings.EmpView1.hints.PhoneNo.tooltip}"
                                       id="ot2"/>
                    </af:column>
                    <af:column headerText="#{bindings.EmpView1.hints.Desig.label}" id="c3">
                        <af:outputText value="#{row.Desig}" shortDesc="#{bindings.EmpView1.hints.Desig.tooltip}" id="ot3"/>
                    </af:column>
                    <af:column headerText="#{bindings.EmpView1.hints.LName.label}" id="c4">
                        <af:outputText value="#{row.LName}" shortDesc="#{bindings.EmpView1.hints.LName.tooltip}" id="ot4"/>
                    </af:column>
                    <af:column headerText="#{bindings.EmpView1.hints.MName.label}" id="c5">
                        <af:outputText value="#{row.MName}" shortDesc="#{bindings.EmpView1.hints.MName.tooltip}" id="ot5"/>
                    </af:column>
                    <af:column headerText="#{bindings.EmpView1.hints.FName.label}" id="c6">
                        <af:outputText value="#{row.FName}" shortDesc="#{bindings.EmpView1.hints.FName.tooltip}" id="ot6"/>
                    </af:column>
                    <af:column headerText="#{bindings.EmpView1.hints.BankAc.label}" id="c7">
                        <af:outputText value="#{row.BankAc}" shortDesc="#{bindings.EmpView1.hints.BankAc.tooltip}"
                                       id="ot7"/>
                    </af:column>
                </af:table>
            </af:form>
        </af:document>
        <!--oracle-jdev-comment:preferred-managed-bean-name:Jasper-->
    </f:view>
    

    report code

    <?xml version="1.0" encoding="UTF-8"?>
    <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="empReport" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="b049c1d2-c175-4a8b-b9af-65bcdc99a573">
      <property name="ireport.zoom" value="1.0"/>
      <property name="ireport.x" value="0"/>
      <property name="ireport.y" value="0"/>
      <queryString>
      <![CDATA[SELECT
         *
    FROM
         "SCHOOL"."EMP" EMP]]>
      </queryString>
      <field name="EMP_ID" class="java.lang.String"/>
      <field name="PHONE_NO" class="java.lang.String"/>
      <field name="DESIG" class="java.lang.String"/>
      <field name="L_NAME" class="java.lang.String"/>
      <field name="M_NAME" class="java.lang.String"/>
      <field name="F_NAME" class="java.lang.String"/>
      <field name="BANK_AC" class="java.lang.String"/>
      <background>
      <band splitType="Stretch"/>
      </background>
      <title>
      <band height="79" splitType="Stretch"/>
      </title>
      <pageHeader>
      <band height="35" splitType="Stretch"/>
      </pageHeader>
      <columnHeader>
      <band height="61" splitType="Stretch">
      <staticText>
      <reportElement x="218" y="2" width="100" height="20" uuid="da36d8a4-5af2-40f1-9c0e-06970db5131d"/>
      <text><![CDATA[EMP_ID]]></text>
      </staticText>
      </band>
      </columnHeader>
      <detail>
      <band height="125" splitType="Stretch">
      <textField>
      <reportElement x="218" y="36" width="100" height="20" uuid="0c47bb5c-e96f-4544-8686-8e19f677cee6"/>
      <textFieldExpression><![CDATA[$F{EMP_ID}]]></textFieldExpression>
      </textField>
      </band>
      </detail>
      <columnFooter>
      <band height="45" splitType="Stretch"/>
      </columnFooter>
      <pageFooter>
      <band height="54" splitType="Stretch"/>
      </pageFooter>
      <summary>
      <band height="42" splitType="Stretch"/>
      </summary>
    </jasperReport>
    

    bean code is

    package view;
    
    
    import java.io.ByteArrayOutputStream;
    import java.io.InputStream;
    import java.sql.Connection;
    import java.util.HashMap;
    import java.util.Map;
    import javax.faces.context.FacesContext;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServletResponse;
    import javax.sql.DataSource;
    import net.sf.jasperreports.engine.JasperExportManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.engine.JasperReport;
    import net.sf.jasperreports.engine.type.WhenNoDataTypeEnum;
    import net.sf.jasperreports.engine.util.JRLoader;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCIteratorBinding;
    
    
    import oracle.binding.BindingContainer;
    
    
    
    
    public class JasperBean {
        public JasperBean() {
        }
    
    
        public String runReportAction() {
            // Add event code here...
            DCIteratorBinding empIter = (DCIteratorBinding) getBindings().get("EmpView1Iterator");
                        String empId = empIter.getCurrentRow().getAttribute("EmpId").toString();
                        Map m = new HashMap();
                        m.put("employeeId", empId);
                        try
                        {
                          runReport("empReport.jasper", null);
                        }
                        catch (Exception e)
                        {
                        }
            return null;
        }
        public BindingContainer getBindings()
             {
               return BindingContext.getCurrent().getCurrentBindingsEntry();
             }
             
             public Connection getDataSourceConnection(String dataSourceName)
                 throws Exception
               {
                 Context ctx = new InitialContext();
                 DataSource ds = (DataSource)ctx.lookup(dataSourceName);
                 return ds.getConnection();
               }
             
             private Connection getConnection() throws Exception
             {
               return getDataSourceConnection("hrDS");
             }
             
             public  ServletContext getContext()
               {
                 return (ServletContext)getFacesContext().getExternalContext().getContext();
               }
             public  HttpServletResponse getResponse()
               {
                 return (HttpServletResponse)getFacesContext().getExternalContext().getResponse();
               }
             public static FacesContext getFacesContext()
               {
                 return FacesContext.getCurrentInstance();
               }
             public void runReport(String repPath, java.util.Map param) throws Exception
             {
               Connection conn = null;
               try
               {
                 HttpServletResponse response = getResponse();
                 ServletOutputStream out = response.getOutputStream();
                 response.setHeader("Cache-Control", "max-age=0");
                 response.setContentType("application/pdf");
                 ServletContext context = getContext();
                 InputStream fs = context.getResourceAsStream("/reports/" + repPath);
                 JasperReport template = (JasperReport) JRLoader.loadObject(fs);
                 template.setWhenNoDataType(WhenNoDataTypeEnum.ALL_SECTIONS_NO_DETAIL);
                 conn = getConnection();
                 JasperPrint print = JasperFillManager.fillReport(template, param, conn);
                 ByteArrayOutputStream baos = new ByteArrayOutputStream();
                 JasperExportManager.exportReportToPdfStream(print, baos);
                 out.write(baos.toByteArray());
                 out.flush();
                 out.close();
                 FacesContext.getCurrentInstance().responseComplete();
               }
               catch (Exception jex)
               {
                 jex.printStackTrace();
               }
               finally
               {    
                 close(conn);
               }
             }
             
             public void close(Connection con)
              {
                if (con != null)
                {
                  try
                  {
                    con.close();
                  }
                  catch (Exception e)
                  {
                  }
                }
              }
    }
    

    Concerning

    Mr President.

    I recreate my diagram by connecting as sysdba and opens the my database

    then I do not get this message.

    I think that was the problem with my database it has been locked or is created in use of the system.

  • COPY OF DB1 to DB2 CREATE TABLE...

    If I run script (3) in the database of and remove (-), it will run.  But when I turn into a COPY OF DB1 to DB2 (my example uses DB1 to DB1 for you) and try and run - it returns immediately and does not create the table in the database TO.  And I do not get an error.

    I'm looking for 40 + combos 3 different characters but the characters are not separated in the table, it's just all crushed together.  I try so to analyze the data, and then look 3 character codes.  (I know it's a ugly script).

    Are there limits using a script to COPY OF DB1 to DB2?  For me, it was mentioned that there are too many characters in my select statement.  If this is the case, anyone have any suggestions?


    Thank you in advance... Shelli

    --(1) CREATE TABLE RPO_EX

    create table rpo_ex)

    EMP varchar2 (25).

    option_group varchar2 (100));

    --(2) INSERT SOME SAMPLE DATA INTO THE RPO_EX TABLE

    insert into rpo_ex values ("Gary", "AL0AQ9ATHAT8AXJAYGCF5CJ2DCPDR5EF7FE2FE9FHOF46GGCGW6G7Q");

    insert into rpo_ex values ("Gary", "H2GIO3I15J55KA1KR1LALLTGMAHMYANP5NT7Q5URA6R6WR9NSLMTUJ");

    insert into rpo_ex values ("Gary", "UDDUE1UPFUQAU2KU80VH9VK3VRGVRHVRJVRKVRLVRMVRNVRRVT7V8D");

    insert into rpo_ex values ("Gary", "WMFXFE1SD1SZ4AA5A76SU7SU8GR9GR9L3");

    insert into rpo_ex values ('Craig', 'AL0AQ9ATHAT8AXJAYGCJ2DCPDR5EF7FE2FE9FHOGANGGCGM3HHMIO3');

    insert into rpo_ex values ('Craig', 'I15J55KR1LALLCVMAHMYANP5NT7Q5URA6R6WR9NSLMS08TUJUDDUE1');

    insert into rpo_ex values ('Craig', 'UPFUQAU2KU80VH9VRGVRHVRJVRKVRLVRMVRNVRRVT7V8DWMFYM81SA');

    insert into rpo_ex values ('Craig', '1SZ4C15A76SA7SA8GM9GM9L3');

    insert into rpo_ex values ('Fred', '1SZ4AA5A76SA7SA8GM9GM9L3');

    insert into rpo_ex values ('Fred', 'AL0AQ9ATHAT8AXJAYGCJ2DCPDR5EF7FE2FE9FHOGBAGGCGM3H2GIO3');

    insert into rpo_ex values ('Fred', 'I15JE5KR1KTILALLCVMAHMYANP5NT7Q5WRA3R6WR9NSLMTUJUDDUE1');

    insert into rpo_ex values ('Fred', 'UPFUQAU2KU80VH9VK3VRGVRHVRJVRKVRLVRMVRNVRRVT7V8DWMF1SA');

    insert into rpo_ex values ('Frank', 'AL0AQ9ATHAT8AXJAYGCF5CJ2DCPDR5EF7FE2FHOGGCGW6G1MH2GIO3');

    insert into rpo_ex values ('Frank', 'I15J55KR1LALLTGMAHMYANC7NP5NU5RA6R1UR6WR9NSLMTUJUDDUE1');

    insert into rpo_ex values ('Frank', 'UPFUQAU2KU80VH9VK3VRGVRHVRJVRKVRLVRMVRNVRRVT7V8DWMFXFE');

    insert into rpo_ex values ('Frank', 'YF51SC1SZ4AA5A76SA7SA8GM9GM9L3');

    insert into rpo_ex values ("Jim", "4C15A76SA7SA8GM9GM9L3");

    insert into rpo_ex values ("Jim", "AL0AQ9ATHAT8AXJAYGCJ2DCPDR5EF7FE2FE9FHOGGCGM3GTRHHMIO3");

    insert into rpo_ex values ("Jim", "I15JE5KR1KTILALLCVMAHMYANP5NT7Q5WRA3R6WR9NSLMTUJUDDUE1");

    insert into rpo_ex values ("Jim", "UPFUQAU2KU80VH9VRGVRHVRJVRKVRLVRMVRNVRRVT7V8DWMF1SA1SZ");

    sqlplus usr/pw@db1 @ 'copy_rpo_ex.sql' usr/pw@db1 usr/pw@db1


    --(3) COPY OF THE TABLE CREATION SCRIPT

    whenever sqlerror exit rollback sql.sqlcode

    SET ARRAYSIZE 5000

    SET COPYCOMMIT 20

    set linesize 4000

    TERMOUT OFF SET

    COPY OF usr/pw@db1 to usr_pw_db1-

    CREATE using rpo_ex2-

    SELECT * FROM (-)

    WITH v1 as (-)

    Select emp, option_group, | " -

    substr (option_group, 1, 3)-

    ||','|| substr (option_group, 4, 3)-

    ||','|| substr (option_group, 7, 3)-

    ||','|| substr (option_group, 10, 3)-

    ||','|| substr (option_group, 13, 3)-

    ||','|| substr (option_group, 16, 3)-

    ||','|| substr (option_group, 19, 3)-

    ||','|| substr (option_group, 22, 3)-

    ||','|| substr (option_group, 25, 3)-

    ||','|| substr (option_group, 28, 3)-

    ||','|| substr (option_group, 31, 3)-

    ||','|| substr (option_group, 34, 3)-

    ||','|| substr (option_group, 37, 3)-

    ||','|| substr (option_group, 40: 3)-

    ||','|| substr (option_group, 43, 3)-

    ||','|| substr (option_group, 46, 3)-

    ||','|| substr (option_group, 49: 3)-

    ||','|| substr (option_group, 52, 3) | ',' RPO-

    of rpo_ex).

    Select emp, case.

    When (rpo like ('% UFF %') and rpo like ('% UP9% ')) then 'UFF + UP9 -.

    When the rpo like ('% ADG %') then 'ADG ' -.

    When rpo love ("IO3%") then "IO3 -.

    When the rpo as ("IO4%") then "IO4 -.

    When the rpo as ('IO5% ") then 'IO5 -.

    When the rpo as ("IO6% %") then "IO6" -.

    When rpo like ('% ROMANO %') then 'ROMAN '.

    When the rpo like ('% U0F %') then 'U0F '.

    When the rpo like ('% U0H %') then 'U0H '.

    When the rpo like ('% U1C %') then 'U1C;

    When the rpo as ('UCH %") then"UCH -.

    When the rpo as ('UCM % %') then 'UCM -.

    When the rpo like ('% UF7% ') then 'UF7;

    When the rpo as ("UFF %") then "UFF;

    When the rpo like ('% UFU %') then 'UFU -.

    When the rpo like ('% UG4% ') then 'UG4;

    When the rpo like ('% UGU %') then 'UGU;

    When the rpo like ('% UGX %') then 'UGX;

    When the rpo like ('% YFU %') then 'YFU;

    When the rpo like ('% UH7% ') then 'UH7;

    When the rpo like ('% UHQ %') then 'UHQ -.

    When the rpo as ("UHU %") then 'UHU '.

    When the rpo like ('% UHV %') then 'UHV;

    When the rpo like ('% UHW %') then 'UHW -.

    When rpo love ('UI2% ") then"UI2. "

    When rpo like ('% UI4% ') then 'UI4;

    When the rpo like ('% UI6% ') then 'UI6 '.

    When the rpo as ("UI7%") then "UI7;

    When the rpo as ("UI8%") then "UI8;

    When the rpo like ('% UL5% ') then 'UL5;

    When the rpo like ('% UM7% ') then 'UM7;

    When the rpo as ("UMT %") then "UMT" -.

    When the rpo as ("UNM %") then "UNM;

    When the rpo like ('% UPX %") then"UPX"

    When the rpo like ('% US8% ') then 'US8 -.

    When the rpo like ('% Mikiduta %') then 'KARIM ' -.

    When the rpo like ('% UUJ %') then 'UUJ;

    When the rpo as ('UUN %") then"UUN -.

    When the rpo like ('% % PERFORMED') then 'PERFORMED '.

    When the rpo like ('% UYE %') then 'UYE.

    When the rpo as ("UYS %") then "UYS' end - RPO

    v1 -.

    where the rpo like ('%, ADG, %').

    or the rpo like ('%, IO3, %')-

    or the rpo like ('%, IO4, %')-

    or the rpo like ('%, IO5, %')-

    or the rpo like ('%, IO6, %')-

    or the rpo like ('%, ROE, %')-

    or rpo like ('% U0F %')-

    or rpo like ('% U0H %')-

    or the rpo like ('%, U1C, %')-

    or the rpo like ('%, UCH, %')-

    or the rpo like ('%, UCM, %')-

    or the rpo like ('%, UF7, %')-

    or the rpo like ('%, UFF, %')-

    or the rpo like ('%, UFU, %')-

    or the rpo like ('%, UG4, %')-

    or the rpo like ('%, UGU, %')-

    or the rpo like ('%, UGX, %')-

    or the rpo like ('%, YFU, %')-

    or rpo like ('% UH7, %')-

    or the rpo like ('%, UHQ, %')-

    or the rpo like ('%, UHU, %')-

    or the rpo like ('%, UHV, %')-

    or the rpo like ('%, UHW, %')-

    or the rpo like ('%, UI2, %')-

    or the rpo like ('%, UI4, %')-

    or the rpo like ('% UI6% ')-

    or the rpo like ('%, UI7, %')-

    or the rpo like ('%, UI8, %')-

    or the rpo like ('%, UL5, %')-

    or the rpo like ('%, UM7, %')-

    or the rpo like ('%, UMT, %')-

    or the rpo like ('%, UNM, %')-

    or the rpo like ('%, UPX, %')-

    or the rpo like ('%, US8, %')-

    or the rpo like ('%, KARIM, %')-

    or the rpo like ('%, UUJ, %')-

    or the rpo like ('%, UUN, %')-

    or rpo like ('% PERFORMED, %')-

    or the rpo like ('%, UYE, %')-

    or the rpo like ('%, UYS, %')-

    or the rpo like ('%, ROE, %'))

    /

    output

    If you google you will see many examples, here is one:

    Double on the database table. Laurent Schneider

Maybe you are looking for