URGENT - ORA-01722 Causing Chaos!

A few days ago, our test server suddenly took a dislike to numeric-to-character comparisons e.g.
SELECT whatever
FROM my_table
WHERE my_char_column = 1;
This type of code is commonplace as we have a lookup table for decoding codes which, by its nature is entirely VARCHAR2 to encompass all data types that may be stored therein.
Somewhere on Google it suggested...
"Oracle will automatically convert a string to a number when a number-to-character comparison is made UNLESS there is an index on the string's column."
Indeed, an index was missing. This was restored and code like that above started to work again (as it had for years previously!).
However, today on our live server the same ORA-01722 errors suddenly started to occur (affecting most transactions). The software (Oracle Forms) has not changed and all indexes are intact. The longstanding code is similar to that above with the additional use of a TO_NUMBER function.
In SQL*Plus the following code logic works on our copy of the database as it was yesterday:
SELECT whatever
FROM my_table
WHERE TO_NUMBER(my_char_column) = 1
AND my_other_char_column = 'SOMETHING';
It doesn't work against today's database. The numerous parts of the system reporting the error are unchanged as far as the actual code is concerned.
The DBA people are confused (understandably) as they cannot recall doing anything of note to the database or the affected table.
Any suggestions would be greatly appreciated on what could have caused this behavioural cnange in Oracle.
Professor Yaffle

Many thanks - an interesting read.
Our DB is 8.1.7.4. It does all seem to point towards Oracle's optimisation - does this change its behaviour on the fly? I'll ask DBA explicitly whether CBO/RBO has been toggled (but surely they'd have mentioned that already). I know they tinkered with it a couple of years back with detrimental effect...
There are non-numeric values in my lookup table, due to its nature, but the conditions of the SQL statements have thus far suppressed the error.
I'd love to change all our code to live happily with the optimisation rules (i.e. compare like with like) but that will take time (months probably!) & all I'd like to acheive is to get the database behaving as it did yesterday.
NEWSFLASH: DBA suggests "someone analysed the table". Hmmm. Methinks the problem will soon strangely go away once affected table's optimisation method is restored to that of yesterday!
Grrr...

Similar Messages

  • Error Message - ORA-01722 Invalid Number

    Hello:
    I have the following situation. When I create an organization, a record is inserted into the following table, AGREEMENTS, and populates four fields.
    I have an update form which selects the organization from the AGREEMENTS table so the user can populate the rest of the table. In addition, on this form, there is a drop-down box which allows the user to select the name of a legal document along with the version of the document in which the user needs to select. This select list is created via an LOV joining three tables. The item name for this select list is :P6_DOCUMENT.
    The code for the LOV is:
    SELECT S.DOC_NAME||' - '|| O.VERSION_NO AS DOC, O.ORG_DOC_CURR_KEY
    FROM SUPPORTING_DOCS S,
         ORG_DOC_CURR_VER O,
         AGREEMENTS H
    WHERE
        S.DOC_TYPE = 'HISA'
    AND S.SUPPORTING_DOC_KEY = O.SUPPORTING_DOC_KEY
    AND H.ORG_KEY_LE = O.ORG_KEY
    AND O.ORG_KEY=:P6_ORG_KEY_LEWhen the user completes the form, the SUBMIT process is a PL/SQL block consisting of an UPDATE statement to update the AGREEMENTS table based on the selected organization and an INSERT statement to insert a record into the AGREEMENTS_DOC table to store the value stored in :P7_DOCUMENT.
    Ok, now here is where my problem starts.
    When I first bring up the form and I select the organization I want to update, I click the Search button to find the organization and I receive the following error message: ORA-01722 Invalid Number.
    At this point all I'm doing is a basic search. There is no insert/update or anything going on. I'm not understanding why I would be receiving this error message.
    The search is based on the database column ORG_KEY_LE whose datatype is NUMBER.
    In my application, the item assigned to ORG_KEY_LE is P6_ORG_KEY_LE.
    I have a PL/SQL block process created (On Load-Before Header) in the Page Rendering area of my page definition. The PL/SQL code that is written is:
    BEGIN
    IF :P6_SEARCH_ORG != '0' THEN
    :P6_ORG_KEY_LE := :P6_SEARCH_ORG;
    END IF;
    END;I then have an Item created, :P6_SEARCH_ORG, which is a Select List. In the LOV portion of the page for this item, I have the following:
    select ORG_KEY_LE display_value, ORG_KEY_LE return_value
    from AGREEMENTS
    order by 1The reason for using this table is because this table contains the newly created organization which needs to be updated with the remaining columns of data.
    I then have a Search button in the Button area which has the following settings:
    Button Position: Region Template Position #CHANGE#.
    Condition Type: Value of Item in Express 1 is NULL.
    Expression 1: :P6_ORG_KEY_LE.
    To troubleshoot this problem, I created two pages, one page to do the UPDATE and the second page to do the INSERT.
    The SEARCH functionality in both pages are identical.
    When I run my UPDATE page, which only involves updating the missing fields, the process works. I have my search box, I'm able to search for the organization, make my updates, and I'm good.
    When I run my INSERT page, which involves inserting the record with the assigned document, I receive the error message after I click the SEARCH button. In order to INSERT the record into this table, I first need to SELECT the organization that was UPDATED in the AGREEMENTS table (using the UPDATE page described in above paragraph). When I select the organization, the user can then assign the appropriate legal document to the organization and insert the record into the AGREEMENTS_DOC table.
    Can someone help me with this error message? I'm not sure why I am able to perform my SEARCH on a page with the UPDATE statement, not able to perform the SEARCH on the page with my INSERT statement, and not be able to perform the SEARCH on the page that combines the UPDATE and INSERT statements.
    I did some more troubleshooting and I do believe my SUBMIT process which contains the INSERT statement is the issue. I created a fourth page which doesn't have a SUBMIT process. I brought up the form, searched for my organization and the information for that organization appeared. The problem is definately with my UPDATE/INSERT process.
    The PL/SQL block for the Submit process is the following:
    BEGIN
    update
        MDD.HISA_AGREEMENTS
         set
           LAST_UPDATED_BY=V('APP_USER'),
           APPROVER_SALUTATION=:P6_APPROVER_SALUTATION,
           APPROVER_FIRST_NAME=:P6_APPROVER_FIRST_NAME,
           APPROVER_MIDDLE_INITIAL=:P6_APPROVER_MIDDLE_INITIAL,
           APPROVER_LAST_NAME=:P6_APPROVER_LAST_NAME,
           APPROVER_NAME_SUFFIX=:P6_APPROVER_NAME_SUFFIX,
           APPROVER_EMAIL_ADDR=:P6_APPROVER_EMAIL_ADDR,
           SPONSOR_EMAIL_ADDR=:P6_SPONSOR_EMAIL_ADDR,
           APPROVER_TITLE=:P6_APPROVER_TITLE
    where
          ORG_KEY_LE=:P6_ORG_KEY_LE
    INSERT INTO
        HISA_AGREEMENT_DOCS
          (HISA_AGREEMENT_DOC_KEY,
           ORG_KEY_LE,
           APPLICATION_KEY,
           STATUS,
           STATUS_DATE,
           CREATED_BY,
           ORG_DOC_CURR_KEY)
    VALUES
          (HISA_AGREEMENT_DOC_KEY_SEQ.NEXTVAL,
           :P6_ORG_KEY_LE,
           :P6_APPLICATION_KEY,
           'C',
           SYSDATE,
           V('APP_USER'),
           :P6_DOCUMENT)
    END;There is something wrong with the above statement and I do not understand what it could be. Can someone help?
    Thanks for the help.

    Hi,
    I believe you are on to something.
    The select list for item :P6_DOCUMENT appears when I first bring up the form. When I select my organization and receive the error message, I clicked on the Session in the Developer's bar. The value in item/field :P6_DOCUMENT shows %null%.
    This is the path in which my user would like to accomplish her task:
    1. Select an organization
    2. Display the information for that organization from the AGREEMENTS table
    3. Enter the data for the remaining fields in the AGREEMENTS table
    4. Select the document (:P6_DOCUMENT) from the drop-down.
    5. Click Submit
    6. Update the AGREEMENTS table with data entered in #3.
    7. Insert a record into the AGREEMENTS_DOC table with the selection from #4.
    Somehow I need the :P6_DOCUMENT field not to show the %null% during the SEARCH functionality. I think that is causing the problem.
    How do I fix this?

  • Varchar to number returns a ORA-01722-Invalid Number error

    I have a script where i am converting a varchar to number to be compared against a number.
    (To_Number(p.result_value,'999999.99') < 0 OR p.result_value < 0)
    this particular line is causing the error ORA-01722-Invalid Number.
    Is there any ideas as to why this happens and how I can resolve?
    Thanks in advance!

    The result_value column in Pay_Run_Result_Values is a varchar2 field.
    So you need to put in some additional logic to make sure that the row is having numbers alone before doing to_number.
    Cheers
    Ganesh

  • Oracle SQL Developer 1.1.1.25.14, I rror ORA-01722 Invalid Number

    I have installed the new version of Oracle SQL Developer 1.1.1.25.14, I use Oracle 9.2. When I browse in the tree of the stored procedures and compile I obtain Error ORA-01722 Invalid Number. The previous version does not give this error. I have tried to change the decimal separator to comma ',' and point '.' but this error always appears.

    create or replace
    PROCEDURE getAge (
    dtmDataStart_in IN DATE,
    dtmDataEnd_in IN DATE,
    intYears_out OUT NUMBER,
    intMonths_out OUT NUMBER,
    intDays_out OUT NUMBER) AS
    -- Calcola il numero di anni, mesi, giorni intercorsi
    -- dalla data iniziale alla data finale.
    -- Se la data iniziale è > della data finale, le due date
    -- vengono scambiate e le variabili di output vengono ritornate
    -- con segno negativo.
    --==================================================
    -- Data Ultima Modifica: 31/07/98
    -- Aggiunta procedura per il calcolo della differenza tra
    -- due date dello stesso anno.
    --==================================================
    -- DICHIARAZIONE VARIABILI INIZIO --------------------------------------------------------
    intYMDStart NUMBER(10);
    intYMDEnd NUMBER(10);
    intYMD NUMBER(10);
    intDiffAnni NUMBER(5);
    intDiffMesi NUMBER(5);
    intDiffGiorni NUMBER(5);
    intMeseStart NUMBER(5);
    intAnnoStart NUMBER(5);
    intTotGiorniMeseStart NUMBER(5);
    ysnNegativo NUMBER(5);
    -- DICHIARAZIONE VARIABILI FINE ----------------------------------------------------------
    BEGIN
    intYMDStart := TO_NUMBER( TO_CHAR(dtmDataStart_in,'YYYYMMDD'));
    intYMDEnd := TO_NUMBER( TO_CHAR(dtmDataEnd_in,'YYYYMMDD'));
    ysnNegativo := 0;
    IF intYMDStart = intYMDEnd THEN
    intYears_out := 0;
    intMonths_out := 0;
    intDays_out := 0 ;
    ELSE
    IF intYMDStart > intYMDEnd THEN
    intYMD := intYMDStart;
    intYMDStart := intYMDEnd;
    intYMDEnd := intYMD;
    ysnNegativo := -1;
    END IF;
    intDiffAnni := TO_NUMBER(TO_CHAR(dtmDataEnd_in,'YYYY')) - TO_NUMBER(TO_CHAR(dtmDataStart_in ,'YYYY'));
    intDiffMesi := TO_NUMBER(TO_CHAR(dtmDataEnd_in,'MM')) - TO_NUMBER(TO_CHAR(dtmDataStart_in ,'MM'));
    intDiffGiorni := TO_NUMBER(TO_CHAR(dtmDataEnd_in,'DD')) - TO_NUMBER(TO_CHAR(dtmDataStart_in ,'DD'));
    -- I valori cosi' calcolati di intDiffAnni, intDiffMesi e intDiffGiorni vanno bene
    -- ad eccezione dei seguenti casi:
    -- Sistemo intDiffAnni
    IF (intDiffMesi > 0 OR (intDiffMesi = 0 AND intDiffGiorni >= 0)) THEN
    -- intDiffAnni e' OK
    intDiffAnni := intDiffAnni;
    ELSE
    -- non e' ancora arrivato il giorno del compleanno
    intDiffAnni := intDiffAnni-1;
    END IF;
    -- Sistemo intDiffMesi
    IF (intDiffMesi > 0 AND intDiffGiorni < 0) THEN
    intDiffMesi := intDiffMesi-1;
    ELSIF (intDiffMesi < 0 ) THEN
         if(intDiffGiorni<0) THEN
         intDiffMesi := intDiffMesi+11;
    else
         intDiffMesi := intDiffMesi+12;
    END IF;
    ELSIF (intDiffMesi=0 AND intDiffGiorni<0) THEN
         intDiffMesi:=11;
    END IF;
    -- Sistemo intDiffGiorni
    -- Calcolo i giorni come (TotGiorniMeseIniziale - GiornoIniziale) + (GiornoFinale - 0)
    -- che e' uguale a fare TotGiorniMeseIniziale + (GiornoFinale-GiornoIniziale)
    IF intDiffGiorni < 0 THEN
    intMeseStart := TO_NUMBER(TO_CHAR(dtmDataStart_in ,'MM'));
    IF intMeseStart IN (1,3,5,7,8,10,12) THEN
    intTotGiorniMeseStart := 31;
    ELSIF intMeseStart = 2 THEN
    -- Da enciclopedia: sono bisestili gli anni multipli di 4
    -- esclusi i secoli che non sono multipli di 400 (Parte commentata).
    intAnnoStart := TO_NUMBER(TO_CHAR(dtmDataStart_in ,'YYYY'));
    if (intAnnoStart MOD 4) = 0
    -- AND NOT ((intAnnoStart MOD 100) = 0 AND (intAnnoStart MOD 400) <> 0)
    Then
    intTotGiorniMeseStart := 29;
    else
    intTotGiorniMeseStart := 28;
    end if;
    ELSIF intMeseStart IN (4,6,9,11) THEN
    intTotGiorniMeseStart := 30;
    END IF;
    intDiffGiorni := intDiffGiorni + intTotGiorniMeseStart;
    END IF;
    IF ysnNegativo = 0 THEN
    intDays_out := intDiffGiorni;
    intMonths_out := intDiffMesi;
    intYears_out := intDiffAnni;
    ELSE
    intDays_out := intDiffGiorni * (-1);
    intMonths_out := intDiffMesi * (-1);
    intYears_out := intDiffAnni * (-1);
    END IF;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END getAge;
    The output result of compilation is "GETAGE Compiled", I think the 01722 error is not caused from an sql syntax error, but probably caused from an invalid or unsupported or 'strange' configuration on nationalization... the fact surprises me that the previous version did not give problems
    THANKS SO MUTCH
    */

  • ORA-01722 when upgrading

    Hi,
    on Win 2003 I'm updating a 10.2.0.1 to 11g using Database upgrade assistant (start/program/ora 11g /...) and it fails with ORA-01722. I looked at logs and found in C:\app\Administrateur\cfgtoollogs\dbua\orcl\upgrade2\Oracle_Server.log:
    The following statement will cause an "ORA-01722: invalid number"
    DOC>     error if the user running this script is not SYS.  Disconnect
    DOC>     and reconnect with AS SYSDBA.It is suggested then to connect as sysdba. How can I connect as sysdba when I'm running upgrade assistant in windows ? Has it any sens this solution ? Even if you start dbua in command line you can not be sys as sysdba since you are windows user (in my case Windows Administrator) ?
    Thanks for help.

    Hi...
    have you started the database with upgrade option???
    Refer to metalink doc id:-Doc ID: 435536.1
    HTH
    Anand

  • Microsoft Access shows "ORA-01722: Invalid number"

    Hi,
    I have seen a previous post on this problem, but none of the tips applied to my situation, so I'm asking again.
    I'm accesing Oracle 8i Personal (German Version) with Access 2002 (latest SP, on a computer with Windows 2000). Please note that I installed the latest ODBC driver from Oracle (8.1.7.6.0). When I create a table which has, say, a NUMBER(10,3) field in it, and I link it into Access using the ODBC driver, I cannot enter numbers like "1,23" into the table. The error "ORA-01722: Invalid number" is shown and the INSERT fails. If I enter the numbers like "1.23", the resulting field value is "123". The
    problem occurs, whether I use the table view, a form or VBA via ADO. Pass-Through queries (over ADO's QueryDef facility) work, however. The decimal separator is "," in both Windows and Oracle. With normal NUMBER fields everything works fine.
    When looking at the SQL log it turns out, that Access hands out a string to the ODBC driver and relies on the driver to convert it to a number. Regardless of the locale set in Windows, Access uses the dot ('1.23') as decimal separator for this string. The German version of oracle wants a comma as decimal separator as in "INSERT INTO TEST VALUES ('1,23')". From a previous post I know that ODBC specifies that all numbers must use the dot, regardless of the locale setting. So it turns out, the Oracle ODBC driver is causing the problem, not Access. But, anyway, this problem could easily be fixed by adding a "Workaround option" to the ODBC driver, that always converts dots in numbers to commas before handing it out to the backend. Another option would be, that the ODBC driver does this decision automatically by asking the backend, which separator it wants.
    Any comments greatly appreciated.
    Best regards
    Markus

    This is actually a duplicate of bug# 1938991 which says:
    "A 'Numeric settings' option has been added to the Application Options page of the ODBC Configuration screen so that the user can choose what numeric settings will be used in receiving and returning numeric data that is bound as strings. This option allows the user to choose Oracle NLS settings (the default setting and the behavior in former releases), Microsoft default regional settings (to provide a way to mirror the Oracle OLE DB driver's behavior for greater interoperability) and US numeric settings, which are necessary when using MS Access or DAO in non-US environments. In this case, setting the Numeric settings to US settings should resolve the issue, since DAO is expecting the data in US format."
    Apparently the fixed release is 9.2.0.2, 9.0.1.4 or 8.1.7.7 depending on your client version.

  • ORA-20006: ORA-01722: invalid number ORA-06512: at "APPS.WF_NOTIFICATION"

    Hi,
    I am having a wft program, which checks a function activity and depending on the value returned sends difference notifications.
    The package body completed successfully from backend and while running the workflow program it sends a notification also. But while opening the notification it gives the following error,
    ORA-20006: ORA-01722: invalid number ORA-06512: at "APPS.WF_NOTIFICATION", line 5328 ORA-06512: at line 5
    I have 3 procedures in my package body and all the 3 procedures have exceptions defined as follows, if they are using any workflow activities.
    ==========================================================
    EXCEPTION
         WHEN OTHERS THEN
              WF_CORE.context (
              'WFCustCheck',
              'MisCustDataFromTableDoc',
              document_id,
              display_type,
              document,
              document_type,
              SQLERRM
    RAISE_APPLICATION_ERROR (-20006, SQLERRM);
    ==========================================================
    But I am not able to figure out what is causing this error. What does this "line 5328 ORA-06512: at line 5" in the error message indicate?. My package body has only 600 lines. And why is the error message not displaying the procedure name? though I have defined the procedure name in the exception.
    What is the best way to get the procedure name in the error message? So that it becomes easier for identifying which procedure is causing the erro?
    Please let me know.
    Thanks

    Hi,
    Instead of the RAISE_APPLICATION_ERROR command, just replace that with RAISE;
    The error is coming out of the package that is sending the notification (WF_NOTIFICATION), which is invoked when you open the notification. I'm guessing that line 5 is the line in your code though.
    Are you using documents to send the notification, or are they purely defined in the .wft file?
    Matt
    Alpha review chapters from my book "Developing With Oracle Workflow" are available on my website:
    http://www.workflowfaq.com
    http://forum.workflowfaq.com
    NEW! - WorkflowFAQ Blog at http://thoughts.workflowfaq.com

  • ORA-01722: invalid number when updating a CMP bean, SP10 WebLogic_RDBMS.jar problem?

    Hi guys
    We are having a problem with the migration to WLCS 3.2 SP2 / WLS 5.1 SP10.
    We are moving from WLCS 3.2 and WLS SP6. Our CMP beans generate errors when
    the container tries to update them. They deploy without error though.
    See below for the stack trace
    We use the recommended weblogic driver for our Oracle 8.1.7.0 database. WL
    runs on w2k, and Oracle on Solaris 7.
    Extract from set-environment:
    SET DB_CLASSPATH=
    SET PATH=%PATH%;%WEBLOGIC_HOME%\bin\oci815_8;%WLCS_ORACLE_HOME%\bin
    SET
    SQLPATH=C:\WebLogicCommerceServer3.2\db\oracle816;C:\WebLogicCommerceServer3
    .2\db\oracle816\event;
    Extract from weblogic.properties:
    weblogic.jdbc.connectionPool.commercePool=\
    url=jdbc:weblogic:oracle,\
    driver=weblogic.jdbc.oci.Driver,\
    I made a few experiments, and I noticed that generating the CMP classes
    (with EJBC) with the old WebLogic_RDBMS.jar (from WLS SP6) is working fine.
    Here is what I mean : ejbc uses the library
    c:\weblogic\lib\persistence\WebLogic_RDBMS.jar And this library has changed
    with SP10. However since that change and after rebuilding our jars, all CMP
    entity beans fail to update.
    If I just replace that WebLogic_RDBMS.jar with the previous one (from SP6),
    and without changing anything else, our CMP beans work fine. I did not
    change any driver or xml deployment descriptor.
    One of the generated files in the jar (for our bean
    VisibilityPSWebLogic_CMP_RDBMS.class) differs, and that seems to be the
    cause of the problem.
    I jadded that class and here is a difference I notice:
    OLD, ejbc ran with SP6 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId =
    (BigDecimal)resultset.getObject(5);
    NEW, ejbc ran with SP10 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId
    = resultset.getBigDecimal(5, 35);
    Similar differences for the SETbigdecimal.
    Dunno if that will help, but I'm attaching the 2 jar files with explicit
    names.
    Damn that was long, I hope someone will read it... Thanks for any help on
    this, see stack trace attached below
    Nicolas Lejeune
    Stack trace:
    mer. oct. 03 12:16:22 CEST 2001:<I> <EJB JAR deployment
    C:/WebLogicCommerceServer3.2/lib/foundation.jar> Exception in
    non-transactional EJB invoke:
    java.rmi.UnexpectedException: Unexpected exception in
    com.b2boost.visibility.VisibilityBean.getVisibilityId():
    java.sql.SQLException: ORA-01722: invalid number
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java:980)
    at
    weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
    47)
    at
    com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.update(VisibilityPSWeb
    Logic_CMP_RDBMS.java:446)
    at
    com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.store(VisibilityPSWebL
    ogic_CMP_RDBMS.java:376)
    at
    weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
    at
    weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
    a:227)
    at
    weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
    a:355)
    at
    weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
    at
    com.b2boost.visibility.VisibilityBeanEOImpl.getVisibilityId(VisibilityBeanEO
    Impl.java:198)
    at
    com.b2boost.visibility.pipeline.LoadFirstVisibilityRequestPC.process(LoadFir
    stVisibilityRequestPC.java:83)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImpl.process(Pipelin
    eExecutorImpl.java:193)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl.process(P
    ipelineExecutorImplEOImpl.java:56)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl_ServiceSt
    ub.process(PipelineExecutorImplEOImpl_ServiceStub.java:154)
    at
    com.beasys.commerce.webflow.PipelineProcessor.callPipeline(PipelineProcessor
    .java:170)
    at
    com.beasys.commerce.webflow.PipelineProcessor.process(PipelineProcessor.java
    :102)
    at
    com.beasys.commerce.webflow.WebflowAdvisor.handleTarget(WebflowAdvisor.java:
    409)
    at
    com.beasys.commerce.webflow.WebflowAdvisor.processTarget(WebflowAdvisor.java
    :156)
    at
    com.b2boost.framework.B2boostPortalDestinationDeterminer.determineDestinatio
    n(B2boostPortalDestinationDeterminer.java:208)
    at
    com.beasys.commerce.foundation.flow.FlowManager.service(FlowManager.java:438
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    [Visibility_generated_with_SP6_weblogic_rdbms_jar.jar]
    [Visibility_generated_with_SP10_weblogic_rdbms_jar.jar]

    You are using WebLogic jDriver for Oracle which needs exact version of OCI API, that comes with the Oracle client installation. Ensure that you have installed the right Oracle client version. And updated the PATH properly.
    I notice that you have
    bin/oci815_8
    oracle816
    Thsi looks liek the inconsistency in your environment.
    What you need to do is
    1. find oci817_8 and place that in the PATH.
    2. install oracle 817 and use that client and set the ORACLE_HOME environment variable and the PATH properly.
    Try this and see if it helps.
    BTW - WLS 5.1 is EOL

  • ORA-01722 when executing a procedure

    I am executing a procedure in a package thru a nightly database job. This job has been working fine for the last several months. However recently it started abending with a ORA-01722 error. No changes have been made to the code. The procedure code follows:
    PROCEDURE p_start_batch_merge_sites IS
    p_batch_site_id tf_batch_merge_sites.master_site_id%TYPE;
    p_batch_sub_site_id tf_batch_merge_sites.subordinate_site_id%TYPE;
    p_batch_sub_site_name tf_batch_merge_sites.subordinate_site_name%TYPE;
    v_error number;
    CURSOR batch_merge_sites_cur is
    Select master_site_id, subordinate_site_id, subordinate_site_name
    from tf_batch_merge_sites
    where merge_Date_time is null;
    BEGIN
    OPEN batch_merge_sites_cur;
    LOOP
    FETCH batch_merge_sites_cur into
    p_batch_site_id, p_batch_sub_site_id, p_batch_sub_site_name;
    EXIT WHEN batch_merge_sites_cur%NOTFOUND;
    pkg_tf_merge_sites.p_merge_sites(p_batch_site_id, p_batch_sub_site_id);
    select sql_err_no into v_error
    from tf_merge_log
    where id = (select max(id) from tf_merge_log);
    IF v_error <>0 then
    close batch_merge_sites_cur;
    update tf_batch_merge_sites
    set error_message_text = 'Error in Batch Merge'
    where master_site_id = p_batch_site_id
    and subordinate_site_id = p_batch_sub_site_id;
    ELSE
    update tf_batch_merge_sites
    set error_message_text = 'Batch Merge Sites Successfully Completed',
    merge_date_time = sysdate
    where master_site_id = p_batch_site_id
    and subordinate_site_id = p_batch_sub_site_id;
    pkg_tf_merge_sites.p_delete_subordinate (p_batch_site_id, p_batch_sub_site_id, p_batch_sub_site_name);
    END IF;
    END LOOP;
    CLOSE batch_merge_sites_cur;
    END;
    One call in this procedure passing 2 number fields works ok:
    pkg_tf_merge_sites.p_merge_sites(p_batch_site_id, p_batch_sub_site_id);
    The call that is abending is passing the same 2 number fields as the above call, plus a varchar2 name field.
    pkg_tf_merge_sites.p_delete_subordinate (p_batch_site_id, p_batch_sub_site_id, p_batch_sub_site_name);
    The table structure for the tf_batch_merge_sites is as follows:
    SQL> desc tf_batch_merge_sites
    Name Null? Type
    MASTER_SITE_ID NOT NULL NUMBER(12)
    MASTER_SITE_NAME NOT NULL VARCHAR2(60)
    SUBORDINATE_SITE_ID NOT NULL NUMBER(12)
    SUBORDINATE_SITE_NAME NOT NULL VARCHAR2(60)
    MERGE_DATE_TIME DATE
    ERROR_MESSAGE_TEXT VARCHAR2(100)
    REVISION_USER_NAME NOT NULL VARCHAR2(30)
    REVISION_DATE_TIME NOT NULL DATE
    p_delete_subordinate procedure:
    PROCEDURE p_delete_subordinate(
    p_site_id IN NUMBER,
    p_subordinate_site_id IN NUMBER,
    p_site_name IN VARCHAR2
    IS
    -- PROCEDURE: p_delete_subordinate
    -- NOTES: Deletes the subordinate site after merging with the master site.
    -- HISTORY:
    -- 05-01-2003 BSS Created.
    v_batchid NUMBER;
    CURSOR subordinate_site_cur(
    p_subordinate_site_id NUMBER
    IS
    SELECT rid
    FROM se_i_entities
    WHERE id = p_subordinate_site_id
    AND entity_type = 'SITE';
    BEGIN
    BEGIN
    INSERT INTO tf_merge_sites
    (site_id,
    merged_site_id,
    merged_site_name
    VALUES (p_site_id,
    p_subordinate_site_id,
    p_site_name
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END;
    DELETE FROM tf_site_aliases
    WHERE primary_site_id = p_subordinate_site_id;
    -- OR secondary_site_id = p_subordinate_site_id;
    DELETE FROM tf_former_site_names
    WHERE site_id = p_subordinate_site_id;
    FOR k IN subordinate_site_cur(p_subordinate_site_id)
    LOOP
    DELETE FROM se_i_entity_relationships
    WHERE entity_rid_2 = k.rid
    AND entity_type_2 = 'SITE';
    END LOOP;
    DELETE FROM se_i_entities
    WHERE id = p_subordinate_site_id
    AND entity_type = 'SITE';
    DELETE FROM tf_sites
    WHERE site_id = p_subordinate_site_id;
    DELETE FROM e_masters
    WHERE id = p_subordinate_site_id;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END;
    I've looked at the data and it looks fine. Does anyone have any idea why I would get this message after it has been running fine for several months?
    Thanks!!
    Shellie Bricker

    ORA-01722: invalid number
    Cause: The attempted conversion of a character string to a number failed because the character string was not a valid numeric literal. Only numeric fields or character fields containing numeric data may be used in arithmetic functions or expressions. Only numeric fields may be added to or subtracted from dates.
    Action: Check the character strings in the function or expression. Check that they contain only numbers, a sign, a decimal point, and the character "E" or "e" and retry the operation.
    Maybe you have bad data?

  • ORA-01722 happen when using the cursor

    This is my cursor declaration:
    CURSOR cP_PROFILE_SKU_ID(pBusiness_partner_id IN BUSINESS_PARTNER.BUSINESS_PARTNER_ID%TYPE,
    pClient VARCHAR2 ) IS
    SELECT record_id
    FROM pending_changes
    WHERE UPPER(field_name) = 'BUSINESS_PARTNER_ID'
    AND UPPER(table_name) = 'PROFILE_SKUS'
    AND client = pClient
    AND approved_code = 'P'
    AND pending_value = pBusiness_partner_id;
    When I try to user this cursor:
    FOR rP_PROFILE_SKU_ID IN cP_PROFILE_SKU_ID(pBusiness_partner_id => rBusiness_partner.business_partner_id,
    pclient =>rBusiness_partner.client) LOOP
    END LOOP;
    The error showed:
    ORA-01722
    Even there is no any record in this cursor
    Thanks
    Chen Zhang

    Hi,
    I think the datatypes / data contents are not matching while passing parameters in the cursor.
    ORA-01722: invalid number
    Cause: The attempted conversion of a character string to a number failed because the character string was not a valid numeric literal. Only numeric fields or character fields containing numeric data may be used in arithmetic functions or expressions. Only numeric fields may be added to or subtracted from dates.
    Action: Check the character strings in the function or expression. Check that they contain only numbers, a sign, a decimal point, and the character "E" or "e" and retry the operation.
    Thanks,
    Biswa.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by chen_zhang:
    This is my cursor declaration:
    CURSOR cP_PROFILE_SKU_ID(pBusiness_partner_id IN BUSINESS_PARTNER.BUSINESS_PARTNER_ID%TYPE,
    pClient VARCHAR2 ) IS
    SELECT record_id
    FROM pending_changes
    WHERE UPPER(field_name) = 'BUSINESS_PARTNER_ID'
    AND UPPER(table_name) = 'PROFILE_SKUS'
    AND client = pClient
    AND approved_code = 'P'
    AND pending_value = pBusiness_partner_id;
    When I try to user this cursor:
    FOR rP_PROFILE_SKU_ID IN cP_PROFILE_SKU_ID(pBusiness_partner_id => rBusiness_partner.business_partner_id,
    pclient =>rBusiness_partner.client) LOOP
    END LOOP;
    The error showed:
    ORA-01722
    Even there is no any record in this cursor
    Thanks
    Chen Zhang<HR></BLOCKQUOTE>
    null

  • EXECUTE IMMEDIATE ORA-01722 invalid number

    hi all
    i have a plsql procedure in which the following statement which gives this error ORA-01722: invalid number
    sql_stmt :='UPDATE Student set '||stu_gradefor||'=TO_NUMBER('||stu_marks||') where UserID='||stu_UID;
    EXECUTE IMMEDIATE sql_stmt;
    here all variables (stu_marks,stu_gradefor and stu_UID) are varchar2 coming from different procedure(form) but in the table named Student column HW1 (stu_gradefor) is of datatype number.
    I have tried a lot but could not make it to work. Is it that we cannot enter an number through EXECUTE IMMEDIATE? If Possible can somebody help me with this?
    Thanks a lot.
    Regards
    Jyoti

    create table Student(UserID varchar2(8) not null, HW1 number(3) , HW2 number(3) , PA1 number(3) , ................);
    create table Domain(R_Domain varchar2(11) not null, R_Status char(1) not null, R_Date Date null,R_Value varchar2(11) null, R_Mean varchar2(300) not null);
    insert into Domain( R_Domain, R_Status, R_Value, R_Mean )values(
         'Term','t','PA1','First Programming Assignment');
    Full names for HW1, HW2, PA1....are in the Domain table. so in variable stu_gradefor we get the R_Value.
    this is true :variable stu_marks is not actually a number, so the TO_NUMBER is causing the error. stu_marks is of datatype varchar2 but the field HW1,.. are all expecting a numeric value.
    i tried SELECT TO_NUMBER(stu_marks) INTO gmark FROM DUAL;
    sql_stmt :='UPDATE Student set '||stu_gradefor||'=(:1) where UserID='||stu_UID;
    EXECUTE IMMEDIATE sql_stmt using gmark;
    where gmark is a number but noting works.same error
    This can be true:the column userid is a varchar2 column with a mix of numeric and alpha numeric values. userid value that i inserted was'12345678'
    i there any other way to handle this situation?
    Thanks for replying
    Jyoti

  • Oralce Error - ORA-01722 WARN  [org.hibernate.dialect.Oracle9Dialect]

    Hi.
    i want to know meaning of following Error and how to remove it.
    ORA-01722
    WARN [org.hibernate.dialect.Oracle9Dialect] The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead
    Regards,
    Pradeep Kr. Sharma
    Edited by: user13389551 on Jul 12, 2010 11:27 PM
    Edited by: user13389551 on Jul 13, 2010 3:26 AM

    ORA-01722: invalid number
    Cause: The attempted conversion of a character string to a number failed because the character string was not a valid numeric literal. Only numeric fields or character fields containing numeric data may be used in arithmetic functions or expressions. Only numeric fields may be added to or subtracted from dates.
    Action: Check the character strings in the function or expression. Check that they contain only numbers, a sign, a decimal point, and the character "E" or "e" and retry the operation.

  • ORA-01722: Nombre non valide

    Hi community,
    so here's my problem: I tried to create a cube with pentaho workbench ( Business Intelligence tool) unfortunately the cube doesn't appear.
    The error is :
    Caused by: java.sql.SQLException: ORA-01722: Nombre non valide ( unvalid number)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
         at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1061)
         at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1273)
         at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
         at mondrian.rolap.SqlStatement.execute(SqlStatement.java:175)
         ... 28 more
    As a remark, the type of my measure in the DB is NUMBER(12,0) and in the cube is integer.
    Please help me to find the prb and solve it :'(((
    Edited by: 1008555 on 29 mai 2013 01:54

    1008555 wrote:
    Hi community,
    so here's my problem: I tried to create a cube with pentaho workbench ( Business Intelligence tool) unfortunately the cube doesn't appear.
    The error is :
    Caused by: java.sql.SQLException: ORA-01722: Nombre non valide ( unvalid number)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
         at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:946)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1061)
         at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1133)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1273)
         at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
         at mondrian.rolap.SqlStatement.execute(SqlStatement.java:175)
         ... 28 more
    As a remark, the type of my measure in the DB is NUMBER(12,0) and in the cube is integer.
    Please help me to find the prb and solve it :'(((
    Edited by: 1008555 on 29 mai 2013 01:54Any particular reason you choose an Oracle database general forum for your question?
    I would recommend posting your question in a Pentaho forum.
    http://forums.pentaho.com/forum.php?s=5c67419824e4a6934717a4b04447a611
    Cheers,

  • Designer 4.1.1 error message ora-01722 at 'open down '

    Message
    ORA-01722: YA
    Message
    RME-02124: Failed to execute SQL statement:
    select obj.id, obj.ivid, obj.name, obj.element_type_name , obj.diagram_type
    from CI_DIAGRAMS obj, ci_folder_members fm, ci_container_elements cel
    where fm.member_object = obj.id and cel.ivid = fm.parent_ivid and cel.id = :containerID and OBJ.DIAGRAM_TYPE in ( 'BPA')
    and OBJ.SUB_DIAGRAM_ID = 1974593597164206331699600463368029410order by 2

    Hi,
    I believe you are on to something.
    The select list for item :P6_DOCUMENT appears when I first bring up the form. When I select my organization and receive the error message, I clicked on the Session in the Developer's bar. The value in item/field :P6_DOCUMENT shows %null%.
    This is the path in which my user would like to accomplish her task:
    1. Select an organization
    2. Display the information for that organization from the AGREEMENTS table
    3. Enter the data for the remaining fields in the AGREEMENTS table
    4. Select the document (:P6_DOCUMENT) from the drop-down.
    5. Click Submit
    6. Update the AGREEMENTS table with data entered in #3.
    7. Insert a record into the AGREEMENTS_DOC table with the selection from #4.
    Somehow I need the :P6_DOCUMENT field not to show the %null% during the SEARCH functionality. I think that is causing the problem.
    How do I fix this?

  • SQL Query and Exception ORA-01722

    Hi,
    I have a table called t_lookup which has three columns Lookup_Value, Description and Lookup_Type all of them are varchar2 type. If I execute the below query, its working fine
    SELECT *
    FROM (SELECT Lookup_Value
    *,To_Number(Description) Dd*
    FROM t_Lookup
    WHERE Lookup_Type = 'CALENDAR') Tab ;
    Here is the result
    Lookup_Value .............. Dd
    January....................... 1
    February..................... 2
    March......................... 3
    April........................... 4
    May........................... 5
    June.......................... 6
    July........................... 7
    August....................... 8
    September................... 9
    October...................... 10
    November................... 11
    December................... 12
    But when i execute
    SELECT *
    FROM (SELECT Lookup_Value
    *,To_Number(Description) Dd*
    FROM t_Lookup
    WHERE Lookup_Type = 'CALENDAR') Tab
    AND Dd = 9;
    then it is throwing ORA exception
    ORA-01722: invalid number
    Can any one help me on this in order to understand the root cause of this problem? Oracle server I am using is "Oracle9i Release 9.2.0.8.0" .
    Thanks

    I'm assuming that it is intended that certain descriptions will have non-numeric data in them, right?
    Assuming that is the case, the success or failure of the query will depend on how the optimizer happens to choose to execute your query. If it happens to run the TO_NUMBER function before it filters out a row with non-numeric data, you'll get an error. If it happens to run the TO_NUMBER after filtering out all the rows with non-numeric data, the query will be successful. Given that query plans are subject to change, particularly when you eventually upgrade, you probably don't want to just find a SQL query that works, you'll need to ensure that either the query plan never changes or that the query is formulated in such a way that it will never fail.
    My first thought would be whether you really need to store numeric data in a VARCHAR2 field in the first place. I'm guessing this is some sort of generic lookup table (which cause a raft of issues, this being one). Can you at least store string, date, and number data in separate columns?
    Barring that, can you create your own PL/SQL function that converts a string to a number and catches the exception?
    CREATE OR REPLACE FUNCTION my_to_number( p_arg IN varchar2 )
      RETURN NUMBER
    IS
      l_num NUMBER;
    BEGIN
      l_num := to_number( p_arg );
      RETURN l_num;
    EXCEPTION
      WHEN others THEN
        RETURN NULL;
    END;That will ensure that the query will be successful regardless of the plan. Note that you would probably want to catch just the ORA-01722 error, not OTHERS, in your real code-- this is just a sample.
    Barring that, you'll need to do something to enforce stability in the query plan. A stored outline that forces this query to use the query plan that doesn't generate an error.
    Justin

Maybe you are looking for