Oracle JDriver serializable problems

I'm testing optimistic locking issues for a new application. The current
          prototypes are running with Oracle 8.1.7, WLS 6.1 SP1, NT 4.0. However
          I'm seeing different behaviour when using the Weblogic JDriver and the
          Oracle thin driver.
          I've create a stateless session bean to wrap an entity bean. Both beans
          are managed by CMT, the session uses Required and the entity Mandatory.
          The session bean method performing the update is configured with
          TRANSACTION_SERIALIZABLE.
          When executed with two clients using the Weblogic
          JDriver(weblogic.jdbc.oci.Driver) I can make two calls (which increases my
          connection pool size to 2)each one is rejected and works as expected.
          However the next and remaining attempts refuse to generate the ORA-8177.
          If I restart the WLS server it produces exactly the same results. I've
          tried configuring the driver with bin/oci816_8 and bin/oci817_8 paths when
          starting weblogic.
          I then tried with the Oracle thin driver (oracle.jdbc.driver.OracleDriver)
          and this appears to work fine.
          Has anyone seen this behaviour ? Could this be a problem with the JDriver
          or Oracle's OCI ?
          Darren
          

We had similar performance issues in our environment, once we upgraded from 9.2.0.2 to 10.2.0.2.
Oracle: 10.2.0.2
SAP: 4.7x110
OS: SOLARIS 9 64bit
The above mentioned notes were very helpful. We had to install an oracle patch as well (found on marketplace)  --  6321245
and make the following oracle parameters changes:
pga_aggregate_target - 144MB (default = 25MB)
*.event="10027 trace name context forever, level 1"
*.event="10028 trace name context forever, level 1"
*.event="10162 trace name context forever, level 1"
*.event="10183 trace name context forever, level 1"
*.event="10191 trace name context forever, level 1"
*.event="10629 trace name context forever, level 32"
*.event="38068 trace name context forever, level 100"
*.event="38043 trace name context forever, level 1"
*.optimizer_index_caching=50
*.optimizer_index_cost_adj=20
*.parallel_execution_message_size=16384
*._b_tree_bitmap_plans=FALSE
*._index_join_enabled=FALSE
*._optim_peek_user_binds=FALSE
*._optimizer_mjc_enabled=FALSE
*._sort_elimination_cost_ratio=10
Remove
*.optimizer_features_enable='9.2.0'
HTH

Similar Messages

  • Oracle XA driver problem with WLS 7.0.1.0, Oracle 9.0.1

    We are using simplified chinese, after swith to bea jdriver, it messed up
    all the encoding. So we cannot display Chinese character correctly.
    We are using WLS 7.0.1.0, Oracle 9.0.1 on both Windows and Solaris 8
    environment, BEA supplied JDK 1.3.1_03.
    We have many diffrent problems with oracle drivers:
    1. We want to use XA driver to support distributed transaction, However:
    * bea jdriver xa messes up with encoding
    * when using oracle 901 driver, everything works fince except webservices.
    Workshop application access the ejb, then the workshp application sets
    isolation level, but oracle driver does not support it and gives error. Is
    there a way to turn off isolation level in workshop? I tried manually edit
    weblogic-ejb-jar.xml, however,workshop cannot redeploy it after that.
    2. When not using XA, oracle thin driver works fine. But we lost XA
    capability.
    Any work around?

    I did try to change the value in this config file as well, but did not help.
    In fact, the installation default setting is with
    '<transaction-isolation-level>' commented out.
    And when I use bea oracle jdriver, it somehow messed up with database
    character set encoding, so our Chinese characters could not be retrieved
    correctly. And I try to set the encoding of jdriver to 'GBK', it did not
    work.
    "Anurag Pareek" <[email protected]> дÈëÏûÏ¢ÐÂÎÅ
    :[email protected]..
    Hello Ma,
    The transaction isolation level value for EJBs backing the JWS files is
    specified in the <transaction-isolation-level> tag in the
    WEB-INF/weblogic-jws-config.xml file of a Workshop project. You can
    manipulate this value to serve your purpose.
    Please do let me know how it goes.
    Regards,
    Anurag
    Workshop Support
    "Ma Jie" <[email protected]> wrote in message
    news:[email protected]..
    We are using simplified chinese, after swith to bea jdriver, it messed
    up
    all the encoding. So we cannot display Chinese character correctly.
    We are using WLS 7.0.1.0, Oracle 9.0.1 on both Windows and Solaris 8
    environment, BEA supplied JDK 1.3.1_03.
    We have many diffrent problems with oracle drivers:
    1. We want to use XA driver to support distributed transaction, However:
    * bea jdriver xa messes up with encoding
    * when using oracle 901 driver, everything works fince exceptwebservices.
    Workshop application access the ejb, then the workshp application sets
    isolation level, but oracle driver does not support it and gives error.Is
    there a way to turn off isolation level in workshop? I tried manuallyedit
    weblogic-ejb-jar.xml, however,workshop cannot redeploy it after that.
    2. When not using XA, oracle thin driver works fine. But we lost XA
    capability.
    Any work around?

  • ORA-24327 error when trying to configure Oracle JDriver 2.0 on Commerce Server 3.5 SP1 on WLServer 6.0 SP2

    When I try to install and configure the Oracle JDriver v.2.0 to work with Commerce
    Server 3.5 SP1 and WebLogic Server 6.0 SP2, on starting up the commerce server,
    I get the exceptions that follow this message. I cannot run the dbping utility
    because it says it cannot find the BEA license file to verify that JDriver is
    licensed for use. I looked over previous discussion threads on this particular
    Oracle error, and the problem in the previous cases appears to have been use of
    the wrong TNS name. I am referencing the same TNS name that is in my server's
    tnsnames.ora file. I can connect to the database using SQLNet and the same connection
    parameters that I have set up in weblogic. My Oracle home directory is set to
    the directory just above the client install. I am trying to configure Commerce
    Server on a Sun SPARC system running Solaris 8. Any help would be greatly appreciated.
    Thanks,
    Jon Morgan
    ---------- LOGIN ERROR CODE: 24327
    java.sql.SQLException: Error while trying to retrieve text for error ORA-24327
    (WEBLOGIC/********@ARBR.intelixinc)
    at weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:161)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:92)
    at com.beasys.commerce.axiom.contact.security.RDBMSDelegate.init(RDBMSDe
    legate.java:194)
    at com.beasys.commerce.axiom.contact.security.RDBMSDelegate.<init>(RDBMS
    Delegate.java:139)
    at com.beasys.commerce.axiom.contact.security.RDBMSDelegate$DFactory.get
    Instance(RDBMSDelegate.java:975)
    at com.beasys.commerce.util.Pool.<init>(Pool.java:37)
    at com.beasys.commerce.axiom.contact.security.RDBMSRealm.<init>(RDBMSRea
    lm.java:127)
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:237)
    at weblogic.security.acl.Realm.getRealm(Realm.java:84)
    at weblogic.security.acl.Realm.getRealm(Realm.java:62)
    at weblogic.security.SecurityService.initializeRealm(SecurityService.jav
    a:265)
    at weblogic.security.SecurityService.initialize(SecurityService.java:123
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:343)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:169)
    at weblogic.Server.main(Server.java:35)
    <Aug 7, 2001 11:50:29 AM EDT> <Emergency> <Server> <Unable to initialize the ser
    ver: 'Fatal initialization exception
    Throwable: java.lang.IllegalAccessError: com.beasys.commerce.axiom.contact.secur
    ity.RDBMSException: realm initialization failed, action 'Driver.connect', - wit
    h nested exception:
    [java.sql.SQLException: Error while trying to retrieve text for error ORA-24327
    - (WEBLOGIC/********@ARBR.intelixinc)]
    java.lang.IllegalAccessError: com.beasys.commerce.axiom.contact.security.RDBMSEx
    ception: realm initialization failed, action 'Driver.connect', - with nested
    ex
    ception:
    [java.sql.SQLException: Error while trying to retrieve text for error ORA-24327
    - (WEBLOGIC/********@ARBR.intelixinc)]
    at weblogic.security.acl.Realm.getRealm(Realm.java:91)
    at weblogic.security.acl.Realm.getRealm(Realm.java:62)
    at weblogic.security.SecurityService.initializeRealm(SecurityService.jav
    a:265)
    at weblogic.security.SecurityService.initialize(SecurityService.java:123
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:343)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:169)
    at weblogic.Server.main(Server.java:35)
    '>
    The WebLogic Server did not start up properly.
    Exception raised: java.lang.IllegalAccessError: com.beasys.commerce.axiom.contac
    t.security.RDBMSException: realm initialization failed, action 'Driver.connect',
    - with nested exception:
    [java.sql.SQLException: Error while trying to retrieve text for error ORA-24327
    - (WEBLOGIC/********@ARBR.intelixinc)]
    java.lang.IllegalAccessError: com.beasys.commerce.axiom.contact.security.RDBMSEx
    ception: realm initialization failed, action 'Driver.connect', - with nested
    ex
    ception:
    [java.sql.SQLException: Error while trying to retrieve text for error ORA-24327
    - (WEBLOGIC/********@ARBR.intelixinc)]
    at weblogic.security.acl.Realm.getRealm(Realm.java:91)
    at weblogic.security.acl.Realm.getRealm(Realm.java:62)
    at weblogic.security.SecurityService.initializeRealm(SecurityService.jav
    a:265)
    at weblogic.security.SecurityService.initialize(SecurityService.java:123
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:343)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:169)
    at weblogic.Server.main(Server.java:35)
    Reason: Fatal initialization exception

    Wrong Forum, you want the APEX LISTENER support forum, this is the APEX support forum..
    Thank you,
    Tony Miller
    LuvMuffin Software

  • Oracle 10g forms problem

    hi
    can any body help me?
    i have installed oracle developer 10g with oracle 8i database
    when i run any form including the test.fmx
    it always ask to install JInitiator although it has been installed (appears in the control panel and in c:\program file\oracle folder)
    another problem appears after completing the installtion of JInitiator
    the browser views the HTML tags of the form not execute it
    so does any body have any idea???

    From the Windows Start menu, choose Run, type regedit, and click OK.
    Expand the registry nodes HKEY_LOCAL_MACHINE > SOFTWARE > ORACLE.
    Make a backup copy of this key by right-clicking it and selecting Export from the context menu.
    Select one of the HOME nodes beneath the ORACLE node (the one for Developer Suite). Ensure that you have opened the correct node by verifying that the key FORMS90_PATH exists in that node.
    From the Registry Editor menu, select Edit > New > String Value. Type in the name FORMS90_HIDE_OBR_PARAMS.
    Double-click FORMS90_HIDE_OBR_PARAMS and in the Value data field enter false, then click OK.
    Close the registry editor.
    Now when you run a form from Forms Builder, it should show parameters, including userid, in the URL, but it should run fine.
    15. Set the path for Forms Builder to locate icons:
    a) Double-click the UI_ICON key to open it for editing.
    b) For the value data, append the path to the .gif file that you will use for the
    button icon, which is the \icons subdirectory of your lab directory. Separate this
    path from the remainder of the string with a semicolon; for example:
    ;e:\labs\lab\icons, then click OK.

  • Oracle Report Printing problem

    Dear All,
    i m using below code on button in oracle forms 6i problem is that when i click on button report should be print
    on network printer but it's print blank page however network printer is not my default printer when i set default printer
    to this network printer its working fine.
    and also its working when i set mode=character and network printer is not default printer but when i set mode=default or bitmap and notwork printer is not default then its print blank page.
         DECLARE
              p_list     PARAMLIST;
         BEGIN
         p_list := get_parameter_list('importdata');
         IF NOT Id_Null(p_list) THEN
    Destroy_Parameter_List('importdata');
         END IF;
              p_list := Create_Parameter_List('importdata');
              Add_Parameter(p_list,'P_IGM_NO',TEXT_PARAMETER,'10117/11');
              Add_Parameter(p_list,'P_INDEX_NO',TEXT_PARAMETER,'498');
              Add_Parameter(p_list,'P_CHR_NO',TEXT_PARAMETER,'CL-APL100/011');
              Add_Parameter(p_list,'P_CONTAINER_NO',TEXT_PARAMETER,'APHU6305929');
              Add_Parameter(p_list,'P_USER',TEXT_PARAMETER,'ALI');
              Add_Parameter(p_list,'P_BAL_QTY',TEXT_PARAMETER,0);
              Add_Parameter(p_list, 'PARAMFORM', TEXT_PARAMETER, 'NO');
              Add_Parameter(p_list,'DESTYPE',TEXT_PARAMETER,'PRINTER');
         Add_Parameter(p_list,'DESNAME',TEXT_PARAMETER,'\\192.168.1.67\epson');
         RUN_PRODUCT(REPORTS,'\\ORASERV\Atlas6I\Import\System\Reports\abc.rep',
         SYNCHRONOUS,
         RUNTIME,
         FILESYSTEM,
         p_list,
         NULL);
         END;

    i have made one oracle 6i reports. its is quite wide.when i run the report it shrink into too small font.
    and i increse it font size it by pressing + button on menu bar it looks okay.
    >
    The + button only causes a zoom in on the screen. It is not affecting the actual layout.
    >
    but the problem is that when i take print out of it ,it's printout comes in its intial format(in small font) evenif i choose different type of paper size or different orientation . it's printout is coming in too small font.
    pl tell me how to overcome this problem>
    The report rendering engine tries to fit the report page into the physical page size. This results in shrinking of font size,etc.
    To fix
    a) reduce the content on the report to something reasonable for printing.(Std paper sizes and orientation)
    b) change the page size selection. Of course, you will need a printer and paper of the size you set.
    Cheers,

  • Oracle 10G connection problem

    Oracle 10G connection problem
    I launch my db with the following script:
    su - oracle -c "export ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1 && /u01/app/oracle/product/10.1.0/db_1/bin/dbstart"
    su - oracle -c "export ORACLE_HOME=/u01/app/oracle/product/10.1.0/db_1 && /u01/app/oracle/product/10.1.0/db_1/bin/lsnrctl start"
    Here is the output:
    SQL*Plus: Release 10.1.0.2.0 - Production on Fri Feb 27 22:17:51 2004
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    SQL> Connected to an idle instance.
    SQL> ORACLE instance started.
    Total System Global Area 188743680 bytes
    Fixed Size 778036 bytes
    Variable Size 162537676 bytes
    Database Buffers 25165824 bytes
    Redo Buffers 262144 bytes
    Database mounted.
    Database opened.
    SQL> Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Database "orcl" warm started.
    LSNRCTL for Linux: Version 10.1.0.2.0 - Production on 27-FEB-2004 22:17:59
    Copyright (c) 1991, 2004, Oracle. All rights reserved.
    Starting /u01/app/oracle/product/10.1.0/db_1/bin/tnslsnr: please wait...
    TNSLSNR for Linux: Version 10.1.0.2.0 - Production
    System parameter file is /u01/app/oracle/product/10.1.0/db_1/network/admin/listener.ora
    Log messages written to /u01/app/oracle/product/10.1.0/db_1/network/log/listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xavan_fi
    xe)(PORT=1521)))
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for Linux: Version 10.1.0.2.0 - Production
    Start Date 27-FEB-2004 22:17:59
    Uptime 0 days 0 hr. 0 min. 0 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /u01/app/oracle/product/10.1.0/db_1/network/admin/listener.ora
    Listener Log File /u01/app/oracle/product/10.1.0/db_1/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xavan_fi
    xe)(PORT=1521)))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    But when i try to connect with sqlplus:
    oracle@xavan_fixe oracle $ sqlplus
    SQL*Plus: Release 10.1.0.2.0 - Production on Ven. Févr. 27 22:19:32 2004
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Enter user-name: scott
    Enter password:
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory

    When you go to get connection you have to set the ORACLE_SID enviroment variable or use the service name in the string to get connection.
    Joel Pérez

  • Oracle's serializable transactions cannot be serialized

    I'm new to oracle. Here is my understanding of oracle's serializable transactions. Feel free to correct me if i'm wrong.
    In my option, the serializable transactions that oracle supports cannot always be serialized.
    Oracle suports serializable transactions by ensuring a serializable transaction cannot modify rows changed by other transactions after the serializable transaction began. (Oracle7 Server Concepts Manual, Data Concurrency).
    However this constraint doesn't ensure two transactions can be serialized. For example, consider a table A that has two columns: rowid and num.
    A has two rows:
    rowid num
    1 1
    2 2
    There are two oracle serializable transactions (T1 and T2) defined as follows.
    T1
    read row 1 from table A into r1
    if (r1.num == 1) {
    update num of row 2 to 100
    commit;
    T2
    read row 2 from A into r2
    if (r2.num == 2) {
    update num of row 1 to 100
    commit;
    Note: row i refers to the row in the table A that has rowid equal to i, for i=1, 2
    Consider the following senario:
    T1: read (1, 1)
    T1: write (2, 100)
    T2: read (2, 2)
    T2: write(1, 100)
    T1: commit
    T2: commit
    In oracle, the senario above will get executed without any error.
    After T1 and T2 commit, the table A has the following rows:
    rowid value
    1 100
    2 100
    However, if you serialize T1 and T2, the table A can only be either
    rowid value
    1 1
    2 100
    if T1 runs before T2;
    or
    rowid value
    1 100
    2 2
    if T2 runs before T1.
    The conclusion is that serializable transactions in Oracle cannot always be serialized.
    Anything wrong in my example?
    Thanks
    null

    Note on the line
    46 if (result == null)
    47 {
    48 String MontoDocumento1 = (String) vo.getCurrentRow (). GetAttribute ("MontoDocumento");
    49 String redondeado1 = Round (MontoDocumento1);
    50 if (redondeado1.equals ("Y"))
    51 { ........
    I call a number then convert to string:
    String MontoDocumento1 = (String) vo.getCurrentRow (). GetAttribute("MontoDocumento");
    and then pass it to double:
    Double.valueOf double v_number = (number). doubleValue ();
    in my function:
    Rounding public String (String number)
    Return String;
    Double.valueOf double v_number = (number). doubleValue ();
    if (v_number == (Math.rint (v_number * 100) / 100))
    return = "Y";
    else
    return = "N";
    return return;
    Which brings me back a string with the value Y or N.
    Thanks if you could help me
    Edited by: 917616 on 29/02/2012 07:16 AM

  • Serialization problem with FlashPlayer 10.1

    Hi,
    here is a message that I have post in the AS3 section (http://forums.adobe.com/message/2938096), but someone gave the hint that this section should be more appropriate.
    A call in remote method, using amf/BlazeDS, is failing for the following reason :
    "The expected argument types are  (int, myPackage.MyClassVO[])  but the supplied types were (java.lang.Double, java.lang.Object[]) and converted to (java.lang.Integer, null).
    Cannot convert typeflex.messaging.io.amf.ASObject with remote type specified as 'null' toan instance of class myPackage.MyClassVO"
    So the serialization is failing.
    MyClassVO have only int variables, so nothing fancy.
    The point is that it works perfectly with previous versions of Flash, except 10.1
    So the definitions of the VOs are not the problem.
    Does any change have been done in the new flash player, with the serialization ? Does someone have also experience serialization problems with this new flash player ?
    Thanks for any help.
    M.
    Environment : Windows 32bits (but happens on Mac OS as well)
    Flash version : WIN 10,1,53,64
    Browser : Firefox, Opera, IE... they all have the problem

    Hi,
    by digging more and more, it appears that the problem is really on flash side.
    This error appears on java side :
    "Cannot convert type flex.messaging.io.amf.ASObject with remote type specified as 'null' to an instance of class myPackage.MyClassVO
    flex.messaging.io.amf.translator.decoder.DecoderFactory.invalidType(DecoderFact ory.java:369)"
    So after a look on the function invalidType in DecoderFactory, it apprears that
    object.getClass().getName();
    returns "flex.messaging.io.amf.ASObject" instead of "myPackage.MyClassVO"
    So Java don't recieve the correct type MyClassVO, but ASObject.
    And that only in FlashPlayer 10.1, but not FlashPayer 9 or FlashPlayer 10, where Java recieve the correct type, MyClassVO.
    Any help will be gladly appreciated, I'm running out of idea !
    Thanks !
    M.

  • Replacement for oracle Jdriver type 2?

    Hi,
    Since WLS8.1 Sp1, the WebLogic Jdriver is deprecated...
    I was using the Oracle JDriver Type 2 (native).
    Does it exist a new type 2 driver? Or should I use the oci driver from oracle?
    Thank you
    Yann.

    You should use the type 2 driver from oracle.

  • Wls 701 oracle jdriver for 901 coding problem

    We are using simplified chinese, after swith to bea jdriver, it messed up
    all the encoding. So we cannot display Chinese character correctly.
    We are using WLS 7.0.1.0, Oracle 9.0.1 on both Windows and Solaris 8
    environment, BEA supplied JDK 1.3.1_03.
    We have many diffrent problems with oracle drivers:
    1. We want to use XA driver to support distributed transaction, However:
    * bea jdriver xa messes up with encoding
    * when using oracle 901 driver, everything works fince except webservices.
    Workshop application access the ejb, then the workshp application sets
    isolation level, but oracle driver does not support it and gives error.
    2. When not using XA, oracle thin driver works fine. But we lost XA
    capability.
    Any work around?

    Please try to reset NLS_LANG paramet in your environement before starting
    server if you are using weblogic XA driver.
    Mitesh
    Ma Jie wrote:
    We are using simplified chinese, after swith to bea jdriver, it messed up
    all the encoding. So we cannot display Chinese character correctly.
    We are using WLS 7.0.1.0, Oracle 9.0.1 on both Windows and Solaris 8
    environment, BEA supplied JDK 1.3.1_03.
    We have many diffrent problems with oracle drivers:
    1. We want to use XA driver to support distributed transaction, However:
    * bea jdriver xa messes up with encoding
    * when using oracle 901 driver, everything works fince except webservices.
    Workshop application access the ejb, then the workshp application sets
    isolation level, but oracle driver does not support it and gives error.
    2. When not using XA, oracle thin driver works fine. But we lost XA
    capability.
    Any work around?

  • Isolation level SERIALIZABLE problem

    Hi there,
    I have a problem with my stored procedures when the isolation level of the connection is serializable. I need to set this isolation level because of data consistency reasons.
    When in this isolation level and a transaction tries to update or delete data modified by a transaction that commits after the serializable transaction began, I get this error:
    ORA-08177: Cannot serialize access for this transaction
    This is normal. The thing to do in this case is catch the error in the exception handler, rollback to a certain savepoint and try to do the update again.
    The stored procedure that I use to test this is:
    CREATE OR REPLACE PROCEDURE nm_test IS
    tmpVar NUMBER;
    err_num NUMBER;
    err_msg VARCHAR2(200);
    teller number;
    BEGIN
    teller := 0;
    savepoint sp1;
    <<try_every_thing_again>>
    begin
    tmpVar := 0;
    update stock_prices set price = price + 1
    where ric = 1;
    DBMS_OUTPUT.Put_Line('teller = ' || teller);
    EXCEPTION
    WHEN others THEN
    err_num := SQLCODE;
    --err_msg := SUBSTR(SQLERRM, 1, 200);
         if (err_num = -8177) then
              rollback to savepoint sp1;
              --DBMS_LOCK.SLEEP(1);
              teller := teller + 1;
              if (teller < 10) then
                   goto try_every_thing_again;
              end if;
              DBMS_OUTPUT.Put_Line('exception: teller = ' || teller);
         end if;
    end;
    END nm_test;
    I test this using 2 connections to the database. In the first connection I run the stored proc (without committing). Then I run the same stored proc in the second connection. This will block on the update (the is an implicit lock), which is ok. Then I commit the first connection. The second catches the error, rolls back and tries the update again....but then it catches the exception again, and again???
    When I replace the "rollback to savepoint" by just "rollback", everything works fine (the exception is then caught only once) and the update succeeds on the second try.
    But I can not work with just a "rollback" because my stored procedures might be called by others for which I don't want to undo all the work.
    Do any of you know why I keep getting this error (the program ends up in an infinite loop if I didn't keep a counter and exit after 10 times)?
    Marcel van Vuure

    Marcel,
    First of all, I'd be interested in hearing why you think you need serializable transactions (why 'read committed' doesn't work for your application). In the 8 years I've been building Oracle apps, I've never deemed it necessary to use serializable transactions. Maybe an optimistic locking strategy will solve your problem.
    Secondly, if I were designing the interface, I wouldn't have a procedure in charge of both executing business logic AND retrying the logic in case of failure. I'd build a helper procedure that calls the procedure that does the work, looks for certain exceptions, and retries the procedure when necessary.
    Lastly, if your interface doesn't have transactional control (the caller is in charge of commits and rollbacks), maybe you should simply attempt the update statement and throw an exception to the caller and let them handle it.
    I'm sorry if I haven't directly solved your problem, but sometimes the best way to solve a problem is to question the decisions that got you there in the first place.
    Hi there,
    I have a problem with my stored procedures when the isolation level of the connection is serializable. I need to set this isolation level because of data consistency reasons.
    When in this isolation level and a transaction tries to update or delete data modified by a transaction that commits after the serializable transaction began, I get this error:
    ORA-08177: Cannot serialize access for this transaction
    This is normal. The thing to do in this case is catch the error in the exception handler, rollback to a certain savepoint and try to do the update again.
    The stored procedure that I use to test this is:
    CREATE OR REPLACE PROCEDURE nm_test IS
    tmpVar NUMBER;
    err_num NUMBER;
    err_msg VARCHAR2(200);
    teller number;
    BEGIN
    teller := 0;
    savepoint sp1;
    <<try_every_thing_again>>
    begin
    tmpVar := 0;
    update stock_prices set price = price + 1
    where ric = 1;
    DBMS_OUTPUT.Put_Line('teller = ' || teller);
    EXCEPTION
    WHEN others THEN
    err_num := SQLCODE;
    --err_msg := SUBSTR(SQLERRM, 1, 200);
         if (err_num = -8177) then
              rollback to savepoint sp1;
              --DBMS_LOCK.SLEEP(1);
              teller := teller + 1;
              if (teller < 10) then
                   goto try_every_thing_again;
              end if;
              DBMS_OUTPUT.Put_Line('exception: teller = ' || teller);
         end if;
    end;
    END nm_test;
    I test this using 2 connections to the database. In the first connection I run the stored proc (without committing). Then I run the same stored proc in the second connection. This will block on the update (the is an implicit lock), which is ok. Then I commit the first connection. The second catches the error, rolls back and tries the update again....but then it catches the exception again, and again???
    When I replace the "rollback to savepoint" by just "rollback", everything works fine (the exception is then caught only once) and the update succeeds on the second try.
    But I can not work with just a "rollback" because my stored procedures might be called by others for which I don't want to undo all the work.
    Do any of you know why I keep getting this error (the program ends up in an infinite loop if I didn't keep a counter and exit after 10 times)?
    Marcel van Vuure

  • Oracle callable statement problems in weblogic 5.1

     

    Hi Benzi,
    Using Oracle arrays directly will not work because most of
    oracle object are not serializable. Not to mention, it's not standard.
    So the onlyt way to create arrays is using strored procedures.
    There are also array accessor methods supporting some oracle array
    extensions, though they are not supported officially and I think they could
    be avaialble in the next version of weblogic.
    Regards,
    Slava Imeshev
    "Benzi Galili" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi Ravi,
    Did you ever find a solution? We are running into the same problem withWLS 6.x,
    and it seems like we can't get it to use Oracle's thin JDBC properly froma pool
    configuration.
    Thanx,
    Benzi
    "Ravi Sundar" <[email protected]> wrote:
    e are using the TxDataSource obtained from weblogic connection pool.
    Details are shown below:
    weblogic.jdbc.connectionPool.oraclePool=\
    url=jdbc:oracle:thin:@sirius:1521:sirora,\
    driver=oracle.jdbc.driver.OracleDriver,\
    loginDelaySecs=0,\
    initialCapacity=2,\
    maxCapacity=50,\
    capacityIncrement=5,\
    allowShrinking=true,\
    shrinkPeriodMins=10,\
    refreshMinutes=5,\
    testTable=dual,\
    props=user=mrt3c;password=mrt3c
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.oraclePool=\
    everyone
    weblogic.allow.reset.weblogic.jdbc.connectionPool.oraclePool=\
    everyone
    weblogic.allow.shrink.weblogic.jdbc.connectionPool.oraclePool=\
    everyone
    weblogic.jdbc.TXDataSource.oracleDataSource=oraclePool
    Next we use the following to obtain a connection:
    private Connection getConnection() throws Exception{
    InitialContext lvObjCtx = new InitialContext();
    DataSource lvObjDs = (DataSource)lvObjCtx.lookup("oracleDataSource");
    return lvObjDs.getConnection();
    We need to pass an array as IN parameter to oracle stored
    procedure. We use the following code in a stateless session ejb:
    public Vector insertBranchDetails(int lvIntMapId, int lvIntBranchId,
    int
    lvIntHierarchyLevel, int lvIntRoleId, String[] lvStrArrBranchId, String[]
    lvStrArrBranchName, String[] lvStrArrBranchOrder, String[]
    lvStrArrStudentsWeight, String[] lvStrArrDescription, String[]
    lvStrArrTimeValue, String[] lvStrArrTimeUnits, String[]
    lvStrArrEditorsWeight, String[] lvStrArrExpertsWeight, String[]
    lvStrArrExpertsName, String lvStrUserId) throws RemoteException{
    OracleCallableStatement lvObjCs = null;
    Connection lvObjConn = null;
    try{
    lvObjConn = ConnectionPool.getConnection();
    lvObjCs = (OracleCallableStatement)lvObjConn.prepareCall("{call
    PROC_INS_UPD_BRANCHES_01(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
    ArrayDescriptor lvObjAs = new ArrayDescriptor("ARRAY_VARCHAR2_4000",
    lvObjConn);
    /* ARRAY_VARCHAR2_4000 is a SQLTABLE */
    ARRAY lvObjBranchId = new oracle.sql.ARRAY(lvObjAs, lvObjConn,
    lvStrArrBranchId);
    ARRAY lvObjBranchName = new oracle.sql.ARRAY(lvObjAs, lvObjConn,
    lvStrArrBranchName);
    ARRAY lvObjBranchOrder = new oracle.sql.ARRAY(lvObjAs, lvObjConn,
    lvStrArrBranchOrder);
    ARRAY lvObjStudentsWeight = new oracle.sql.ARRAY(lvObjAs, lvObjConn,
    lvStrArrStudentsWeight);
    ARRAY lvObjDescription = new oracle.sql.ARRAY(lvObjAs, lvObjConn,
    lvStrArrDescription);
    ARRAY lvObjTimeValue = new oracle.sql.ARRAY(lvObjAs, lvObjConn,
    lvStrArrTimeValue);
    ARRAY lvObjTimeUnits = new oracle.sql.ARRAY(lvObjAs, lvObjConn,
    lvStrArrTimeUnits);
    ARRAY lvObjEditorsWeight = new oracle.sql.ARRAY(lvObjAs, lvObjConn,
    lvStrArrEditorsWeight);
    ARRAY lvObjExpertsWeight = new oracle.sql.ARRAY(lvObjAs, lvObjConn,
    lvStrArrExpertsWeight);
    ARRAY lvObjExpertsName = new oracle.sql.ARRAY(lvObjAs, lvObjConn,
    lvStrArrExpertsName);
    lvObjCs.setInt(1, lvIntMapId);
    lvObjCs.setInt(2, lvIntBranchId);
    lvObjCs.setInt(3, lvIntHierarchyLevel);
    lvObjCs.setInt(4, lvIntRoleId);
    lvObjCs.setString(5, lvStrUserId);
    lvObjCs.setARRAY(6, lvObjBranchId);
    lvObjCs.setARRAY(7, lvObjBranchName);
    lvObjCs.setARRAY(8, lvObjBranchOrder);
    lvObjCs.setARRAY(9, lvObjStudentsWeight);
    lvObjCs.setARRAY(10, lvObjTimeValue);
    lvObjCs.setARRAY(11, lvObjTimeUnits);
    lvObjCs.setARRAY(12, lvObjDescription);
    lvObjCs.setARRAY(13, lvObjEditorsWeight);
    lvObjCs.setARRAY(14, lvObjExpertsWeight);
    lvObjCs.setARRAY(15, lvObjExpertsName);
    lvObjCs.registerOutParameter(16, Types.INTEGER);
    lvObjCs.registerOutParameter(17, Types.VARCHAR);
    lvObjCs.execute();
    int lvIntErrorNumber = lvObjCs.getInt(16);
    String lvStrErrorDescription = lvObjCs.getString(17);
    if((lvIntErrorNumber % 10) == 1){
    throw new AppServerException("Error Number: " + lvIntErrorNumber +
    Error Description: " + lvStrErrorDescription);
    Vector lvVecData = new Vector();
    lvVecData.addElement(new Integer(lvIntErrorNumber));
    lvVecData.addElement(lvStrErrorDescription);
    return lvVecData;
    }catch(Exception lvObjEx){
    throw new AppServerException(lvObjEx);
    }finally{
    try{
    if(lvObjCs != null){
    lvObjCs.close();
    if(lvObjConn != null){
    ConnectionPool.returnConnection(lvObjConn);
    }catch(Exception lvObjEx){
    When this method is called from the client we get the following error:
    java.lang.ClassCastException: weblogic.jdbc20.rmi.SerialCallableStatement
    This occurs when we try to cast the CallableStatement to
    OracleCallableStatement. Without casting to OracleCallableStatement
    we cannot pass arrays as IN parameters to oracle stored procedures.
    The method works well if we use the following code to obtain the
    connection:
    >>
    private Connection getConnection() throws Exception{
    Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    DriverManager.getConnection("jdbc:oracle:thin:@sirius:1521:sirora",
    "mrt3c", "mrt3c");
    But the problem is, this connection does not support transactions
    Please help

  • Oracle 11g Installation problems

    Hi there, Im a new Oracle's user, and I am trying to install Oracle 11g in my computer I have Windows Vista SP2 32bits, but I have a lot of problems.
    The program send me various messages of Warnings and Errors so I couldnt finished the complete instalation and configuration.
    Somebody can help me with some of this errors.
    This are the errors: (In Spanish)
    ORA-31011: Fallo en el analisis de XML
    ORA-19202: Se ha producido un error en el procesamiento
    ORA-06512: en "SYS.XMLTYPE", linea 272
    ORA-06512: en "XDB.XDB_CONFIGURATION", linea 69
    ORA-06512: en "XDB.DBMX_XDB", linea 209
    ORA-06512: en "XDB.XDB_CONFIGURATION", linea 92
    La configuración de Enterprise Manager ha fallado debido al
    siguiente error:
    Error al iniciar Database Control
    Consulte el archivo log en C:\oraclecfgtoollogsdbca\orc\emConfig.log para obtener mas información
    Posteriormente, puede reintentar la configuración de esta base de datos con
    Enterprise Manager ejecutando manualmente el archivo de comandos C:\oracle\product\11.1.0\db_1\bin\emca
    nstaller ha instalado productos en el grupo de componentes "Oracle Windows Interfaces".
    Para soportar un desarrollo perfecto en Microsoft Visual Studio con la base de datos Oracle,
    Oracle recomienda descargar e instalar la última versión de
    "Oracle Developer Tools for Visual Studio .NET" de Oracle Technology Network.
    I will aprecciatte your help.
    Thank you!

    user12191943 wrote:
    I have Windows Vista SP2 32bitsPlease specifiy WHICH edition of Vista. Oracle does have many problems with Vista Home.

  • Oracle 10g Installation Problem on SUSE Linux 10

    Hello Friends,
    I want to install SAP Solution Manager 7.0 with Oracle 10g on SUSE Linux 10.0.
    But, while starting the Installation i am getting following Errors.
    Starting Oracle Universal Installer...
    Checking installer requirements...
    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1,
    asianux-2 or SuSE-10
                                          Passed
    All installer requirements met.
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-04-22_03-59-38PM. Please wait ...
    Error in writing to directory /tmp/OraInstall2009-04-22_03-59-38PM. Please ensure that this directory is
    writable and has atleast 60 MB of disk space. Installation cannot continue.
    : Success
    I have checked the Permissions and the Size of /tmp Directory, which is as followed:
    drwxr-xr-x  11 root root    0 2009-04-22 21:19 sys
    drwxrwxrwt  52 root root 1824 2009-04-22 16:00 tmp
    drwxr-xr-x  15 root root  408 2009-04-19 14:43 usr
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/sda10             2104376     73112   2031264   4% /tmp
    I am starting the Oracle 10g Installation within orasm7 User which is a member of dba, users, disk groups.
    The directories which are created upon starting the Oracle Installation in /tmp directory are having the situations as followed:
    drwxr-xr-x 3 orasm7   dba          128 2009-04-21 18:41 OraInstall2009-04-21_06-41-14PM
    drwxr-xr-x 3 orasm7   dba          128 2009-04-21 18:41 OraInstall2009-04-21_06-41-25PM
    drwxr-xr-x 3 orasm7   dba          128 2009-04-22 15:59 OraInstall2009-04-22_03-59-38PM
    The Oracle Installation log is as follwoed:
    Using paramFile: /home/MyData/51031676/database/install/oraparam.ini
    Checking installer requirements...
    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1, asianux-2 or SuSE-10
                                          Passed
    All installer requirements met.
    The commandline for unzip:
    /home/MyData/51031676/database/install/unzip -qqq ../stage/Components/oracle.swd.jre/1.4.2.0.8
    /1/DataFiles/\*.jar -d /tmp/OraInstall2009-04-22_03-59-38PM
    I have set DISPLAY variable in this way before starting Installation:
    DISPLAY=$HOSTNAME:0.0
    export DISPLAY
    I tried to search the solution over the internet for this kind of problem, but i am not able to find its solution. Even i tried to start the Orale installation using this parameter: ./runInstaller ignoreSysPrereqs, but still it is giving the same unexpected error.
    I have a doubt on File/Directory permissions which are created for Installation in /tmp. The umask setiing of the system is 0022.
    Please, help me for this issue.
    Thanks & Regards,
    Bhavik G. Shroff

    Hi Markus,
    How are you ?
    Thank you very much for your reply.
    I was executing wrong runInstaller file. RUNINSTALLER is right file for starting the execution. But still i am facing the same error, which is as followed.
    Preparing response files. Please wait:
    ======================================
    Working on /home/MyData/51031676/database/SAP/SVRCUSTOM.RSP
    /home/MyData/51031676/database/SAP/SVRCUSTOM.RSP --> /tmp/.orainst_rsp.27450: Done
    Starting Oracle Universal Installer...
    Checking installer requirements...
    Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1, asianux-2 or SuSE-10
                                          Passed
    All installer requirements met.
    Preparing to launch Oracle Universal Installer from /home/orasm7/tmpora/OraInstall2009-04-22_05-25-26PM. Please wait ...
    Error in writing to directory /home/orasm7/tmpora/OraInstall2009-04-22_05-25-26PM. Please ensure that
    this directory is writable and has atleast 60 MB of disk space. Installation cannot continue.
    : Success
    SHROFF:~ # cd /home/orasm7/tmpora/
    SHROFF:/home/orasm7/tmpora # ll
    total 0
    drwxr-xr-x 3 orasm7 dba 128 Apr 22 17:25 OraInstall2009-04-22_05-25-26PM
    SHROFF:/home/orasm7/tmpora # cd OraInstall2009-04-22_05-25-26PM/
    SHROFF:/home/orasm7/tmpora/OraInstall2009-04-22_05-25-26PM # ll
    total 4
    drwxr-xr-x 2 orasm7 dba 304 Apr 22 17:25 images
    -rwxr-xr-x 1 orasm7 dba 504 Apr 22 17:25 installActions2009-04-22_05-25-26PM.log
    SHROFF:/home/orasm7/tmpora/OraInstall2009-04-22_05-25-26PM #
    I have a doubt on tmp_netca_file & tmp_dbca_file variable.
    Please give your suggestion for the same.
    Regards,
    Bhavik G. Shroff
    Edited by: Bhavik G. Shroff on Apr 22, 2009 2:10 PM

  • Oracle 10g installation problem on RHEL4

    hi,
    I am installing oracle 10g on red hat linux. I read the complete documentation and the mailing lists and have installed all the required RPMs.
    When I start install, I get the following three errors:
    error in invoking target 'install' of makefile
    'u/01/app/oracle/ctx/lib/ins_ctx.mk'.
    error in invoking target 'agent nmo nmb' of makefile
    'u/01/app/oracle/ctx/lib/ins_sysman.mk'.
    error in invoking target 'all_no_orcl' of makefile
    'u/01/app/oracle/ctx/lib/ins_rdbms.mk'.
    This error is popped up when the link part is going on. I am installing the standard edition and have done all the possible things mentioned in the documentation.
    Can someone pls help me understand where is the problem
    thanx in advance,
    jayesh

    i had the same sequence of errors on installing (10g on Redhat AS4)
    The first error (INFO: /usr/bin/ld: crt1.o: No such file: No such file or directory
    ) is solved by installing the following package (you need the glibc-devel i386 package installed as well as the x86_64 version)
    up2date --arch=i386 glibc-devel
    The second error, I am currently stuck at (error in invoking target agent nmo nmb...of makefile ins_sysman.mk)
    INFO: /app/oracle/oracle/product/10.2.0/db_1/lib32//libnls10.a(lmsagb.o)(.text+0xa3): In function `lmsagbcmt':
    : undefined reference to `SltsPrRead'
    /app/oracle/oracle/product/10.2.0/db_1/lib32//libnls10.a(lmsagb.o)(.text+0x10a):
    Any ideas, people, please?
    Cheerio,
    Nic

Maybe you are looking for