Default value from Oracle database not working

Hi Everyone:
We use JHeadstart 10.1.3.1.
I have an Oracle table that has 2 fields that are both mandatory and have default values. We have been spending a lot of time putting this type of business logic in the database so that these checks do not have to happen in the JHeadstart Application.
The mandatory field is being brought into our Entity Object (as the mandatory checkbox is checked), but the default values do not seem to be getting pulled from the database. Even though the default value is defined at the database level, when trying to insert a new row into the table, a value must be filled in by the User running the application, otherwise an Oracle error is received that it is a mandatory field and must have a value. This happens when I am running the ApplicationModule by right-clicking it and clicking on "Test" as well as when running the Application
Does JDeveloper not pull default values from the database? Is there something I am missing?
Just for clarity, we have developed a re-usable library of entity objects that imports all of our Business Components similar to the following link
http://download-uk.oracle.com/docs/cd/B32110_01/web.1013/b25947/bcadvgen007.htm#CHEFECGD This is working well, but want to mention it here in case it is a consideration.
Thanks in advance.
Mary
U of W

Steven:
Thanks so much for taking the time to reply. Good to hear from you. Hope you are keeping warm in the Netherlands!
During synchronization or initial creation of the Business Components from the Oracle tables, JDeveloper brings over the mandatory attribute as defined in the database.
Would it be possible, in a future release, to also bring over the default values found in the database and assign them to the "Default" property in the Entity Objects Editor?
I always like to follow the best practice of defining something in one spot to make maintenance as easy as possible and avoid manual steps.
Thanks very much for your time.
Mary B
U of Windsor

Similar Messages

  • Empty CLOB field value from Oracle database using JDBC Sender

    Hi All,
    I am selecting a CLOB field from Oracle database table using JDBC Sender adapter and getting error "NullPointerException"
    Seen SAP note 1283089 but its not applicable for my support pack PI 7.0 SP 12 and client dont want to upgrdate SP 17 right now.
    I tried rpad(1,0)Column_Name funciton in JDBC select query but it selcting blank value for every record even those having some value for this CLOB field so not useful
    Could anybody suggest possible way? client dont want to change anything at database side.
    Thanks,
    Dharamveer

    What is the Oracle driver version installed? You might need to install 10.x driver if not already using it.

  • Custom DB authentication to an application from Oracle Portal not working.

    Hi All,
    We have a Portal customized and integrated to LDAP for SSO.
    From the portal, we have a link that takes to another custom application that requires another level of authentication. We have implemented this authentication as custom Database based authentication.
    When user login to the portal and access this link, he will be directed for authentication again. This custom application has been installed on a different OC4J instance while Oracle Portal is running in a different OC4J instance.
    Issue is though user details are being propagated to the custom application page, we are receiving an error saying authentication failed.
    In the OC4J instance specific for this custom application, we have configured jazn.xml to use custom authentication.
    Below is the code:
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>
    <!DOCTYPE jazn PUBLIC "JAZN Config" "http://xmlns.oracle.com/ias/dtds/jazn-9_04.dtd">
    <jazn provider="XML" location="./jazn-data.xml" default-realm="jazn.com">
    <property name="role.mapping.dynamic" value="true"/>
    <property name="custom.loginmodule.provider" value="true"/>
    </jazn>
    and in jazn-data.xml, we gave the role mapping.
    But the problem is when the link to the custom application is accessed, it seems like the custom autentication mechanism is not working.
    Can anyone throw light on this?
    Do we need to give the same configuration in the j2ee/home/config directory files also?
    Can we use both LDAP and custom DB authentication with in the same OAS setup. Remember as of now, Portal and custom application are running in different OC4J instances but within the same OAS.
    Any help in this regard will be highely appreciated.
    Thanks,
    Sasi Bhushan

    Hi All,
    We have a Portal customized and integrated to LDAP for SSO.
    From the portal, we have a link that takes to another custom application that requires another level of authentication. We have implemented this authentication as custom Database based authentication.
    When user login to the portal and access this link, he will be directed for authentication again. This custom application has been installed on a different OC4J instance while Oracle Portal is running in a different OC4J instance.
    Issue is though user details are being propagated to the custom application page, we are receiving an error saying authentication failed.
    In the OC4J instance specific for this custom application, we have configured jazn.xml to use custom authentication.
    Below is the code:
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>
    <!DOCTYPE jazn PUBLIC "JAZN Config" "http://xmlns.oracle.com/ias/dtds/jazn-9_04.dtd">
    <jazn provider="XML" location="./jazn-data.xml" default-realm="jazn.com">
    <property name="role.mapping.dynamic" value="true"/>
    <property name="custom.loginmodule.provider" value="true"/>
    </jazn>
    and in jazn-data.xml, we gave the role mapping.
    But the problem is when the link to the custom application is accessed, it seems like the custom autentication mechanism is not working.
    Can anyone throw light on this?
    Do we need to give the same configuration in the j2ee/home/config directory files also?
    Can we use both LDAP and custom DB authentication with in the same OAS setup. Remember as of now, Portal and custom application are running in different OC4J instances but within the same OAS.
    Any help in this regard will be highely appreciated.
    Thanks,
    Sasi Bhushan

  • Oracle Database not working

    Hi Gurus,
    I tried to start up the database by issuing the command on my Dev server
    c:\>sqlplus/nolog
    connect / as sysdba
    "startup,"
      and I  am getting  the following error:
    ORA-03113 end-of-file on communication channel
    And the second time I issued the command, I got the following errors:
    ORA-24324 service handle not initialized
    ORA-01041 internal error. hostdef extension doesn't exist.
    O.S IS WINDOWS 2003.
    ORACLE RDBMS Version: 10.2.0.2.0
    Pls advice.
    Thanks.

    Dump file c:\oracle\dev\102\rdbms\trace\dev_ora_3396.trc
    Wed Aug 04 20:12:35 2010
    ORACLE V10.2.0.2.0 - Production vsnsta=0
    vsnsql=14 vsnxtr=3
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    Process Id: 0x0000098c  Thread Id : 0x00000d44    Time : Wed Aug 04 20:12:35
    Excp. Code: 0xc0000005  Excp. Type: ACCESS_VIO    Flags: 0x00000000
    Registers -
    eip = 00b14c0f esp = 04bfd3a4 ebp = 04bfd405 edi = 04ac80a0 esi = 04bfd3e0
    eax = 00b14c08 ebx = 04c8bb8d ecx = 04bfd35d edx = 04bfd3d4
    ecs = 0000001b eds = 00000023 ees = 00000023 ess = 00000023
    egs = 00000000 efs = 0000003b
    eflags = 00010202
    End of Registers -
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Windows Server 2003 Version V5.2 Service Pack 1
    CPU                 : 4 - type 586, 2 Physical Cores
    Process Affinity    : 0x00000000
    Memory (Avail/Total): Ph:3169M/3743M, Ph+PgF:23279M/23643M, VA:1930M/2047M
    Instance name: dev
    Redo thread mounted by this instance: 0 <none>
    Oracle process number: 0
    Windows thread id: 3396, image: ORACLE.EXE (SHAD)
    2010-08-04 20:12:35.704
    ksedmp: internal or fatal error
    ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_kxfpmxdf+7] [PC:0xB14C0F] [ADDR:0xB14C08] [UNABLE_TO_WRITE] []
    Current SQL information unavailable - no SGA.
    Call Stack Trace -
    calling              call     entry                argument values in hex     
    location             type     point                (? means dubious value)    
    _kxfpmxdf+7                   00000000            
    A0608A23             CALL???  00000000            
    Binary Stack Dump -
    ========== FRAME [1] (_kxfpmxdf+7 -> 00000000) ==========
    Inaccessible memory range: 00000000 -> 00000400
    ========== FRAME [2] (A0608A23 -> 00000000) ==========
    Dump of memory from 0x04BFD405 to 0x04BFD505
    4BFD400          04BFD464 608A23C9 04AC80A0      [d....#.`....]
    4BFD410 03218A54 04C8004C 04C8BB8C 04ACAD60  [T.!.L.......`...]
    4BFD420 00000000 00000000 00000061 000000BB  [........a.......]
    4BFD430 00000001 04A19B50 04A19B80 00000000  [....P...........]
    4BFD440 00000000 04A19B80 04C68080 04C805C4  [................]
    4BFD450 04C8004C 03218A54 04ACAD60 031FF3F0  [L...T.!.`.......]
    4BFD460 04AC80B0 04BFD48C 608E68C1 04AC80A0  [.........h.`....]
    4BFD470 03218A54 04C8004C 04C805C4 00000000  [T.!.L...........]
    4BFD480 00194FE0 00194FE0 00000000 04BFDB64  [.O...O......d...]
    4BFD490 0044807A 04AC80A0 03218A54 04C8004C  [z.D.....T.!.L...]
    4BFD4A0 00000000 00000000 00000000 00000000  [................]
            Repeat 5 times
    4BFD500 00000000 00000000                    [........]       
    Argument/Register Address Dump -
    End of Call Stack Trace -
    ===================================================
    PROCESS STATE
    Process global information:
         process: 00000000, call: 00000000, xact: 00000000, curses: 00000000, usrses: 00000000
    No process is allocated.
    KSFD PGA DUMPS
    Number of completed I/O requests=0 flags=0
    END OF PROCESS STATE
    PINNED BUFFER HISTORY (oldest pin first)
    SGA is not mapped - only buffer DBAs will be dumped
    END OF PINNED BUFFER HISTORY
    No block in buffer pin history is suitable for redo dump.
    No cursors.
    Archival Runtime State -
    SGA unmapped
    End of Archival Runtime State -

  • Cfselect default value containing comma does not work

    I have a drop down list of Countries stored in a table as
    defined by UPS. These are used to calculate shipping charges.
    When a customer record is brought up and their country is
    "Ireland, Republic Of", the country displayed ends up being the
    first country in the list, which is Albania. Of course, when the
    user saves the record, they did not intentionally change the
    country, Albania is their new country. So I did not know there was
    a city of Dublin in Albania.
    Does the reporting of bugs feature on Adobe work? I posted
    this there a couple of weeks ago and did not hear anything.

    It just sort of seems to defeat the purpose of typedefs when you cannot use many of the property nodes.
    To me the purpose of typedefs is to make it easier to add / remove controls without having to replace all the clusters.
    On reading http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/1b04fd6a11e6f17286256c6300588bfa?OpenDocument
    carefully, the key point is
    "The only properties available for a strict type definition control are those that affect the appearance of the control such as Visible, Disabled, Key Focus, Blinking, Position, and Bounds."
    It is also annoying that the properties that are not available can still be used with no effect, without any compile error / warnings, runtime errors etc...
    So I modified the set VI by wirin
    g a property node to the strict type def reference. I used the control references propetry to get an array of references to the controls in the cluster. I then indexed the array to get to one of the boolean controls and set the value signaling property on the reference to the boolean button. This did generate an event.
    Dispite what it says above the value signaling property did update the values on the type def controls on the front panel without generating an event. I also tried the value property and that updated the value of the type def control.

  • Select * from tab is not working in oracle 10g

    select * from tab is not working in oracle 10g. But at the same time,
    select * from <<table>> is working.
    Please advise me.

    This works for me in 10.2.0.2
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select * from tab;
    TNAME                          TABTYPE            CLUSTERID
    LOAN_DETAIL                    TABLE
    PLAN_TABLE                     TABLE
    ...

  • How to dynamically get default value from a table column

    Hi all,
    Here's my problem: Our front end application sends insert and update queries to a pl/sql package. I've got a procedure that gets a PL/SQL table with all the column names an values, a table-name and a primary key name and value. That procedure creates an insert or update statement. So far, so good.
    Now the problem: our front end doesn't know what the default value for a column is. So when a number field doesn't get a value in the front-end, it's inserted with a value '0' though is should ben NULL. My sollution for this is to know the default value of a column: when there's a default of '0', then the value that will be inserted is '0'. When there's no default value and the column can ben NULL, it'll be inserted as NULL. if the column has a not null constraint, a '0' will be inserted.
    Ofcourse I can get the default value from the system-views all_tab_columns or user_tab_columns, but our application is installed at some 100 clients, and has various database installations. Most of the times, the tables are in the same schema as our procedure that performs the insert or update, but sometimes some of the tables are in another schema (in the same database) and also sometimes some tables are stored in another database. In all these situations, a synonym for that table exists in the schema.
    Is there a api function or procedure that I can call to get the default value of a column? I looked at dbms_sql and dbms_metadata, but those packages don't give me that perticular information. if not, I'll stuck with the 'does table exists in schema' yes->use table, no query user_synonyms to look for the owner of the table (and database link) and query all_tab_columns to get the default value. Only this seems a bit overkill to me.
    I hope I'm clear enough? And please don't reply with "don't do inserts this way"! I know, this is not the most optimal sollution, but it does gives us a couple of advantages in our application...

    there is no way that I can think of, apart from what you have already discovered (i.e. views), where you can determine if a column has a defuault value defined against it.
    The other option is triggers, but I guess doing that across 600 tables would not be an option, and besides I stay clear of triggers.
    A different approach therefore, if you cannot pre-determine the data, is to consider a post problem handler, hence I suggested the use of an exception handler.
    The exception handler works regardless of whether the statement is dynamic or not.
    SQL> truncate table abc;
    Table truncated.
    SQL>
    SQL> declare
      2    NULLVAL exception;
      3    pragma exception_init(NULLVAL, -01400);
      4 
      5  begin
      6 
      7    begin
      8 
      9      execute immediate 'insert into abc (y) values (1)';
    10 
    11      exception
    12        when NULLVAL then
    13          -- handle the error
    14          execute immediate 'insert into abc (x,y) values (0,1)';
    15 
    16    end;
    17 
    18    commit;
    19   
    20  end;
    21  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from abc;
             X          Y
             0          1

  • How  to access data in AS 400 from Oracle database

    Hi
    Could you please help me on accessing data in AS 400 from Oracle database? what are the main things to do? Any private documentation or any oracle metalink note please...

    Hi
    Please find the details given below....Any body can help me on this please....
    Issue Description: The stock status report to be developed at SATN has some information that is currently calculated and stored in the Fox/pro system. A real time ODBC needs to be done to the AS/400 system to retrieve values for the respective fields. This has never been tested before as it impacts many areas.
    The DBA team need to work to establish such a relationship and a report needs to be written in Oracle to have this tested on a real time basis. Mapping needs to be developed on the Oracle side to grab the correct fields

  • Error calling BLS from oracle database

    Hi Experts,
    We have a scenario in which we are calling BLS from oracle database using trigger. The call is made using the following URL:
    http://<Host name>:50000/XMII/Runner?Transaction=<TRX_Path>&Material=MATNR&Pallet_id=PALLET&Plant=PLANT&Proc_order=PROC&Prodline=PROD&Quantity=QTY&Start_Date=DAT&Start_Time=TIM&Status=STAT&UOM=UOM1&User_name=USER&OutputParameter=*
    This used to work fine in 11.5 but when we upgraded to 14.0 it is not working. We have maintained server details in \etc\host file.
    We were getting error in file 'Error 1 Text.txt'. "A possible Cross-Frame Scripting attack has been prevented. Please contact your system administrator or refer to" this was the last error message. We checked this on SCN and based on the search results we have implemented SAP note 1651004 wherein setting in netweaver is required to be changed. After note was implemented we are getting another error text ('Error 2 Text.txt') "This will happen if the browser running the page tha". We tried a few ways but could not capture the full message coming.
    Has anybody of faced similar problem? I would highly appreciate any hint which could help in solving this problem.
    System Information:
    NW 7.31 SP 10
    Oracle 11.2.0.4
    MII 14.0 SP5 patch 7
    Regards,
    Darshan

    Hi Christian/Anushree,
    I have now modified the URL by adding Illum login name and password:
    http://<Host name>:50000/XMII/Runner?Transaction=<TRX_Path>&Material=MATNR&Pallet_id=PALLET&Plant=PLANT&Proc_order=PROC&…
    When i run the url in browser it gives me the expected results but when i try to trigger it from Oracle i am still getting the error as below:
    "<script>
      var inPortalScript = false
      var webpath = "/logon_ui_resources/"
    </script>
    <html>
    <head>
    <BASE target="_self">
    <link rel=stylesheet href="/logon_ui_resources/css/ur/ur_ie5.css">
    <title>User Management, SAP AG</title>
    <script language="javascript">
    var originWindowName=window.name;
    window.name="logonAppPage";
    function restoreWindow() {
    try{
    window.name=originWindowName;
    } catch(ex){}
    </script>
    <script language="JavaScript">
    function putFocus(formInst, elementInst) {
      if (document.forms.length > 0) {
        document.forms[formInst].elements[elementInst].focus();
    function setValuesAutoCreation() {
    var form = document.getElementById('logonForm');
    form.j_username.value="";
    form.j_password.value="";
    form.automaticAccountCreation.value="true";
    function submitForm() {
    var form = document.getElementById('logonForm');
    form.submit();
    function clearEntries() {
      document.logonForm.longUid.value="";
      document.logonForm.password.value="";
    function setFocusToFirstField() {
    myform = document.logonForm;
    try{
       for (i=0; i<myform.length; i++) {
        elem = myform.elements[i];
        if (!elem.disabled) {
          elemType = elem.type;
          if (elemType=="text" || elemType=="password") {
           if (!elem.readOnly) {
              elem.focus();
              break;
          if (elemType=="select-one" || elemType=="select-multiple" || elemType=="checkbox" || elemType=="radio") {
            elem.focus();
            break;
    } catch(ex){
    function addTenantPrefix() {
      return true;
    </script>
    </head>
    <body class="urBdyStd" bgcolor="#F7F9FB" onLoad="setFocusToFirstField()" onUnload="restoreWindow()">
    Thanks,
    Darshan
    <script language="JavaScript">
    var blockPage = false;
    </script>
    <script language="JavaScript">
    try {
      if (top.document.domain != self.document.domain) {
      blockPage = true;
    } catch (error) {
      // This will happen if the browser running the page tha"

  • Oracle database not getting Up after patch upgrade

    Hi,
    I have upgraded my oracle database from 10.0.2.1 to 10.0.2.4. after this databse is not coming up. I am able to start/stop listner but while starting SAP it is not able to start databse. Pasting error log below.
    Wed Jun 24 14:56:45 PDT 2009
    LOGFILE FOR STARTING ORACLE
    Trying to start CRD database ...
    Wed Jun 24 14:56:45 PDT 2009
    checking required environment variables
    ORACLE_HOME  is >/oracle/CRD/102_64<
    ORACLE_SID   is >CRD<
    Wed Jun 24 14:56:45 PDT 2009
    check initora
    Wed Jun 24 14:56:45 PDT 2009
    check initora
    Wed Jun 24 14:56:45 PDT 2009
    checking V2 connect
    TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 24-JUN-2009 14:56:45
    Copyright (c) 1997,  2007, Oracle.  All rights reserved.
    Used parameter files:
    /usr/sap/CRD/SYS/profile/oracle/sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = SAP.WORLD) (PROTOCOL = TCP) (HOST = CRM) (PORT = 1527))) (CONNECT_DATA = (SID =
    CRD) (GLOBAL_NAME = CRD.WORLD)))
    OK (0 msec)
    tnsping: V2 connect to CRD
    Wed Jun 24 14:56:45 PDT 2009
    Connect to the database to check the database state:
    R3trans: connect check finished with return code: 12
    Database not available
    Wed Jun 24 14:56:45 PDT 2009
    Shutdown database
    First trying to shutdown the database - May be,
    the database is in the nomount or mount state
    Wed Jun 24 14:56:45 PDT 2009
    starting database
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Jun 24 14:56:45 2009
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to an idle instance.
    ORACLE instance started.
    Total System Global Area 1224736768 bytes
    Fixed Size                  2083560 bytes
    Variable Size             620758296 bytes
    Database Buffers          587202560 bytes
    Redo Buffers               14692352 bytes
    Database mounted.
    ORA-01092: ORACLE instance terminated. Disconnection forced
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Data Mining and Real Application Testing options
    Wed Jun 24 14:56:53 PDT 2009
    Connect to the database to verify, that the database is now open
    R3trans check finished with return code: 12
    ERROR: Startup of database failed
        Notify Database Administrator.
    /usr/sap/CRD/SYS/exe/run/startdb: Terminating with error code 12
    thanks,
    Bhanu

    Hi,
    I have tried to start and stop oracle from SPLplus but no luck. i am pasting alert log file which is saying some block courruption......
    Starting up ORACLE RDBMS Version: 10.2.0.4.0.
    System parameters with non-default values:
      processes                = 80
      sessions                 = 96
      event                    = 10191 trace name context forever, level 1
      sga_max_size             = 1224736768
      shared_pool_size         = 587202560
      shared_pool_reserved_size= 57982058
      filesystemio_options     = setall
      control_files            = /oracle/CRD/origlogA/cntrl/cntlrCRD.dbf, /oracle/CRD/origlogB/cntrl/cntrlCRD.dbf, /oracle/CRD/sapdata1/cntrl/cntrlCRD.dbf
      control_file_record_keep_time= 30
      db_block_size            = 8192
      db_cache_size            = 587202560
      compatible               = 10.2.0
      log_archive_dest         = /oracle/CRD/oraarch/CRDarch
      log_buffer               = 14246912
      log_checkpoint_interval  = 0
      db_files                 = 254
      log_checkpoints_to_alert = TRUE
      dml_locks                = 4000
      undo_management          = AUTO
      undo_tablespace          = PSAPUNDO
      undo_retention           = 43200
      recyclebin               = off
      remote_os_authent        = TRUE
      remote_login_passwordfile= EXCLUSIVE
      job_queue_processes      = 1
      background_dump_dest     = /oracle/CRD/saptrace/background
      user_dump_dest           = /oracle/CRD/saptrace/usertrace
      core_dump_dest           = /oracle/CRD/saptrace/background
      optimizer_features_enable= 10.2.0.1
      sort_area_size           = 2097152
      sort_area_retained_size  = 0
      db_name                  = CRD
      open_cursors             = 800
      optimpeek_user_binds   = FALSE
      pga_aggregate_target     = 773094113
      workarea_size_policy     = AUTO
      statistics_level         = typical
    PMON started with pid=2, OS id=25204
    PSP0 started with pid=3, OS id=25206
    MMAN started with pid=4, OS id=25208
    DBW0 started with pid=5, OS id=25210
    LGWR started with pid=6, OS id=25212
    CKPT started with pid=7, OS id=25214
    SMON started with pid=8, OS id=25216
    RECO started with pid=9, OS id=25218
    CJQ0 started with pid=10, OS id=25220
    MMON started with pid=11, OS id=25222
    MMNL started with pid=12, OS id=25224
    Wed Jun 24 15:06:19 2009
    ALTER DATABASE   MOUNT
    Wed Jun 24 15:06:24 2009
    Setting recovery target incarnation to 1
    Wed Jun 24 15:06:24 2009
    Successful mount of redo thread 1, with mount id 182910572
    Wed Jun 24 15:06:24 2009
    Database mounted in Exclusive Mode
    Completed: ALTER DATABASE   MOUNT
    Wed Jun 24 15:06:24 2009
    ALTER DATABASE OPEN
    Wed Jun 24 15:06:24 2009
    Beginning crash recovery of 1 threads
    parallel recovery started with 2 processes
    Wed Jun 24 15:06:24 2009
    Started redo scan
    Wed Jun 24 15:06:24 2009
    Completed redo scan
    1 redo blocks read, 0 data blocks need recovery
    Wed Jun 24 15:06:24 2009
    Started redo application at
    Thread 1: logseq 16126, block 2, scn 1104239482
    Wed Jun 24 15:06:24 2009
    Recovery of Online Redo Log: Thread 1 Group 2 Seq 16126 Reading mem 0
      Mem# 0: /oracle/CRD/origlogB/log_g12m1.dbf
      Mem# 1: /oracle/CRD/mirrlogB/log_g12m2.dbf
    Wed Jun 24 15:06:24 2009
    Completed redo application
    Wed Jun 24 15:06:24 2009
    Completed crash recovery at
    Thread 1: logseq 16126, block 3, scn 1104259484
    0 data blocks read, 0 data blocks written, 1 redo blocks read
    Wed Jun 24 15:06:25 2009
    LGWR: STARTING ARCH PROCESSES
    ARC0 started with pid=16, OS id=25232
    Wed Jun 24 15:06:25 2009
    ARC0: Archival started
    ARC1: Archival started
    LGWR: STARTING ARCH PROCESSES COMPLETE
    ARC1 started with pid=17, OS id=25234
    Wed Jun 24 15:06:25 2009
    Thread 1 advanced to log sequence 16127 (thread open)
    Thread 1 opened at log sequence 16127
      Current log# 3 seq# 16127 mem# 0: /oracle/CRD/origlogA/log_g13m1.dbf
      Current log# 3 seq# 16127 mem# 1: /oracle/CRD/mirrlogA/log_g13m2.dbf
    Successful open of redo thread 1
    Wed Jun 24 15:06:25 2009
    MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
    Wed Jun 24 15:06:25 2009
    ARC0: Becoming the 'no FAL' ARCH
    ARC0: Becoming the 'no SRL' ARCH
    Wed Jun 24 15:06:25 2009
    ARC1: Becoming the heartbeat ARCH
    Wed Jun 24 15:06:25 2009
    SMON: enabling cache recovery
    Wed Jun 24 15:06:25 2009
    Errors in file /oracle/CRD/saptrace/usertrace/crd_ora_25226.trc:
    ORA-00704: bootstrap process failure
    ORA-39700: database must be opened with UPGRADE option
    Wed Jun 24 15:06:25 2009
    Error 704 happened during db open, shutting down database
    USER: terminating instance due to error 704
    Instance terminated by USER, pid = 25226
    ORA-1092 signalled during: ALTER DATABASE OPEN...
    Thanks,
    Bhanu

  • Field with a default value from another field

    I need to populate a field as the default value from another field that the user inputs. I've tried the scripting that I found from the below Topic in the Archived Forums, but I'm not able to make it work. I've tried numerous variations and still to no avail. I tried to make the scripting work in Acrobat 6 and then decided that maybe I needed to upgrade, so I'm now trying it in Acrobat 8 with no results. Can anyone help?
    Topic
    Acrobat 5 - field with default value of another field
    Ben PF - 03:31am Mar 23, 2007 Pacific
    How can I have a field date2 which has the default value of field date1, but which can be edited by the user if necessary without changing the value of date1.
    I've tried, but I just can't figure it out!
    Any help much appreciated.
    Ben
    | Back to Topic List | Bookmark | Subscribe
    To start a NEW discussion click on the Back to Topic List link and select Add Topic.
    If you are in an archive forum please go up to the main topic list (archives are read only).
    Messages
    2 messages. Displaying 1 through 2.
    First Previous Next Last Show All Messages
    Gene Dianoski - 5:22am Mar 23, 07 PST (#1 of 2)
    This, or some variation of this, should work:
    if(this.getField("date2").value == ""{
    this.getField("date2").value = this.getField("date1).value;
    | Bookmark back to top
    Ben PF - 6:49am Mar 23, 07 PST (#2 of 2)
    Thanks very much.
    I put it in at document level to start, but it didn't run the script automatically when date1 was first filled in, so I have put it in as a mouse exit action in date1 and it works a treat.
    Thanks for your help.
    Ben

    Okay forget what I posted above and lets start over. Go to your first field and under Properties -> Actions Tab -> Select Trigger -> On Blur Run A JavaScript.
    Put this:
    this.getField("myField2").value = event.target.value;
    Make sure that you replace ("myField2") with the actual name of your second field. I just tested this and it works for Acrobat version 6.
    I haven't been doing as much javascripting as I used to, so sometimes I too make some basic mistakes.

  • Error while populating drop down list with values from a database

    Hi all,
    I have a JSP page with a drop down list that is to be populated with values from a database.
    This is the code in my JSP file:
         <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
                Iterator<Integer> iterator = floornumbers.iterator(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% while (iterator.hasNext()) { %>
                       <option value="<%=iterator.next().intValue()%>"> <%=iterator.next().intValue()%> </option>
                       <% } %>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>   The DataManager.java class simply forwards this to its respective Peer class, which has the code shown below:
          package seatplanner.model;
        import java.sql.Connection;
        import java.sql.ResultSet;
        import java.sql.SQLException;
        import java.sql.Statement;
        import java.util.ArrayList;
        /* This class handles all floor operations */
         public class FloorPeer
         /* This method returns all the floor numbers */
         public static ArrayList<Integer> getAllFloorNumbers(DataManager dataManager) {
            ArrayList<Integer> floornumbers = new ArrayList<Integer>();
            Connection connection = dataManager.getConnection();
            if (connection != null) {
              try {
                Statement s = connection.createStatement();
                String sql = "select ID from floor order by ID asc";
                try {
                  ResultSet rs = s.executeQuery(sql);
                  try {
                    while (rs.next()) {
                      floornumbers.add(rs.getInt(1));
                  finally { rs.close(); }
                finally {s.close(); }
              catch (SQLException e) {
                System.out.println("Could not get floor numbers: " + e.getMessage());
              finally {
                dataManager.putConnection(connection);
            return floornumbers;
         }  The classes compile properly, but when I load this page up in Tomcat it just freezes and does not load the form. I tested the DB connection and it works fine.
    What am I doing wrong in the JSP code?
    Thanks for the help in advance.
    UPDATE: I commented out the form, and added <%=floornumbers.size()%> right above the commented code to check if the ArrayList is indeed getting populated with the values from the database (the values are of type integer in the database). The page still freezes like before. I'm puzzled now :confused: .

    Wrong usage of Iterator.
    <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
                Iterator<Integer> iterator = floornumbers.iterator(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% while (iterator.hasNext()) {
                                    Integer inte = iterator.next();
                            %>
                       <option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
                       <% } %>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>or make use of enhanced loop as you are already using J2SE 5.0+ for avoiding confusions.
    <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% for(Integer inte:floornumbers) {%>
                       <option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
                       <%}%>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>and a lot better thing would be making usage of basic Taglib provided with JSTL spec or struts spec which make life easier and simple.
    something like usage of <c:forEach/> or <logic:iterate/> would be lot better without writing a single scriptlet code.
    Hope that might help :)
    REGARDS,
    RaHuL

  • DB13 Check database not working

    Hi All,
    Check DB and update stats from DB13 does not work. It comes back with the following error
    Can't exec external program (No such file or directory)
    Checked from OS level and found that brconnect -u / -c -f check works only from exe directory. If i execute the
    command from any other directory it comes back with an error saying command not found
    Upon further investigation found that this is an issue with env variable PATH
    The current value of PATH in env variable of sidadm is
    PATH=/oracle/SID/102_64/bin:/opt/IBMJava2-amd64-142/bin:.:/export/home/sidadm:/usr/sap/SID/DVEBMGS01/exe:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
    I want to change the value from usr/sap/SID/DVEBMGS01/exe to /usr/sap/SID/SYS/exe/run
    I checked all the csh and .sh profiles for sidadm user but i did not find any PATH variable,
    I can see DIR_LIBRARY and LD_LIBRARY_PATH but i cant see PATH variable
    Checked  the shell and it is /bin/csh
    checked .bash_profile and all i can see is this
    .bash_profile
    Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi
    User specific environment and startup programs
    PATH=$PATH:$HOME/bin
    export PATH
    unset USERNAME
    Has any one faced this issue earlier??
    Meanwhile i have found a temporary fix for timebeing i.e i copied all  the br* executables from /sapmnt/SID/exe to
    /usr/sap/SID/DVEBMGS01/exe and after doing that DB13 - DBcheck and Update optimizer works fine.
    Regards,
    Ershad Ahmed

    Hi Sunil and Eric
    Thanks for the reply
    I checked all the profiles but no luck. I cant find the parameter.
    As i mentioned in my earlier post i have found a temporary fix by copying the br executables from /sapmnt/SID/exe to
    /usr/sap/SID/DVEBMGS01/exe and ran saproot.sh and that resolved the issue.
    If i can change my PATH variable to point to /usr/sap/SID/SYS/exe/run that would be a permanent fix
    Regards,
    Ershad Ahmed

  • ODSI service using function from oracle database

    Hi ,
    I need to create a ODSI service using function from oracle database.
    I am not sure how to create a Physical Layer and Logical Layer using the function fron db.
    Kindly provide a sample . I need It ASAP. Thanks in advance.
    Regards,
    Tara

    Here's what you do.
    Create New Physical Data Service -> Relational -> MyDataSource -> Table -> SomeTable ... finish the wizard.
    So now you have a Physical Data Service that represents a database table.
    Create New Physcial Data Service -> Relational -> MyDataSource (the same one as above) -> Database Function -> Enter UPPER for the Function name, enter MyUpper fro the XQuery Function. Finish the Wizard (use something like MyUpperDs for the ds name).
    Open MyUpperDs. Right-click -> Edit Signature on MyUpper. Change the ReturnType to string, change the Occurrence to Zero or One.
    Add a parameter, change the Type to string, change the Occurrence to Zero or One.
    Save.
    Now, open the first ds you made SomeTable.ds (whatever). Run it in the test view.
    Go to the Overview tab. Create New Operation. Give it the name SOMETABLE_UPPER. Save it.
    Go to the Query Map tab, open SOMETABLE_UPPER. Drag and drop SOMETABLE (the system-generated function into the mapper. It will show a dotted line from SOMETABLE to the Return. Now drag-and-drop the SOMETABLE to the top-level element of the return type, it will show solid lines from each element in SOMETABLE to each element in the return type.
    Now, drag-and-drop MyUpperDs.MyUpper into the Query Mapper. Edit the source, find where it added the line "for $x in myd:MyUpper()" and delete that line.
    Change a line that simply returns a value to use your function, for example, change
    <FIRST_NAME>{fn:data($CUSTOMER/FIRST_NAME)}</FIRST_NAME>
    to
    <FIRST_NAME>{myd:MyUpper(fn:data($CUSTOMER/FIRST_NAME))}</FIRST_NAME>
    Click on the Plan tab and Show Query Plan. You will see that in the query plan, it is using the database UPPER function where you specified MyUpper.
    Go to the Test View and run it.
    I used the RTLCUSTOMER table in cgDataSource
    xquery version "1.0" encoding "UTF-8";
    (::pragma xds <x:xds xmlns:x="urn:annotations.ld.bea.com" targetType="t:CUSTOMER" xmlns:t="ld:physical/CUSTOMER">
    <creationDate>2010-10-14T13:09:54</creationDate>
    <relationalDB name="cgDataSource" providerId="Pointbase"/>
    <field xpath="CUSTOMER_ID" type="xs:string">
    <extension nativeXpath="CUSTOMER_ID" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="32" nativeFractionalDigits="0" nativeKey="true"/>
    <properties nullable="false"/>
    </field>
    <field xpath="FIRST_NAME" type="xs:string">
    <extension nativeXpath="FIRST_NAME" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="64" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="LAST_NAME" type="xs:string">
    <extension nativeXpath="LAST_NAME" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="64" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="CUSTOMER_SINCE" type="xs:date">
    <extension nativeXpath="CUSTOMER_SINCE" nativeTypeCode="91" nativeType="DATE" nativeSize="10" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="EMAIL_ADDRESS" type="xs:string">
    <extension nativeXpath="EMAIL_ADDRESS" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="32" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="TELEPHONE_NUMBER" type="xs:string">
    <extension nativeXpath="TELEPHONE_NUMBER" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="32" nativeFractionalDigits="0"/>
    <properties nullable="false"/>
    </field>
    <field xpath="SSN" type="xs:string">
    <extension nativeXpath="SSN" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="16" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="BIRTH_DAY" type="xs:date">
    <extension nativeXpath="BIRTH_DAY" nativeTypeCode="91" nativeType="DATE" nativeSize="10" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="DEFAULT_SHIP_METHOD" type="xs:string">
    <extension nativeXpath="DEFAULT_SHIP_METHOD" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="16" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="EMAIL_NOTIFICATION" type="xs:short">
    <extension nativeXpath="EMAIL_NOTIFICATION" nativeTypeCode="5" nativeType="SMALLINT" nativeSize="5" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="NEWS_LETTTER" type="xs:short">
    <extension nativeXpath="NEWS_LETTTER" nativeTypeCode="5" nativeType="SMALLINT" nativeSize="5" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="ONLINE_STATEMENT" type="xs:short">
    <extension nativeXpath="ONLINE_STATEMENT" nativeTypeCode="5" nativeType="SMALLINT" nativeSize="5" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <field xpath="LOGIN_ID" type="xs:string">
    <extension nativeXpath="LOGIN_ID" nativeTypeCode="12" nativeType="VARCHAR" nativeSize="50" nativeFractionalDigits="0"/>
    <properties nullable="true"/>
    </field>
    <key name="CUSTOMER_0_SYSTEMNAMEDCONSTRAINT__PRIMARYKEY" type="cus:CUSTOMER_KEY" inferredSchema="true" xmlns:cus="ld:physical/CUSTOMER"/>
    </x:xds>::)
    declare namespace myd= "ld:physical/MyDs";
    declare namespace f1 = "ld:physical/CUSTOMER";
    import schema namespace t1 = "ld:physical/CUSTOMER" at "ld:physical/schemas/CUSTOMER.xsd";
    import schema "ld:physical/CUSTOMER" at "ld:physical/schemas/CUSTOMER_KEY.xsd";
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="read" isPrimary="false" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare function f1:CUSTOMER() as schema-element(t1:CUSTOMER)* external;
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="create" isPrimary="true" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare procedure f1:createCUSTOMER($p as element(t1:CUSTOMER)*)as schema-element(t1:CUSTOMER_KEY)* external;
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="update" isPrimary="true" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare procedure f1:updateCUSTOMER($p as changed-element(t1:CUSTOMER)*) as empty() external;
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="public" kind="delete" isPrimary="true" nativeName="CUSTOMER" nativeLevel2Container="RTLCUSTOMER" style="table">
    <nonCacheable/> </f:function>::)
    declare procedure f1:deleteCUSTOMER($p as element(t1:CUSTOMER)*) as empty() external;
    (::pragma function <f:function kind="read" visibility="public" isPrimary="false" xmlns:f="urn:annotations.ld.bea.com"/>::)
    declare function f1:CUSTOMER_UPPER() as element(f1:CUSTOMER)*{
    for $CUSTOMER in f1:CUSTOMER()
    return
    <t1:CUSTOMER>
    <CUSTOMER_ID>{fn:data($CUSTOMER/CUSTOMER_ID)}</CUSTOMER_ID>
    <FIRST_NAME>{myd:MyUpper(fn:data($CUSTOMER/FIRST_NAME))}</FIRST_NAME>
    <LAST_NAME>{fn:data($CUSTOMER/LAST_NAME)}</LAST_NAME>
    <CUSTOMER_SINCE>{fn:data($CUSTOMER/CUSTOMER_SINCE)}</CUSTOMER_SINCE>
    <EMAIL_ADDRESS>{fn:data($CUSTOMER/EMAIL_ADDRESS)}</EMAIL_ADDRESS>
    <TELEPHONE_NUMBER>{fn:data($CUSTOMER/TELEPHONE_NUMBER)}</TELEPHONE_NUMBER>
    <SSN?>{fn:data($CUSTOMER/SSN)}</SSN>
    <BIRTH_DAY?>{fn:data($CUSTOMER/BIRTH_DAY)}</BIRTH_DAY>
    <DEFAULT_SHIP_METHOD?>{fn:data($CUSTOMER/DEFAULT_SHIP_METHOD)}</DEFAULT_SHIP_METHOD>
    <EMAIL_NOTIFICATION?>{fn:data($CUSTOMER/EMAIL_NOTIFICATION)}</EMAIL_NOTIFICATION>
    <NEWS_LETTTER?>{fn:data($CUSTOMER/NEWS_LETTTER)}</NEWS_LETTTER>
    <ONLINE_STATEMENT?>{fn:data($CUSTOMER/ONLINE_STATEMENT)}</ONLINE_STATEMENT>
    <LOGIN_ID?>{fn:data($CUSTOMER/LOGIN_ID)}</LOGIN_ID>
    </t1:CUSTOMER>
    xquery version "1.0" encoding "UTF-8";
    (::pragma xfl <x:xfl xmlns:x="urn:annotations.ld.bea.com">
    <creationDate>2010-10-14T13:10:45</creationDate>
    <customNativeFunctions>
    <relational>
    <dataSource>cgDataSource</dataSource>
    </relational>
    </customNativeFunctions>
    </x:xfl>::)
    declare namespace f1 = "ld:physical/MyDs";
    (::pragma function <f:function visibility="protected" kind="library" isPrimary="false" nativeName="UPPER" xmlns:f="urn:annotations.ld.bea.com">
    <nonCacheable/>
    </f:function>::)
    declare function f1:MyUpper($arg0 as xs:string?) as xs:string? external;
    <cus:CUSTOMER xmlns:cus="ld:physical/CUSTOMER">
    <CUSTOMER_ID>CUSTOMER1</CUSTOMER_ID>
    <FIRST_NAME>JACK</FIRST_NAME>
    <LAST_NAME>Black</LAST_NAME>
    <CUSTOMER_SINCE>2001-10-01</CUSTOMER_SINCE>
    <EMAIL_ADDRESS>[email protected]</EMAIL_ADDRESS>
    <TELEPHONE_NUMBER>2145134119</TELEPHONE_NUMBER>
    <SSN>295-13-4119</SSN>
    <BIRTH_DAY>1970-01-01</BIRTH_DAY>
    <DEFAULT_SHIP_METHOD>AIR</DEFAULT_SHIP_METHOD>
    <EMAIL_NOTIFICATION>1</EMAIL_NOTIFICATION>
    <NEWS_LETTTER>0</NEWS_LETTTER>
    <ONLINE_STATEMENT>1</ONLINE_STATEMENT>
    </cus:CUSTOMER>
    .

  • Passing Array of java objects to and from oracle database-Complete Example

    Hi all ,
    I am posting a working example of Passing Array of java objects to and from oracle database . I have struggled a lot to get it working and since finally its working , postinmg it here so that it coudl be helpful to the rest of the folks.
    First thinsg first
    i) Create a Java Value Object which you want to pass .
    create or replace and compile java source named Person as
    import java.sql.*;
    import java.io.*;
    public class Person implements SQLData
    private String sql_type = "PERSON_T";
    public int person_id;
    public String person_name;
    public Person () {}
    public String getSQLTypeName() throws SQLException { return sql_type; }
    public void readSQL(SQLInput stream, String typeName) throws SQLException
    sql_type = typeName;
    person_id = stream.readInt();
    person_name = stream.readString();
    public void writeSQL(SQLOutput stream) throws SQLException
    stream.writeInt (person_id);
    stream.writeString (person_name);
    ii) Once you created a Java class compile this class in sql plus. Just Copy paste and run it in SQL .
    you should see a message called "Java created."
    iii) Now create your object Types
    CREATE TYPE person_t AS OBJECT
    EXTERNAL NAME 'Person' LANGUAGE JAVA
    USING SQLData (
    person_id NUMBER(9) EXTERNAL NAME 'person_id',
    person_name VARCHAR2(30) EXTERNAL NAME 'person_name'
    iv) Now create a table of Objects
    CREATE TYPE person_tab IS TABLE OF person_t;
    v) Now create your procedure . Ensure that you create dummy table called "person_test" for loggiing values.
    create or replace
    procedure give_me_an_array( p_array in person_tab,p_arrayout out person_tab)
    as
    l_person_id Number;
    l_person_name Varchar2(200);
    l_person person_t;
    l_p_arrayout person_tab;
    errm Varchar2(2000);
    begin
         l_p_arrayout := person_tab();
    for i in 1 .. p_array.count
    loop
         l_p_arrayout.extend;
         insert into person_test values(p_array(i).person_id, 'in Record '||p_array(i).person_name);
         l_person_id := p_array(i).person_id;
         l_person_name := p_array(i).person_name;
         l_person := person_t(null,null);
         l_person.person_id := l_person_id + 5;
         l_person.person_name := 'Out Record ' ||l_person_name ;
         l_p_arrayout(i) := l_person;
    end loop;
    p_arrayout := l_p_arrayout;
         l_person_id := p_arrayout.count;
    for i in 1 .. p_arrayout.count
    loop
    insert into person_test values(l_person_id, p_arrayout(i).person_name);
    end loop;
    commit;
    EXCEPTION WHEN OTHERS THEN
         errm := SQLERRM;
         insert into person_test values(-1, errm);
         commit;
    end;
    vi) Now finally create your java class which will invoke the pl/sql procedure and get the updated value array and then display it on your screen>Alternatively you can also check the "person_test" tbale
    import java.util.Date;
    import java.io.*;
    import java.sql.*;
    import oracle.sql.*;
    import oracle.jdbc.driver.*;
    import java.text.DateFormat;
    import java.text.ParseException;
    import java.text.SimpleDateFormat;
    public class ArrayDemo
    public static void passArray() throws SQLException
    Connection conn = getConnection();
    ArrayDemo a = new ArrayDemo();
    Person pn1 = new Person();
    pn1.person_id = 1;
    pn1.person_name = "SunilKumar";
    Person pn2 = new Person();
    pn2.person_id = 2;
    pn2.person_name = "Superb";
    Person pn3 = new Person();
    pn3.person_id = 31;
    pn3.person_name = "Outstanding";
    Person[] P_arr = {pn1, pn2, pn3};
    Person[] P_arr_out = new Person[3];
    ArrayDescriptor descriptor =
    ArrayDescriptor.createDescriptor( "PERSON_TAB", conn );
    ARRAY array_to_pass =
    new ARRAY( descriptor, conn, P_arr);
    OracleCallableStatement ps =
    (OracleCallableStatement )conn.prepareCall
    ( "begin give_me_an_array(?,?); end;" );
    ps.setARRAY( 1, array_to_pass );
         ps.registerOutParameter( 2, OracleTypes.ARRAY,"PERSON_TAB" );
         ps.execute();
         oracle.sql.ARRAY returnArray = (oracle.sql.ARRAY)ps.getArray(2);
    Object[] personDetails = (Object[]) returnArray.getArray();
    Person person_record = new Person();
    for (int i = 0; i < personDetails.length; i++) {
              person_record = (Person)personDetails;
              System.out.println( "row " + i + " = '" + person_record.person_name +"'" );
                        public static void main (String args[]){
         try
                             ArrayDemo tfc = new ArrayDemo();
                             tfc.passArray();
         catch(Exception e) {
                        e.printStackTrace();
              public static Connection getConnection() {
         try
                             Class.forName ("oracle.jdbc.OracleDriver");
                             return DriverManager.getConnection("jdbc:oracle:thin:@<<HostNanem>>:1523:VIS",
                             "username", "password");
         catch(Exception SQLe) {
                        System.out.println("IN EXCEPTION BLOCK ");
                        return null;
    and thats it. you are done.
    Hope it atleast helps people to get started. Comments are appreciated. I can be reached at ([email protected]) or [email protected]
    Thanks
    Sunil.s

    Hi Sunil,
    I've a similar situation where I'm trying to insert Java objects in db using bulk insert. My issue is with performance for which I've created a new thread.
    http://forum.java.sun.com/thread.jspa?threadID=5270260&tstart=30
    I ran into your code and looked into it. You've used the Person object array and directly passing it to the oracle.sql.ARRAY constructor. Just curios if this works, cos my understanding is that you need to create a oracle.sql.STRUCT out of ur java object collection and pass it to the ARRAY constructor. I tried ur way but got this runtime exception.
    java.sql.SQLException: Fail to convert to internal representation: JavaBulkInsertNew$Option@10bbf9e
                        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
                        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
                        at oracle.jdbc.oracore.OracleTypeADT.toDatum(OracleTypeADT.java:239)
                        at oracle.jdbc.oracore.OracleTypeADT.toDatumArray(OracleTypeADT.java:274)
                        at oracle.jdbc.oracore.OracleTypeUPT.toDatumArray(OracleTypeUPT.java:115)
                        at oracle.sql.ArrayDescriptor.toOracleArray(ArrayDescriptor.java:1314)
                        at oracle.sql.ARRAY.<init>(ARRAY.java:152)
                        at JavaBulkInsertNew.main(JavaBulkInsertNew.java:76)
    Here's a code snippet I used :
    Object optionVal[] =   {optionArr[0]};   // optionArr[0] is an Option object which has three properties
    oracle.sql.ArrayDescriptor empArrayDescriptor = oracle.sql.ArrayDescriptor.createDescriptor("TT_EMP_TEST",conn);
    ARRAY empArray = new ARRAY(empArrayDescriptor,conn,optionVal);If you visit my thread, u'll see that I'm using STRUCT and then pass it to the ARRAY constructor, which works well, except for the performance issue.
    I'll appreciate if you can provide some information.
    Regards,
    Shamik

Maybe you are looking for

  • White frames on black background?

    When texts and images on my web page are loading there are white frames visible against my black background. If they need to be there, can I change them to black maybe? My webpage is www.carlsonahnell.se. Thanks!

  • TreeCell Factory causing leak

    Hi, I have read few articles related to memory leak on tree cell factory and also read their work around by using weak binders. My question is that I am creating a tree on start up using custom cell factory which works perfectly fine without showing

  • Standalone ITS 6.20 support?

    How long do you expect that standalone ITS 6.20 will be supported?   I know that the FAQ says "long term" but it said that the integrated ITS in 6.40 will only be supported through 2009.  We're hearing that standalone ITS 6.20 is "going away".   Can

  • TS3999 Can't see Calendar entries with new upgrade...

    With the recent upgrade of iCloud Calendar, I can't see many of the daily entries when I look at the "Month" view.  In the old version I could.  I'm not sure if it's the font size or color that's the problem.   It's a pain to have to click on the "..

  • BW connection to ORACLE Error

    Dear All, I need to connect ORACLE as a source system to BW. So I craeted the source system as DB connect --> selected DBMS = ORACLE. DBMS: ORA USER NAME: ksftest DB PASSWORD: admin password CONN. INFO:  [email protected] 132.147.226.120 is the DB Se