Oracle JAAS with roles from database tables and Oracle SSO integration

I have the following requirement for user authentication and authorization. The applications are build using ADF Faces and BC4J. User authentication should be done using Oracle SSO. User roles and functions will be stored in custom tables. These roles will be used on ADF application pages to restrict access to the UI components on a page. Example: User will "Employee" role cannot create a new employee; however, user with "HR" role can create a new employee.
In this case, "Create" button will be visible on the ADF page.
1. How can we use Oracle JAAS to use custom tables for roles instead of using flat XML files?
2. How does ADF applications use these roles to restrict components on a page?
3. For authentication, I guess we should be able to use SSO and integrate with Oracle JAAS?
Thanks.

Hi,
I can give you the answers to 1 and 2 but haven't tried 3.
1) Oracle OC4J since 10.1.3.1 has a database LoginModule that is explained in the OC4J security guide.
I have a how-to document in review that will be published probaby next week and that explains how to set this LogiNModule up for JDeveloper and stand alone OC4J, though the OC4J documentation is pretty good as well
http://download-west.oracle.com/docs/cd/B32110_01/web.1013/b28957/loginmod.htm#BABCDDAI
2) Create a managed bean with boolan methods like isUserManager, isUserEmployee, isUserTechnician etc. In this methods check for the security role on teh request object's isUserInRole() method. Then access this methods from the disabled or rendered property using ExpressionLanguage
A custom Login ModuleDoesn't use Oracle JAAS but plugs into it. So I am not sure if SSO would work with this because the custom LoginModule wouldn't get a username password pair but only a username that it has to trust.
Frank

Similar Messages

  • Extract data from database tables and download in pdf and csv

    extract data from database tables and download in pdf and csv
    hi how can i re-write my old form procedure in adf java. the procedure used to extract data from diffirent table and dowload the data in pdf and csv.am not downloading image, i what to extract data from diffirent tables in my database and download that data in pdf and csv. i would like to write this in java adf.i just what direction am not asking anyone to do my work this is my learning curve
    the form code is
    function merge_header3 return varchar2 is
    begin
         return '~FACILITY DESCRIPTION~ACCOUNT NO~BRANCH CODE~BANK REF NO.~P/P/ AMOUNT~Postal Address 1~Postal Address 2~Box Postal Code~Dep. Date~Month~BANK NAME~BRANCH NAME~ACCOUNT TYPE~DESCRIPTION~OBJECTIVE DESCRIPTION';
    end;
    procedure download_file (i_pbat integer) is
      dir varchar2(80);
      file_name1 varchar2(80);
      file_name2 varchar2(80);
      appl_code varchar2(80);
      fil1 client_text_io.file_type;
      fil2 client_text_io.file_type;
      dat varchar2(1000);
      DATA VARCHAR2(1000);
      bvspro varchar2(100);
      ssch   varchar2(100);
      bvspro_total number(20,2);
      ssch_total   number(20,2);
      grand_total  number(20,2);
      cnt    integer;
      cursor pbat is
           select *
           from sms_payment_batches
           where id = i_pbat
      cursor pay  (pb_id integer) is
           select *
           from sms_payment_vw
           where pbat_id = pb_id
           order by subsidy ASC,programme,beneficiary_name
      cursor cgref (low varchar2) is
           select *
           from cg_ref_codes
           where rv_domain ='SMS'
           and rv_low_value = low
      success boolean;     
      begin  
           set_application_property(cursor_style,'busy');
           appl_code := sms_global.ref_code('SMS','APP_CODE','SMS',0);
        dir       := sms_global.ref_code('SMS','PAY_DIR','c:\sms\batch_payments',0);
             success := webutil_file.create_directory(dir);
         if webutil_file.file_is_directory(dir) then
             null;
    --         message ('directory exists');
        else
    --                  message ('create directory ');
             success := webutil_file.create_directory(dir);
    --         if success then        message ('directory exists');    end if;
        end if;     
        for c_pbat in pbat loop
             file_name1 := dir ||'\' || appl_code||c_pbat.batch_number||'-'||to_char(c_pbat.batch_dt,'yyyymmdd')||'pay.txt';
             file_name2 := dir ||'\' || appl_code||c_pbat.batch_number||'-'||to_char(c_pbat.batch_dt,'yyyymmdd')||'merge.txt';
    --message('create files ');
    --         fil1  := client_text_io.fopen (file_name1,'W');
    --         fil2  := client_text_io.fopen (file_name2,'W');
        fil1  := client_text_io.fopen (file_name1,'W','');
        fil2  := client_text_io.fopen (file_name2,'W','');
                   dat :=                       'FROM ACCOUNT NUMBER'
                                                                ||'~'||'FROM ACCOUNT DESCRIPTION'
                                                                ||'~'||'MY STATEMENT DESCRIPTION'
                                                                ||'~'||'BENEFICIARY ACCOUNT NUMBER'
                                                                ||'~'||'BENEFICIARY SUB ACCOUNT NUMBER'        
                                                                ||'~'||'BENEFICIARY BRANCH CODE'
                                                                ||'~'||'BENEFICIARY NAME'
                                                                ||'~'||'BENEFICIARY STATEMENT DESCRIPTION'
                                                                ||'~'||'AMOUNT';
             --     client_text_io.put_line(fil1,dat);
             bvspro:= null;
             ssch  := null;
             cnt := 0;     
             dat := '~'||lpad('~',16,'~');
             for c_pay in pay(c_pbat.id) loop
    --message('cpay loop ' || cnt);              
               if bvspro is null then
                     dat := lpad('~',16,'~');
                     dat := utility.put_field(1,c_pay.programme,dat,'~');     
               client_text_io.put_line(fil2,dat);
               dat := utility.put_field(1,c_pay.subsidy,dat,'~');
               client_text_io.put_line(fil2,dat);
               dat := merge_header3;
                     client_text_io.put_line(fil2,dat);
                     bvspro := c_pay.programme;
                     ssch := c_pay.subsidy;
                     grand_total := 0;
                     bvspro_total := 0;
                     ssch_total := 0;
               end if;
               if bvspro <> c_pay.programme then
                     dat := lpad('~',16,'~');
                     dat := utility.put_field(5,ssch_total,dat,'~');
                     dat := lpad('~',16,'~');
                     dat := utility.put_field(5,bvspro_total,dat,'~');
               dat := utility.put_field(1,'Total:' || bvspro,dat,'~');
                     client_text_io.put_line(fil2,dat);
                     dat := lpad('~',16,'~');
               client_text_io.put_line(fil2,dat);
                     dat := utility.put_field(1,c_pay.programme,dat,'~');     
               client_text_io.put_line(fil2,dat);
                     bvspro := c_pay.programme;
               dat := utility.put_field(1,c_pay.subsidy,dat,'~');
               client_text_io.put_line(fil2,dat);
               dat := merge_header3;
                     client_text_io.put_line(fil2,dat);
                     bvspro := c_pay.programme;
                     ssch := c_pay.subsidy;
                     bvspro_total := 0;
                     ssch_total := 0;
                     cnt :=0;
             end if;                           
               if ssch <> c_pay.subsidy then
                     dat := lpad('~',16,'~');
                     dat := utility.put_field(5,ssch_total,dat,'~');
                     dat := lpad('~',16,'~');
               client_text_io.put_line(fil2,dat);
               dat := utility.put_field(1,c_pay.subsidy,dat,'~');
               client_text_io.put_line(fil2,dat);
               dat := merge_header3;
                     client_text_io.put_line(fil2,dat);
                     ssch := c_pay.subsidy;
                     ssch_total := 0;
                     cnt :=0;
             end if;                           
            bvspro_total := bvspro_total + c_pay.amount;
            ssch_total   := ssch_total   + c_pay.amount;              
                  grand_total  := grand_total  + c_pay.amount;              
            cnt := cnt +1;
    --message('bfore write file 2 ' );              
            client_text_io.put_line(fil2
                                   ,cnt
                            ||'~'|| c_pay.beneficiary_name
                                                                ||'~'||c_pay.BENEFICIARY_ACCOUNT_NUMBER ||''            
                                                                ||'~'||c_pay.BRANCH_CODE             ||''           
                                                                ||'~'|| c_pay.BENEFICIARY_STATEMENT_DESC            
                                                                ||'~'|| c_pay.AMOUNT                                
                            ||'~'|| c_pay.address_line1
                            ||'~'|| c_pay.address_line2
                                                    ||'~'|| c_pay.postal_code
                                                    ||'~'|| TO_CHAR(c_pay.deposit_date,'DD-Mon-YYYY')
                                                    ||'~'|| c_pay.month
                                                    ||'~'|| c_pay.bank
                                                    ||'~'|| c_pay.bank_branch
                                                    ||'~'|| c_pay.account_type
                                                    ||'~'|| c_pay.subsidy
                                                    ||'~'|| c_pay.programme)
                  DATA :=                                  c_pay.FROM_ACCOUNT_NUMBER                   
                                                                ||'~'||c_pay.FROM_ACCOUNT_DESCR                    
                                                                ||'~'||c_pay.MY_STATEMENT_DESCR                    
                                                                ||'~'||c_pay.BENEFICIARY_ACCOUNT_NUMBER
                                                                ||'~'
                                                                ||'~'||c_pay.BRANCH_CODE            
                                                                ||'~'||c_pay.BENEFICIARY_NAME                      
                                                                ||'~'||c_pay.BENEFICIARY_STATEMENT_DESC            
                                                                ||'~'||c_pay.AMOUNT;                                
            DATA := REPLACE(DATA, ',' , ' ' );
            DATA := REPLACE(DATA, '~' , ',' );
    --message (cnt ||' ' || data);       
    --message('bfore write file 1 ' );              
                  client_text_io.put_line(fil1, data);
             end loop;
    --message ('end of write');         
                 dat := lpad('~',16,'~');
                 dat := utility.put_field(6,ssch_total,dat,'~');
                 dat := lpad('~',16,'~');
           dat := utility.put_field(1,'Total:' || bvspro,dat,'~');
                 dat := utility.put_field(5,bvspro_total,dat,'~');
              client_text_io.put_line(fil2,dat);
              dat := lpad('~',16,'~');
           client_text_io.put_line(fil2,dat);
           dat := utility.put_field(1,'Grand Total:' ,dat,'~');
                 dat := utility.put_field(5,grand_total,dat,'~');
              client_text_io.put_line(fil2,dat);
             -- close file
    for i in 1..50 loop  
           if substr(i,-1) = 0 then
                 message ('flush ' || i);
           end if;                 
                  client_text_io.put_line(fil1, lpad(' ',2000));
                  client_text_io.put_line(fil2, lpad(' ',2000));
                  client_text_io.put_line(fil1, lpad(' ',2000));
                  client_text_io.put_line(fil2, lpad(' ',2000));
    end loop;
             client_text_io.fclose(fil1);
             client_text_io.fclose(fil2);
        end loop;
       set_application_property(cursor_style,'default');
        exception
             when others then
                  message(sqlcode ||' ' ||sqlerrm);
       end download_file;    i try this but this code onlydownload image not data from database tables
        public void downloadImage(FacesContext facesContext, OutputStream outputStream)
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
            // get an ADF attributevalue from the ADF page definitions
            AttributeBinding attr = (AttributeBinding) bindings.getControlBinding("DocumentImage");
            if (attr == null)
                return;
            // the value is a BlobDomain data type
            BlobDomain blob = (BlobDomain) attr.getInputValue();
            try
            {   // copy the data from the BlobDomain to the output stream
                IOUtils.copy(blob.getInputStream(), outputStream);
                // cloase the blob to release the recources
                blob.closeInputStream();
                // flush the output stream
                outputStream.flush();
            catch (IOException e)
                // handle errors
                e.printStackTrace();
                FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), "");
                FacesContext.getCurrentInstance().addMessage(null, msg);
            }

    You should ask your forum in the ADF-forum.

  • Logging into app using credentials from database table and not APEX default

    Hi,
    I am new to this forum and also APEX, I have had a play around with APEX and liked what i have seen.
    I am currently trying to change the log in process on one of my applications from the APEX default of Application login to a get the credentials from a table within my database schema,
    Could anyone please point me in the right direction to find out how to do this please. either tutorials or guides would be good. or even better if u can talk me through it that would be great :)
    Many thanks
    J

    I guess I am confused.. Do you want the users information to come from a table you develop where they would have to enter in a login id & password, or as your question seemed to ask, you don't want ANY login form, just a table that will determine who they are when they login?
    I guess I jumped the gun.. If you want to have a custom authentication (One based upon your table) see this link: http://djmein.blogspot.com/2007/07/custom-authentication-authorisation.html
    Thank you,
    Tony Miller
    Webster, TX

  • Drop Down list in table with data from database table

    Hi,
    I have created an interactive form in WD ABAP.
    In Context tab I have created the nodes as follows:
    ZSOHEADER node with cardinality 1..1
    |-> MATERIAL node with cardinality 0..n. Under MATERIAL node there are 2 attrib. MAKTX and MATNR.
    I am fetching data from MARA table into an internal table IT_MARA.
    The node MATERIAL is bound to internal table IT_MARA.
    I have created a table with property ' Body rows vary depending on data ' .
    I have only one row in table. The first cell of the row is a drop down field.
    I have bind the field to the node MATERIAL->DATA->MAKTX.
    Now the issue is even though I have created only one row in my table, in preview it is creating as many rows in the table as the no.of records in the internal table.
    I want only one row with the drop down list containing all values of the internal table.
    Kindly suggest what to do.
    Regards,
    Vinod

    Hi,
    In the WebDynpro Context, in the main node create another node like A1 with cardinality 0..n and in this node create attributes TEXT and VALUE.
    Now goto method and in that method using code wizard read the node A1.
    And use the below code snippet sample in your program, i.e. code this under respective method of the webdynpro.
    *Declare the TYPES
    TYPES : BEGIN OF TY_TABLE,
    TEXT TYPE SOMETYPE,
    VALUE TYPE SOMETYPE,
    END OF TY_UOM.
    *Define Internal Table and work area.
    DATA : IT_TABLE TYPE STANDARD TABLE OF TY_TABLE INITIAL SIZE 0,
    WA_TABLE TYPE TY_TABLE.
    SELECT TEXT VALUE FROM TABLENAME INTO TABLE IT_TABLE.
    lr_node_info->bind_table( IT_TABLE ).
    And in the Adobe Form Layout
    Go to Menu of the Adobe LiveCycle Designer:
    Tools>Options..>DataBinding
    In that window you just check the Show Dynamic properties Check Box.
    Now for the Drop Down go the binding tab in object palette and click on the list items and there specify the Internal Table and specify the text as the internal table text field and value as internal table value field.
    OR
    From the WebDynpro Native Library Palette use the Value Help Drop Down and in object pallette goto binding tab and provide the form interface binding. Before this in the WebDynpro goto Context and for the particular field under the properties provide the search help as dictionary search help and specify the name of the dictionary search help.
    OR
    We have another method of setting the Text and Value to the DDL directly in the WebDynpro by coding in the methods, I dont have much knowledge on this.
    Regards
    Pradeep Goli

  • Insert direct column from database table and function value into a table

    Hi All,
    Please resolve this query for me....
    Suppose my select query is like this
    Select empno from EMP; (simple select)
    Select fun_dept(empno) from dual;(function)
    i want both the output of the select query to be written into a table like this....
    Suppose out of the First Select query is ..... 45009
    Output for the Second Query is...................ECE
    i want to insert this output into a table...like
    something like this
    XX:
    Empno Dept
    45009 ECE
    how to do this..??
    Thanks in Advance,
    Regards,
    Gita

    My exact query is like this.
    create or replace function fun_sal(v_rno number,v_year number,v_period number)
    return number as
    cursor s is
    select salary from emp where eno=v_rno and eyear=v_year and eperiod=v_period;
    begin
    open s;
    loop
    exit when s%notfound;
    fetch s into v_sal;
    if v_sal<1000 then
    sal:=v_sal*1555;
    else
    sal:=0;
    return sal;
    end if;
    end loop;
    close s;
    end;
    create or replace procedure pro_act(v_rno number,v_year number,v_period number) as
    v_eno number(10);
    v_ename varchar2(10);
    cursor c is
    select eno,ename from emp where eno=v_rno and eyear=v_year and eperiod=v_period;
    begin
    open c;
    loop
    exit when c%notfound;
    fetch c into v_eno,v_ename;
    insert into master(empno,empname,rev_salary)values(v_eno,v_ename,"*****function fun_sal value has to come here*******");
    commit;
    end loop;
    close c;
    end;
    how to do....

  • Fill pdf form from database table

    I am working on small application for my employer. We have record fo all new employee in table and want to fill PDF (I-9) from database using APEX application.
    Below PDF form, we want to fill from database table.
    http://www.uscis.gov/files/form/I-9.pdf
    I am not sure how to take from APEX. Any ideas?
    I know one way to export from database table and import to PDF form.
    Is there any other way?
    Thanks

    If I understand you correctly then I need to first export the xml file using Data-> Load sample XML data and later create template in template.rtf and upload data using APEX in template. In this case I need to create rtf template exactly similar to http://www.uscis.gov/files/form/I-9.pdf.
    I am not sure is there any way to to used existing pdf template or save pdf template to rtf template. Later that template can be used to populate data using APEX.

  • XSD from Database table/view/procedure

    Hi all,
    Does anyone know of a tool or framework which enables generation of XSD's out of a Database table/view/procedure?

    Hi Naval,
    It depends on whether you created a BOL model for your Z-table or not. If you don't have a BOL model, then all you can do is use a value node. In that case, you need to add attribute that you want to show in the value node, read the values from the z-table and add them to the node. You can create method(s) in view implementation class to read values from database table and fill the context node. From where these methods should then be called will depend on your requirement.
    Regards,
    Shiromani

  • Backing Up Database Table and Records in Oracle 10g

    Hi All,
    I created database for my company with Oracle 10g Database Server and want to backup all my database tables and records within (i.e creating another username inside the data and transfer them) and outside (i.e transfering them in another destination outside the database server) the database. Could you please instruct me on how to achieve?
    I look forward to hearing from you all.
    Thank you.
    Jc

    Hi, use RMAN utility
    do this
    rman target sys/*** nocatalog
    run {
      allocate channel t type disk;
      backup
        format '/app/oracle/backup/%d_t%t_s%s_p%p'
          (database);
       release channel t;
    {code
    Also read backup and recovery guide at http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/toc.htm
    regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • My iphone 5 fell down from the table and now I can't touch screen or do anything with it anymore. Please help me!!!

    My iphone 5 fell down from the table and now I can't touch screen or do anything with it anymore. I send it to Istudio in Thailand and they said it is non authorized so they will not fix for me. I search google and they said that my LCD has problem but people in here said the chip inside my phone have problem??? Please tell me what I need to do. And if I have to change the new, how can I know it is new or fake? Could you give me the price of it please? I'm not Thai people. I study in here so I dont know where to fix it. Please recommend me any truthly store in there if you know. Thank you so much!!!

    You will need to wait for Apple to rectify the issue. Do not make changes at your end.
    https://www.apple.com/support/systemstatus/

  • How to get multiple rows from database table?

    hello !
    I need to get multiple rows from a OLEDB database table and display them on a table object.
    I did "Wrap in subfrom" on the table,  set  subform of the table to "flowed", and checked "Repeat row for each data item" of Row1 of the table.
    But I can get only one row on the table object.
    I need your help.
    Thanks

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • Reconciilation from database table

    Hi I have to reconcile data from database table. I am using OIM 10g and Oracle 11g R2.
    I have created one GTC for Database Tables. And able to run th scheduled task for it.
    Table name: recondb
    there is one record present in table.but i saw on OIM server log it says no records.
    Not able to figure out what is the problem.
    log:
    DEBUG,07 Mar 2011 13:51:02,678,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize entered.
    DEBUG,07 Mar 2011 13:51:02,695,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize - Data: driver - Value: oracle.jdbc.driver.OracleDriver
    DEBUG,07 Mar 2011 13:51:02,696,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize - Data: url - Value: jdbc:oracle:thin:@10.88.176.155:1521:TRAININ
    DEBUG,07 Mar 2011 13:51:02,697,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize - Data: username - Value: oimuserpc
    DEBUG,07 Mar 2011 13:51:02,699,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize - Data: password - Value: *******
    DEBUG,07 Mar 2011 13:51:02,700,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize - Data: customizedQueries - Value:
    DEBUG,07 Mar 2011 13:51:02,702,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize - Data: useNativeQuery - Value: false
    DEBUG,07 Mar 2011 13:51:02,704,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize - Data: parentContainerName - Value: recondb
    DEBUG,07 Mar 2011 13:51:02,705,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/convertCSVToArraylist entered.
    DEBUG,07 Mar 2011 13:51:02,707,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/convertCSVToArraylist: providerParams:
    DEBUG,07 Mar 2011 13:51:02,709,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/convertCSVToArraylist left.
    DEBUG,07 Mar 2011 13:51:02,712,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize - Data: childContainerTableNames - Value: []
    DEBUG,07 Mar 2011 13:51:02,713,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize - Data: parentContainerUniqueKey - Value: userid
    DEBUG,07 Mar 2011 13:51:02,715,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize - Data: incrementalReconAttribute - Value:
    DEBUG,07 Mar 2011 13:51:02,756,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize - Data: dbDateFormat - Value: yyyy/MM/dd hh:mm:ss z
    DEBUG,07 Mar 2011 13:51:02,756,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/initialize left.
    DEBUG,07 Mar 2011 13:51:02,769,[OIMCP.DATC],Class/Method: DBFacade/getConnectio
    Prop entered.
    DEBUG,07 Mar 2011 13:51:02,837,[OIMCP.DATC],Class/Method: DBFacade/getClumns -
    ata: Columns: - Value: [com.thortech.xl.gc.impl.common.Column@1a15f06, com.tho
    tech.xl.gc.impl.common.Column@1658cfb, com.thortech.xl.gc.impl.common.Column@ad
    5b, com.thortech.xl.gc.impl.common.Column@1c0c692, com.thortech.xl.gc.impl.comm
    n.Column@12cc218, com.thortech.xl.gc.impl.common.Column@17ae572, com.thortech.x
    .gc.impl.common.Column@16db297, com.thortech.xl.gc.impl.common.Column@e7ebba]
    DEBUG,07 Mar 2011 13:51:02,849,[OIMCP.DATC],Class/Method: DBFacade/getPrimaryKe
    s - Data: Primary Keys - Value: []
    DEBUG,07 Mar 2011 13:51:02,850,[OIMCP.DATC],Class/Method: DBFacade/getSchema -
    ata: Parent Unique Key: - Value: [USERID]
    DEBUG,07 Mar 2011 13:51:02,851,[OIMCP.DATC],Class/Method: DBReconTransportProvi
    er/getFirstPage - Data: Filter Query - Value:
    DEBUG,07 Mar 2011 13:51:02,861,[OIMCP.DATC],Class/Method: DBFacade/getRecord -
    ata: SQL - Value: select * from oimuserpc.recondb
    DEBUG,07 Mar 2011 13:51:02,881,[OIMCP.DATC],Class/Method: DBFacade/getRecord -
    ata: startpage - Value: -1
    DEBUG,07 Mar 2011 13:51:02,882,[OIMCP.DATC],Class/Method: DBFacade/getRecord -
    ata: endpage - Value: -1
    DEBUG,07 Mar 2011 13:51:02,883,[OIMCP.DATC],Class/Method: DBFacade/getRecord -
    ata: Number of records - Value: 0

    I got Null Pointer Exception after User Password. I have checked mapping of Pasword field its correct.
    Here is log:
    DEBUG,08 Mar 2011 10:20:03,097,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize entered.
    DEBUG,08 Mar 2011 10:20:03,103,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize - Data: driver - Value: oracle.jdbc.driver.OracleDriver
    DEBUG,08 Mar 2011 10:20:03,103,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize - Data: url - Value: jdbc:oracle:thin:@10.88.176.155:1521:TRAINING
    DEBUG,08 Mar 2011 10:20:03,104,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize - Data: username - Value: oimuserpc
    DEBUG,08 Mar 2011 10:20:03,106,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize - Data: password - Value: *******
    DEBUG,08 Mar 2011 10:20:03,107,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize - Data: customizedQueries - Value:
    DEBUG,08 Mar 2011 10:20:03,109,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize - Data: useNativeQuery - Value: false
    DEBUG,08 Mar 2011 10:20:03,109,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize - Data: parentContainerName - Value: recondb
    DEBUG,08 Mar 2011 10:20:03,110,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/convertCSVToArraylist entered.
    DEBUG,08 Mar 2011 10:20:03,111,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/convertCSVToArraylist: providerParams:
    DEBUG,08 Mar 2011 10:20:03,112,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/convertCSVToArraylist left.
    DEBUG,08 Mar 2011 10:20:03,114,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize - Data: childContainerTableNames - Value: []
    DEBUG,08 Mar 2011 10:20:03,115,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize - Data: parentContainerUniqueKey - Value: userid
    DEBUG,08 Mar 2011 10:20:03,116,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize - Data: incrementalReconAttribute - Value:
    DEBUG,08 Mar 2011 10:20:03,154,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize - Data: dbDateFormat - Value: yyyy/MM/dd hh:mm:ss z
    DEBUG,08 Mar 2011 10:20:03,154,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/initialize left.
    DEBUG,08 Mar 2011 10:20:03,164,[OIMCP.DATC],Class/Method: DBFacade/getConnection
    Prop entered.
    DEBUG,08 Mar 2011 10:20:03,425,[OIMCP.DATC],Class/Method: DBFacade/getClumns - D
    ata: Columns: - Value: [com.thortech.xl.gc.impl.common.Column@126232b, com.thor
    tech.xl.gc.impl.common.Column@cef542, com.thortech.xl.gc.impl.common.Column@147e
    045, com.thortech.xl.gc.impl.common.Column@1d4d4b8, com.thortech.xl.gc.impl.comm
    on.Column@1d99597, com.thortech.xl.gc.impl.common.Column@1ebf294, com.thortech.x
    l.gc.impl.common.Column@1831114, com.thortech.xl.gc.impl.common.Column@1d67244]
    DEBUG,08 Mar 2011 10:20:03,460,[OIMCP.DATC],Class/Method: DBFacade/getPrimaryKey
    s - Data: Primary Keys - Value: []
    DEBUG,08 Mar 2011 10:20:03,461,[OIMCP.DATC],Class/Method: DBFacade/getSchema - D
    ata: Parent Unique Key: - Value: [USERID]
    DEBUG,08 Mar 2011 10:20:03,463,[OIMCP.DATC],Class/Method: DBReconTransportProvid
    er/getFirstPage - Data: Filter Query - Value:
    DEBUG,08 Mar 2011 10:20:03,473,[OIMCP.DATC],Class/Method: DBFacade/getRecord - D
    ata: SQL - Value: select * from oimuserpc.recondb
    DEBUG,08 Mar 2011 10:20:03,541,[OIMCP.DATC],Class/Method: DBFacade/getRecord - D
    ata: startpage - Value: -1
    DEBUG,08 Mar 2011 10:20:03,542,[OIMCP.DATC],Class/Method: DBFacade/getRecord - D
    ata: endpage - Value: -1
    DEBUG,08 Mar 2011 10:20:03,543,[OIMCP.DATC],Class/Method: DBFacade/getRecord - D
    ata: Number of records - Value: 1
    DEBUG,08 Mar 2011 10:20:03,721,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName entered.
    DEBUG,08 Mar 2011 10:20:03,722,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: attr src - Value: User Profile Data
    DEBUG,08 Mar 2011 10:20:03,723,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: display name - Value: Email
    DEBUG,08 Mar 2011 10:20:03,724,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName left.
    DEBUG,08 Mar 2011 10:20:03,730,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName entered.
    DEBUG,08 Mar 2011 10:20:03,730,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: attr src - Value: User Profile Data
    DEBUG,08 Mar 2011 10:20:03,732,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: display name - Value: First Name
    DEBUG,08 Mar 2011 10:20:03,733,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName left.
    DEBUG,08 Mar 2011 10:20:03,737,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName entered.
    DEBUG,08 Mar 2011 10:20:03,738,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: attr src - Value: User Profile Data
    DEBUG,08 Mar 2011 10:20:03,740,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: display name - Value: User Login
    DEBUG,08 Mar 2011 10:20:03,741,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName left.
    DEBUG,08 Mar 2011 10:20:03,745,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName entered.
    DEBUG,08 Mar 2011 10:20:03,745,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: attr src - Value: User Profile Data
    DEBUG,08 Mar 2011 10:20:03,746,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: display name - Value: Xellerate Type
    DEBUG,08 Mar 2011 10:20:03,747,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName left.
    DEBUG,08 Mar 2011 10:20:03,751,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName entered.
    DEBUG,08 Mar 2011 10:20:03,751,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: attr src - Value: User Profile Data
    DEBUG,08 Mar 2011 10:20:03,753,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: display name - Value: Role
    DEBUG,08 Mar 2011 10:20:03,754,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName left.
    DEBUG,08 Mar 2011 10:20:03,758,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName entered.
    DEBUG,08 Mar 2011 10:20:03,759,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: attr src - Value: User Profile Data
    DEBUG,08 Mar 2011 10:20:03,760,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: display name - Value: Organization Name
    DEBUG,08 Mar 2011 10:20:03,761,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName left.
    DEBUG,08 Mar 2011 10:20:03,765,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName entered.
    DEBUG,08 Mar 2011 10:20:03,765,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: attr src - Value: User Profile Data
    DEBUG,08 Mar 2011 10:20:03,766,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName - Data: display name - Value: User Password
    DEBUG,08 Mar 2011 10:20:03,767,[XELLERATE.JAVACLIENT],Class/Method: tcAttributeS
    ource/getAttrColumnName left.
    ERROR,08 Mar 2011 10:20:03,770,[XELLERATE.APIS],Class/Method: tcReconciliationOp
    erationsBean/ignoreEventData encounter some problems: {1}
    java.lang.NullPointerException
    at com.thortech.xl.dataobj.util.tcAttributeSource.getAttrColumnName(Unkn
    own Source)
    at com.thortech.xl.dataobj.util.tcReconciliationUtil.getRuleElementWhere
    (Unknown Source)
    at com.thortech.xl.dataobj.util.tcReconciliationUtil.getRuleWhere(Unknow
    n Source)
    at com.thortech.xl.dataobj.util.tcReconciliationUtil.getMatchedUserList(
    Unknown Source)
    at com.thortech.xl.dataobj.util.tcReconciliationUtil.getMatchedUserList(
    Unknown Source)
    at com.thortech.xl.dataobj.util.tcReconciliationUtil.ignoreEvent(Unknown
    Source)
    at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEv
    entData(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEv
    ent(Unknown Source)
    at com.thortech.xl.ejb.beans.tcReconciliationOperationsSession.ignoreEve
    nt(Unknown Source)
    at com.thortech.xl.ejb.beans.tcReconciliationOperations_gmh3ba_EOImpl.ig
    noreEvent(tcReconciliationOperations_gmh3ba_EOImpl.java:546)
    at Thor.API.Operations.tcReconciliationOperationsClient.ignoreEvent(Unkn
    own Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Sou
    rce)
    at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
    at $Proxy69.ignoreEvent(Unknown Source)
    at com.thortech.xl.gc.runtime.GCScheduleTask.execute(Unknown Source)
    at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionActi
    on.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Sou
    rce)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown S
    ource)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
    ava:477)
    ERROR,08 Mar 2011 10:20:03,808,[XELLERATE.GC.FRAMEWORKRECONCILIATION],Reconcilia
    tion Encountered error:
    Thor.API.Exceptions.tcAPIException: java.lang.NullPointerException
    at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEv
    entData(Unknown Source)
    at com.thortech.xl.ejb.beansimpl.tcReconciliationOperationsBean.ignoreEv
    ent(Unknown Source)
    at com.thortech.xl.ejb.beans.tcReconciliationOperationsSession.ignoreEve
    nt(Unknown Source)
    at com.thortech.xl.ejb.beans.tcReconciliationOperations_gmh3ba_EOImpl.ig
    noreEvent(tcReconciliationOperations_gmh3ba_EOImpl.java:546)
    at Thor.API.Operations.tcReconciliationOperationsClient.ignoreEvent(Unkn
    own Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Sou
    rce)
    at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
    at $Proxy69.ignoreEvent(Unknown Source)
    at com.thortech.xl.gc.runtime.GCScheduleTask.execute(Unknown Source)
    at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionActi
    on.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Sou
    rce)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown S
    ource)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.j
    ava:477)
    WARN,08 Mar 2011 10:20:03,813,[XELLERATE.GC.FRAMEWORKRECONCILIATION],Though Rec
    onciliation Scheduled task has encountered an error, Reconciliation Transport pr
    oviders have been "ended" smoothly. Any provider operation that occurs during th
    at "end" or "clean-up" phase would have been executed e.g. Data archival. In cas
    e you want that data to be a part of next Reconciliation execution, restore it f
    rom Staging. Provider logs must be containing details about storage entities tha
    t would have been archived

  • Import data from few tables and export into the same tables on different db

    I want to import data from few tables and export into the same tables on different database. But on the target database, additional columns have been added
    to the same tables. how can i do the import?
    Its urgent can anyone please help me do this?
    Thanks.

    Hello Junior DBA,
    maybe try it with the "copy command".
    http://download.oracle.com/docs/cd/B14117_01/server.101/b12170/apb.htm
    Have a look at the section "Understanding COPY Command Syntax".
    Here is an example of a COPY command that copies only two columns from the source table, and copies only those rows in which the value of DEPARTMENT_ID is 30:Regards
    Stefan

  • Retrive last inserted  record  from database table

    Hi,
    some body inserting a record into table 'A' through some procedure/java program.i want to retrive the last inserted record from database table.records are not stored in order.Can any body help me.

    In general, unless you are storing a timestamp as part of the row or you have some sort of auditing in place, Oracle has no idea what the "first" or "last" record in a table is. Nor does it track when a row was inserted.
    - If you have the archived logs from the point in time when the row was inserted, you could use LogMiner to find the timestamp
    - If the insert happened recently (i.e. within hours), you may be able to use flashback query to get the value
    - If you're on 10g or later and the table was built with ROWDEPENDENCIES and the insert happened in the last few days and you can deal with a granularity of a few seconds and you don't need 100% accuracy, you could get the ORA_ROWSCN of the row and convert that to a timestamp.
    If this is something you contemplate needing, you need to store the data in the row or set up some sort of auditing.
    Justin

  • How to delete a row from database table in facade client

    Hi all,
    I followed the tutorial in creating a persistence entity from database table, then a session facade. Then I followed the tutorial to create a sample client to test the model. In the session facade, I could use persistEntity method to insert a record to the database. I am just thinking of an extension to the tutorial, i.e., being able to delete the record too. So I created a new method removeEntity in the session facade
    public void removeEntity(Object entity) {
    entity=em.merge(entity);
    em.remove(entity);
    em.flush();
    and called it in the sample client. It was executed without any error, but the record in the table still exists.
    I tried to look around for a solution, but I did not find one. Would anybody here please help out? Many thanks in advance!

    Hi Frank,
    I tried the code snippet, but I got the following exception when executing this code:
    javax.ejb.EJBException: EJB Exception: ; nested exception is:
         java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.; nested exception is: java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.
    java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.
         at weblogic.deployment.BasePersistenceContextProxyImpl.validateInvocation(BasePersistenceContextProxyImpl.java:121)
         at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:86)
         at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:91)
         at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:80)
         at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:26)
         at $Proxy141.getTransaction(Unknown Source)
         at model.SessionEJBBean.removeEntity(SessionEJBBean.java:60)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
         at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:55)
         at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy143.removeEntity(Unknown Source)
         at model.SessionEJB_qxt9um_SessionEJBImpl.removeEntity(SessionEJB_qxt9um_SessionEJBImpl.java:142)
         at model.SessionEJB_qxt9um_SessionEJBImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    javax.ejb.EJBException: EJB Exception: ; nested exception is:
         java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.; nested exception is: java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:109)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
         at $Proxy0.removeEntity(Unknown Source)
         at model.SessionEJBClient.main(SessionEJBClient.java:71)
    Caused by: java.lang.IllegalStateException: The method public abstract javax.persistence.EntityTransaction javax.persistence.EntityManager.getTransaction() cannot be invoked in the context of a JTA EntityManager.
         at weblogic.deployment.BasePersistenceContextProxyImpl.validateInvocation(BasePersistenceContextProxyImpl.java:121)
         at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:86)
         at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:91)
         at weblogic.deployment.BasePersistenceContextProxyImpl.invoke(BasePersistenceContextProxyImpl.java:80)
         at weblogic.deployment.TransactionalEntityManagerProxyImpl.invoke(TransactionalEntityManagerProxyImpl.java:26)
         at $Proxy141.getTransaction(Unknown Source)
         at model.SessionEJBBean.removeEntity(SessionEJBBean.java:60)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
         at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:55)
         at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
         at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
         at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
         at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy143.removeEntity(Unknown Source)
         at model.SessionEJB_qxt9um_SessionEJBImpl.removeEntity(SessionEJB_qxt9um_SessionEJBImpl.java:142)
         at model.SessionEJB_qxt9um_SessionEJBImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Process exited with exit code 0.

  • Dynamic record deletion from database table

    Hi,
    I need to delete selected records from database table(dynamic names). Table names are being passed from main program with some of their field names. The record to be deleted from the database table is being decided based on the fields passed for the table and their contains passed from the main program.
    It is not possible to write dynamic where clause for DELETE statement directly.
    So, I created a dynamic internal table and i am trying to fetch all records using SELECT statement(for which we can write dynamic where condition, something like...SELECT...WHERE (itab).  ) which need to be deleted in the iternal table.
    Piece of code :
              CONCATENATE c_im v_tablefield1 INTO v_imprtfield1.
              CONCATENATE v_tablefield1 c_in v_imprtfield1
                       into s_condition separated by space.
              APPEND s_condition TO t_condition.
              PERFORM GET_DYNAMIC_ITAB USING s_flds_agtab-tabname
                                    changing t_itab.
              ASSIGN t_itab->* TO <itab>.
    *Select the data (to be deleted) from the database table
               SELECT * FROM (s_flds_agtab-tabname) INTO TABLE <itab>
                 WHERE (t_condition).
    *Delete the records from the table
               IF SY-SUBRC = 0.
                 DELETE (s_flds_agtab-tabname) FROM TABLE <itab>.
               ENDIF.
    Here t_condition is of standard table of WHERETXT.
    t_condition at the run time before giving dump was:
    SPART IN IM_SPART
    AND KUNNR IN IM_KUNNR
    Here IM_SPART is renge type of SPART and IM_KUNNR is renge of KUNNR.
    I am getting a DUMP:
    The WHERE condition has an unexpected format.
    Error analysis                                                                               
    The current ABAP/4 program attempted to execute an ABAP/4 Open SQL
    statement containing a WHERE condition of the form WHERE (itab) or
    WHERE ... AND (itab). The part of the WHERE condition specified at
    runtime in the internal table itab contains the operator         
             IN (v1, ..., vn)                                        
    in incomplete form.                                              
    How to correct the error
    If the error occurred in a non-modified SAP program, you may be  
    able to find a solution in the SAP note system.                  
    If you have access to the note system yourself, use the following
    search criteria:                                                 
    "SAPSQL_IN_ILLEGAL_LIST"                               
    "SAPLZSD_TAB_REFRESH " or "LZSD_TAB_REFRESHU01 "       
    "Z_SD_REFRESH_AGTABLES"                                
    If you cannot solve the problem yourself, please send the
    following documents to SAP:                             
    I would like to know whether "IN" operator is allowed in (itab) of WHERE clause. While testing I changed the "IN" to "=" specifying a suitable value there. It worked. So please let me know if i can give "IN" operator using renge table in the dynamic where clause.
    Thanking you,
    Surya

    Hi again,  so if you can not use the IN in a dynamic where clause you might be forced to dynamically build the entire select statement,  Here is a sample program which may give you some ideas, notice that we are writing the select statement code, putting it in another program and generating the subroutine at runtime, then call this routine.  I'm sure that this will help you see what you need to do.
    report zrich_0003 .
    tables: kna1.
    types: t_source(72).
    data: routine(32) value 'DYNAMIC_SELECT',
                 program(8),
                 message(128),
                 line type i.
    data: isource type table of t_source,
                xsource type t_source.
    ranges:
            r_kunnr for kna1-kunnr.
    data: ikna1 type table of kna1.
    data: xkna1 type kna1.
    r_kunnr-sign = 'I'.
    r_kunnr-option = 'EQ'.
    r_kunnr-low    = '0001000500'.
    append r_kunnr.
    xsource = 'REPORT ZTEMP.'.
    insert xsource  into isource index 1.
    xsource = 'FORM dynamic_select'.
    insert xsource  into isource index 2.
    xsource = 'Tables r_kunnr ikna1.'.
    append xsource to isource.
    xsource = 'select * into table ikna1 from kna1'.
    append xsource to isource.
    xsource = 'where kunnr in r_kunnr.'.
    append xsource to isource.
    xsource = 'ENDFORM.'.
    append xsource to isource.
    generate subroutine pool isource name program
                             message message
                             line line.
    if sy-subrc = 0.
      perform (routine) in program (program) tables r_kunnr
                                                    ikna1.
    else.
      write:/ message.
    endif.
    loop at ikna1 into xkna1.
      write:/ xkna1-kunnr.
    endloop.
    Regards,
    Rich Heilman

Maybe you are looking for

  • HELP!  QT Icon bounces once, then nothing

    When I click on my QT icon in the task bar, it bounces once and then nothing happens. QT fails to load. Anyone ever experience this and what the **** can I do to fix it? Thanks! Allen

  • Noob needs help with pictures

    higuys i dont really know anything about photoshop but what im looking for is a guide to layer 2 pictures over each other..the first picture is of a car and the second is of an alloy wheel,what i want is to be able to move the picture of the alloy on

  • A script which should show a PPT or a web page in Contract document

    Hi Experts, I have requirement to write/add  the script where a user click in the contract Documents (in MA) .it should display like PPT or web page Ref :(Near Draft option) Any Help will be apprecited . Many Thanks Iqbal

  • How create and work with Z output to meet the client requirment?

    hi  gurus, I am SD functional consultant and need ur help Please explain me how create and work with Z output . How we arrange and change the fields in header and footer where and how we do changes in Layouts setting and SAP scripts to meet the user

  • Auto-Start Resumable Session upon TTA restart

    We use TTA on our administrative servers and we were wondering if there was a way to start a resumable application session we defined in the object manager upon restarting the Tarantella server. Basically we have a monitoring utility that our admins