Oracle.jbo.RowAlreadyDeletedException with outer join

Hi,
I have created a VO, based on an EO, with an outer join present.
The first time I query my data (search) everything goes well, but when I perform a search the second time, I receive the error message: "oracle.apps.fnd.framework.OAException: oracle.jbo.RowAlreadyDeletedException: JBO-25019: Entiteitsrij van sleutel oracle.jbo.Key[202 53162 ] not found in XxpostMmpParametersEO."
The reason why is because of the outer join there is no 1 to 1 relationship between the EO and the VO. However for the first time , it works fine.
Does someone have an idea how I can avoid the error for my second search action?
Thanks in advance!
br
Guy

Hi all,
the following article:
http://radio.weblogs.com/0123729/stories/2003/05/15/entityObjectOverTableWhosePrimaryKeyMayBeNull.html
suggest a possible workaround. It wok fine, but it is not generic! :((
By
Alessandro

Similar Messages

  • Oracle.jbo.RowAlreadyDeletedException raised on EO impl with dead status.

    Any help with this will be greatly appreciated as this is affecting our live environment and as yet we have no fix.
    I have 3 tables (for simplicity lets call them table A, B and C). I have 3 entity objects related by strong association EO_A, EO_B and EO_C. EO_C is the child of EO_B which is the child of EO_A - simple. I have a view object for each entity and the VO's are related by view links. I am experiencing the following problem :
    I insert a row into VO_A and then call a procedure on the database to insert some rows into tables B and C. I post my changes on the transaction then re-query VO_A. I then update a row in VO_C (for a given VO_B master record) in the UI and the change is succssfully set on the EO. I then cancel the transaction using DBTransaction.rollback(). I receive the error :
    oracle.jbo.AfterRollbackException: JBO-26102: An error occurred after rollback was performed.
    When I start the transaction again, the first time a transaction attached to the same Application Module tries to post changes, I receive the error (where SrResourcesEOis EO_B):
    oracle.jbo.RowAlreadyDeletedException: JBO-25019: Entity row of key oracle.jbo.Key[5264 ] not found in SrResourcesEO
    I have found that this is because the transaction is trying a SELECT FOR UPDATE NOWAIT on a row in EO_B that was created and rolled back in the previous failed transaction ???
    Debug log entry (where SrResourcesEO = EO_B) :
    "OracleSQLBuilderImpl.doEntitySelect(565) Executing LOCK...SELECT SCHEDULE_RESOURCE_ID, SCHEDULE_ID, PERSON_ID, LAST_UPDATED_BY, LAST_UPDATE_DATE, ATTRIBUTE_CATEGORY, ATTRIBUTE1, ATTRIBUTE2, ATTRIBUTE3, ATTRIBUTE4, ATTRIBUTE5, ATTRIBUTE6, ATTRIBUTE7, ATTRIBUTE8, ATTRIBUTE9, ATTRIBUTE10, LAST_UPDATE_LOGIN, CREATED_BY, CREATION_DATE FROM CPW_SR_RESOURCES SrResourcesEO WHERE SCHEDULE_RESOURCE_ID=:1 FOR UPDATE NOWAIT"
    I cannot understand why this is as the AM was released in the previously failed attempt and this is a completely new transction.
    The really scary thing is that once this happens it affects ALL users, not just the user who's session caused the error. The error persists until the web server is restarted. It's almost as if (although I'm sure this can't happen) the previous corrupt transaction listener is still lurking around and is trying to re-try the action it previously failed on when the transaction next posts changes.
    Findings:
    1) The same problem happens if I delete a record.
    2) If I insert a new record to EO_C in the UI and rollback the transaction I do not get the error. The problem only occurs if I update or delete a record that was created by the procedure on the database.
    3) If I do the same DML into table B and C via the entity objects EO_B and EO_C not via the DB procedure, I do not get the error when I rollback.
    4) The original error (JBO-26102) is being raised in afterRollback() on the parent EO_B.
    5) The subsequent error (JBO-25019) is being raised in lock() on the parent EO_B.
    It appears that I am experiencing a similar issue mentiond by Steve Muench in the following thread.
    Re: Internal error: Entity.afterRollback.status_dead   -- What does this mean?
    The difference is that I am not using dual composition. I do not have one child with two owning parents, I have one child (EO_C) with one owning parent (EO_B).
    I am using JDeveloper version 9.0.3.5 (I am constrained to this version as I am using it in an OA environment)
    We are running BC4J 9.0.3.13
    Any help greatly appreciated.

    Ok, i found out why I am getting the error and the raised exception:
    Before the commit, I am doing
    row.setAttribute("Attribute",newVal);
    That's why it raises the exception. I commented out that line and I'm getting no error anymore. But it does not commits the operation to the DB (i.e. no new row is added to the table). So, the same behaviour as the delete operation that I talked about in the 1st post.

  • Urgent - oracle.jbo.RowAlreadyDeletedException

    Hi
    I am getting following exception any ideas why?
    oracle.apps.fnd.framework.OAException: oracle.jbo.RowAlreadyDeletedException: JBO-25019: Entity row of key oracle.jbo.Key[130 3 ] not found in MTApproverEO

    Hi,
    I remember juggling with this error, to avoid it the best way is, if your query has multiple outer joins , don't rely on code of developers' guide, it won't work!
    Just understand the logic that Framework understands this as an update operation(rather than create operation) and it could not find row in the table in outer join, so it throws the error.
    I had a similar problem, I had the VO query with 2 outer joins.So instead of making one VO with 2 outer joins query, i made three VOs with no outer joins.
    1st VO-->what your original Vo query was, keep it as it is, but use only one EO in the query, rest you can directly use table refrence in the query.The other table columns which you need to update you have to make them transient in this VO, so that you can copy them once you get them from the user.
    2ndVO-->based on EO of second tbale joined with outer join
    Similarly for third VO.You can use VL to find records of first VO in the other 2 vOs.
    Now,in your code always check while updating that the VO(TABLE) which is joined has to be joined with outer join has the corresponding row or not, if not first create the row and then proceed with update operation!
    Try to follow this approach, it will work for you!
    ---Mukul

  • Error - oracle.jbo.RowAlreadyDeletedException: JBO-25019

    Hi,
    I am getting this error upon commit when updating a record:
    Error - oracle.jbo.RowAlreadyDeletedException: JBO-25019: Entity row of key oracle.jbo.Key[2182 28F40F1AC7FE3D79C65FB880C996B40789A0F5999C132C7243FDBB6D3DA9D0D2 [email protected] ] not found in FndRegistrationsEO
    I am not using an outer join in my VO. No idea what's going on.
    Please help. Thanks.
    Regards,
    Lindsay

    I am already able to resolved the issue.
    Problem is that the record i queried for update doesn't have a value for one of the primary keys. It doesn't show in the error because the PK values shown are the values that I am trying to set.
    Resolution: Removed the PK tag for the null attribute.

  • Oracle.jbo.RowAlreadyDeletedException: JBO-25031

    Hi,
    I have a combo lov with list of values in one of my VO. When i open my lov it shows me all the values available but, after i choose a particular value from the list, it throws an exception "oracle.jbo.RowAlreadyDeletedException: JBO-25031: View row for view object *****VO is missing entity row for *****EO"
    DCBindingContainer.reportException :oracle.jbo.RowAlreadyDeletedException
    [6498] oracle.jbo.RowAlreadyDeletedException: JBO-25031: View row for view object UwmWunWunVO is missing entity row for UixWunEO.
         at oracle.jbo.server.ViewRowStorage.setAttributeValue(ViewRowStorage.java:2351)
         at oracle.jbo.server.ViewRowStorage.setAttributeInternal(ViewRowStorage.java:2165)
         at oracle.jbo.server.ViewRowImpl.setAttributeInternal(ViewRowImpl.java:1453)
         at oracle.ofsll.frameworkExtns.model.FLLViewRowImpl.setAttributeInternal(FLLViewRowImpl.java:36)
         at oracle.ofsll.model.views.wfp.uwm.wun.UwmWunVORowImpl.setWunWprId(UwmWunVORowImpl.java:1898)
         at oracle.ofsll.model.views.wfp.uwm.wun.UwmWunVORowImpl$AttributesEnum$3.put(UwmWunVORowImpl.java:68)
         at oracle.ofsll.model.views.wfp.uwm.wun.UwmWunVORowImpl.setAttrInvokeAccessor(UwmWunVORowImpl.java:4309)
         at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:1089)
         at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:1029)
         at oracle.jbo.server.ViewRowImpl.setAttributeValues(ViewRowImpl.java:1703)
         at oracle.jbo.common.AbstractListBinding.setTargetAttrsFromLovRow(AbstractListBinding.java:464)
         at oracle.jbo.common.AbstractListBinding.updateTargetFromSelectedValue(AbstractListBinding.java:475)
         at oracle.jbo.common.AbstractListBinding.filterAndApplyListWithCaseCheck(AbstractListBinding.java:911)
         at oracle.jbo.common.AbstractListBinding.filterList(AbstractListBinding.java:538)
         at oracle.jbo.server.RowImpl.applyListBindings(RowImpl.java:1101)
         at oracle.jbo.server.ViewRowImpl.setAttributeValues(ViewRowImpl.java:1867)
         at oracle.adf.model.binding.DCDataControl.setAttributesInRow(DCDataControl.java:2428)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.setAttributeValuesInRow(JUCtrlValueBinding.java:976)
         at oracle.jbo.uicli.binding.JUCtrlListBinding.setTargetAttrsFromLovRow(JUCtrlListBinding.java:2801)
         at oracle.jbo.uicli.jui.JUComboBoxLovEditBinding.performLOVAction(JUComboBoxLovEditBinding.java:373)
         at oracle.jbo.uicli.jui.JUComboBoxLovEditBinding.invokeLOVAction(JUComboBoxLovEditBinding.java:337)
         at oracle.jbo.uicli.jui.JUComboBoxLovEditBinding.actionPerformed(JUComboBoxLovEditBinding.java:252)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    [6499] JUErrorHandlerDlg.reportException(oracle.jbo.RowAlreadyDeletedException)
    please help...thanks in advance
    $@!

    hi user,
    the error is self - explanatory "RowAlreadyDeleted". anyhow, i dont re-phrase it anymore.
    go through this doc.
    http://docs.oracle.com/cd/E23549_01/apirefs.1111/e10653/oracle/jbo/RowAlreadyDeletedException.html
    context mentioned:
    "Thrown when the requested row is not found in the the database perhaps *it has been already deleted after the row was initially queried*. This excecption may be thrown for either an Entity Object row or a View Object row. "
    check it out.
    http://beautifulwaste.blogspot.in/2007/02/strange-adf-problem-timepart-of-date.html

  • Update with Outer Join, round 2

    Thanks for those of you who helped me out on the first one (I never thought that you could use a one-row SELECT like that).
    However, here is a new version of my problem:
    I have three tables.
    Table_1 has a column that needs to be updated based on values in Table_2 and Table_3.
    Both Table_1 and Table_2 have values used to determine which Table_3 row to use.
    However, not every Table_1 row has a corresponding Table_3 row, in which case the Table_3 value to use is assumed to be 1.
    The tables and corresponding columns are:
    TABLE_1
    value_1 - the value to be updated
    key_2 - a pointer to TABLE_2
    key_3a - a pointer to TABLE_3, or a dummy value if there is no corresponding TABLE_3 record
    TABLE_2
    key_2 - the primary key
    key_3b - a secondary pointer to TABLE_3
    value_2 - a value to be used in calculating TABLE_1.value_1
    TABLE_3
    key_3a - the first part of the unique key
    ley_3b - the second part of the unique key
    value_3 - a value to be used in calculating TABLE_1.value_1
    If there is a row in table_3 that matches the table_1.key_3a and table_2.key_3b values (where table_2.key_2 = table_1.key_2):
    set table_1.value_1 = table_2.value_2 * table_3.value_3
    If there is no such row in table_3:
    set table_1.value_1 = table_2.value_2
    I want to do something like this:
    UPDATE table_1 t1
    SET value_1 =
    SELECT t2.value_2 * NVL(t3.value_3, 1)
    FROM table_2 t2
    LEFT JOIN table_3 t3
    ON (t3.key_3b = t2.key_3b and t3.key_3a = t1.key_3a)
    WHERE t2.key_2 = t1.key_2
    However, Oracle does not allow t1 to be referenced in the ON clause of the outer join.
    (Assume that every key_2 value in table_1 is in table_2 as well - it is only the key_3 value that can be a dummy.)
    If I move "t3.key_3 = t1.key_3" to the WHERE clause, then t1.value_1 is null for rows without the corresponding table_3 value.
    I can do it with a clone of table_1 using ROWIDs:
    UPDATE table_1 t1
    SET value_1 =
    SELECT t2.value_2 * NVL(t3.value_3, 1)
    FROM table_1 t1a
    JOIN table_2 t2
    ON t2.key_2 = t1a.key_2
    LEFT JOIN table_3 t3
    ON (t3.key_3b = t2.key_3b and t3.key_3a = t1a.key_3a)
    WHERE t1a.row_id = t1.row_id
    However, is there an easier way to do this using ANSI joins (i.e. without (+) syntax)?
    I have this feeling I am missing something reasonably obvious here.

    ddelgran wrote:
    Thanks for those of you who helped me out on the first one (I never thought that you could use a one-row SELECT like that).
    I want to do something like this:
    UPDATE table_1 t1
    SET value_1 =
    SELECT t2.value_2 * NVL(t3.value_3, 1)
    FROM table_2 t2
    LEFT JOIN table_3 t3
    ON (t3.key_3b = t2.key_3b and t3.key_3a = t1.key_3a)
    WHERE t2.key_2 = t1.key_2
    However, Oracle does not allow t1 to be referenced in the ON clause of the outer join.
    (Assume that every key_2 value in table_1 is in table_2 as well - it is only the key_3 value that can be a dummy.)
    If I move "t3.key_3 = t1.key_3" to the WHERE clause, then t1.value_1 is null for rows without the corresponding table_3 value.
    I can do it with a clone of table_1 using ROWIDs:
    UPDATE table_1 t1
    SET value_1 =
    SELECT t2.value_2 * NVL(t3.value_3, 1)
    FROM table_1 t1a
    JOIN table_2 t2
    ON t2.key_2 = t1a.key_2
    LEFT JOIN table_3 t3
    ON (t3.key_3b = t2.key_3b and t3.key_3a = t1a.key_3a)
    WHERE t1a.row_id = t1.row_id
    However, is there an easier way to do this using ANSI joins (i.e. without (+) syntax)?
    I have this feeling I am missing something reasonably obvious here.You might want to refer to my post in your original thread how to use join views in updates. You can use ANSI join syntax there, too:
    Re: Update with Outer Join
    You would end up with something like this (note: untested):
    UPDATE
      SELECT t1.value_1, t2.value_2 * NVL(t3.value_3, 1) as new_val
      FROM table_1 t1
      INNER JOIN table_2 t2 ON (t2.key_2 = t1.key_2)
      LEFT JOIN table_3 t3
      ON (t3.key_3b = t2.key_3b and t3.key_3a = t1.key_3a)
    SET value_1 = new_val;And again the same restrictions regarding key-preserved tables apply as described in the post referred to.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Error: 'oracle.jbo.RowAlreadyDeletedException:......

    Hi All,
    I am extending a VO and for that I have just added one more coulmn with NVL to a existing column as given below:
    SELECT routingruleseo.rule_id, routingruleseo.message_type,
    routingruleseo.message_name, routingruleseo.begin_date,
    routingruleseo.end_date, routingruleseo.ACTION,
    routingruleseo.action_argument, itemtypeseo.display_name AS
    type_display, decode(itemtypeseo.display_name, NULL, ('<' || wf_core.TRANSLATE('ALL') || '>'), itemtypeseo.display_name) AS
    type_display1, decode(messageseo.display_name, NULL, ('<' || wf_core.TRANSLATE('ALL') || '>'), messageseo.display_name) AS
    msg_display, messageseo.subject,
    lookupseo.meaning AS action_display,
    itemtypeseo.name, messageseo.type,
    messageseo.name AS name1,
    lookupseo.lookup_type, lookupseo.lookup_code
    FROM wf_routing_rules routingruleseo,
    wf_item_types_vl itemtypeseo,
    wf_messages_vl messageseo,
    wf_lookups lookupseo
    WHERE routingruleseo.role = :1
    AND routingruleseo.message_type = itemtypeseo.name(+)
    AND routingruleseo.message_type = messageseo.type(+)
    AND routingruleseo.message_name = messageseo.name(+)
    AND routingruleseo.ACTION = lookupseo.lookup_code
    AND lookupseo.lookup_type = 'WFSTD_ROUTING_ACTIONS'
    value of this column may null also but adding nvl is giving the error below:
    'oracle.jbo.RowAlreadyDeletedException: JBO-25019: Entity row of key oracle.jbo.Key[POAPPRV POAPPRV ] not found in MessagesEO.'
    I am not updating or inserting any row there, my query is to display data for different vacation rules defined for a particular user in iProc page-vacation rules.
    Can anybody help me or suggest something as this is bit urgent..
    Many thanks,
    Suman
    Edited by: suman.g on 10-Nov-2009 00:29

    Hi Abdul,
    Sorry!! sent old query..
    Please find new query..
    SELECT RoutingRulesEO.RULE_ID,
    RoutingRulesEO.MESSAGE_TYPE,
    RoutingRulesEO.MESSAGE_NAME,
    RoutingRulesEO.BEGIN_DATE,
    RoutingRulesEO.END_DATE,
    RoutingRulesEO.ACTION,
    RoutingRulesEO.ACTION_ARGUMENT,
    ItemTypesEO.DISPLAY_NAME AS TYPE_DISPLAY,
    NVL(ItemTypesEO.DISPLAY_NAME,('<'||wf_core.TRANSLATE('ALL')||'>')) AS TYPE_DISPLAY1,
    NVL(MessagesEO.DISPLAY_NAME,('<'||wf_core.TRANSLATE('ALL')||'>')) AS MSG_DISPLAY,
    MessagesEO.SUBJECT,
    LookupsEO.MEANING AS ACTION_DISPLAY,
    ItemTypesEO.NAME,
    MessagesEO.TYPE,
    MessagesEO.NAME AS NAME1,
    LookupsEO.LOOKUP_TYPE,
    LookupsEO.LOOKUP_CODE
    FROM WF_ROUTING_RULES RoutingRulesEO, WF_ITEM_TYPES_VL ItemTypesEO, WF_MESSAGES_VL MessagesEO, WF_LOOKUPS LookupsEO
    WHERE RoutingRulesEO.ROLE = :1
    and RoutingRulesEO.MESSAGE_TYPE = ItemTypesEO.NAME (+)
    and RoutingRulesEO.MESSAGE_TYPE = MessagesEO.TYPE (+)
    and RoutingRulesEO.MESSAGE_NAME = MessagesEO.NAME (+)
    and RoutingRulesEO.ACTION = LookupsEO.LOOKUP_CODE
    and LookupsEO.LOOKUP_TYPE = 'WFSTD_ROUTING_ACTIONS'
    Best Regards,
    suman

  • Problem with outer joins and the class indicator/discriminator

    Hello,
    I am having a problem defining a query in toplink (10.1.3.3).
    In the workbench, I have created a parent and 2 child descriptors. The parent is "AbstractValue", the children are "DefaultValue", classified by the discriminator 'DEF', and "OverrideValue", classified by 'OVR', both located in the same table.
    Another descriptor (containing a one-on-one mapping to both a "DefaultValue", and a "OverrideValue") needs to be queried for its 'value'.
    The way the query should act is: If an override value (row) exists, this one applies for that object. If an override doesn't exist, return the default value.
    The query then comes down to (as I have it now):
    builder.getAllowingNull("OverrideValue").getAllowingNull("value").ifNull(builder.get("DefaultValue").get("value")).equal(builder.getParameter(VALUE_PARAM));
    The problem is that toplink adds the distinction for the different kind of "values" in the where clause WITHOUT checking for null values e.g. it performs an outer join, but then still checks for the discriminator value thus
    ....t1.ovr_id = t2.id(+) AND t2.discriminator = 'OVR' AND ...
    instead of
    ... LEFT JOIN values t2 ON (t1.ovr_id = t2.id AND t2.discriminator = 'OVR') ...
    This leads to the behaviour that the query returns ONLY the objects that have override and default values.
    An overview of the queries (simplified)
    Toplink, at the moment, returns only results if both override and default values exists:
    SELECT t1.id
    t1.def_id,
    t1.ovr_id
    FROM values t2,
    parameter t1,
    values t0
    WHERE nvl(t2.value, t0.value) = 15 AND
    t1.ovr_id = t2.id(+) AND t2.discriminator = 'OVR' AND
    t1.def_id = t0.id AND t0.discriminator = 'DEF'
    Situation Wanted:
    SELECT t1.id
    t1.def_id,
    t1.ovr_id
    FROM parameter t1
    LEFT JOIN values t2 ON (t1.ovr_id = t2.id AND t2.discriminator = 'OVR')
    JOIN values t0 ON (t1.def_id = t0.id AND t0.discriminator = 'DEF')
    WHERE nvl(t2.value, t0.value) = 15
    Anyone know if there is some statement I am missing to allow an actual outer join on descriptors containing class indicators/discriminators? A possible rewrite?
    Thanks in advance,
    Rudy

    This is a bug in TopLink's outer join support for Oracle. Currently the outer join is put in the where clause, instead of the from clause, as we do on other platforms. You might be able to fix it by changing your OraclePlatform to return false for shouldPrintOuterJoinInWhereClause().
    Please log this bug on EclipseLink, or through Oracle technial support.
    There is a workaround using,
    descriptor.getInhertiancePolicy().setAlwaysUseOuterJoinForClassType(true);
    James : http://www.eclipselink.org

  • Oracle Stored Procedure with out parameter

    Good morning,
    Is it possible to use an Oracle stored procedure with out parameters in MII ?
    If yes, what is the manipulation to see the values of parameters Out?
    Thank you

    Michael,
    This is the  MII query template  :
    DECLARE
    STRCOMPTERENDU NVARCHAR2(200);
    BEGIN
    STRCOMPTERENDU := NULL;
    XMII.SP_VALIDATEPROCESSORDERSLIST2 ( STRCOMPTERENDU => [Param.1]  );
    COMMIT;
    END;
    and the stocked procedure code
    CREATE OR REPLACE PROCEDURE XMII.SP_ValidateProcessOrdersList2(strCompteRendu OUT nVarchar2) IS
    tmpVar NUMBER;
    debugmode INT;
    strClauseSql varchar(2048);
    strListPOactif varchar(1024);
    dtmTimeStamp DATE;
       NAME:       SP_ValidateProcessOrdersList
       PURPOSE:   
       REVISIONS:
       Ver        Date        Author           Description
       1.0        18/06/2008          1. Created this procedure.
       NOTES:
       Automatically available Auto Replace Keywords:
          Object Name:     SP_ValidateProcessOrdersList
          Sysdate:         18/06/2008
          Date and Time:   18/06/2008, 18:45:32, and 18/06/2008 18:45:32
          Username:         (set in TOAD Options, Procedure Editor)
          Table Name:       (set in the "New PL/SQL Object" dialog)
    BEGIN
       tmpVar := 0;
       debugmode := 0;
       -- lecture date systeme pour time stamp
       select sysdate  into dtmTimeStamp from dual;
       if debugmode = 1 then
        DBMS_OUTPUT.put_line('SP_ValidateProcessOrdersList');
       end if;
       -- insertion du bloc dans le log
       insert into LOG_ORDER
        (DATE_ORDER,BLOCK_ORDER,ID_LOG_ORDER)
       values
       (dtmTimeStamp,'SP_ValidateProcessOrdersList',ID_LOG_ORDER.nextval);
       Commit;
        if debugmode = 1 then
        DBMS_OUTPUT.put_line('insertion LOG OK');
       end if;
    strCompteRendu := '0123456-896;0123456-897';
    commit; 
       EXCEPTION
         WHEN NO_DATA_FOUND THEN
           NULL;
         WHEN OTHERS THEN
         ROLLBACK;
         -- insertion du bloc dans le log
       insert into LOG_ORDER
        (DATE_ORDER,BLOCK_ORDER,ID_LOG_ORDER)
       values
       (dtmTimeStamp,' ',ID_LOG_ORDER.nextval);
       COMMIT;
           -- Consider logging the error and then re-raise
           RAISE;
    END SP_ValidateProcessOrdersList2;
    Thanks for your help
    Alexandre

  • How to poll a blob using db adapter, with outer joins condition

    Hi All,
    We are trying to poll tables which contain column types as long and blob, we are using relationships in adapter and kept outer joins. by this we got select distinct t1.document .....etc
    distinct keyword cannot be used for blobs.
    is there any way to poll these tables having blob column types with outer joins.
    thanks a lot in advance,
    RR

    Hi,
    Procedure will be an explicit Invoke not Polling. If you can alter you design such that your BPEL process instead of polling gets triggered by some external entity (Java, PL/SQL, Scheduler, another BPEL etc.), you can put the data fetching logic in the procedure and call this procedure from your BPEL process to get the data. And your BPEL process is called periodically at an interval by an external entity.
    Also see if you can restrict the duplicate records at the database level itself. Polling, AFAIK, is limited in terms of customization and wouldn't be easy to customize. However, would like to learn a way if someone has.
    Regards,
    Neeraj Sehgal

  • Help requried with outer joins

    Hi All,
    I neeed a query help can any one please help me getting this done,
    for the below query
    select trunc(assumed_time_sql) AS date1,sum(rp.rebate_due)as sum1 from mn_date_dim dd ,mn_rebate_payment rp,mn_prc_program prc,mn_structured_doc sd
    where trunc(assumed_time_sql) in (TO_DATE('01-JUL-10','dd-mon-yy'),add_months(TO_DATE('01-JUL-10','dd-mon-yy'),-3),add_months(TO_DATE('01-JUL-10','dd-mon-yy'),-6),add_months(TO_DATE('01-JUL-10','dd-mon-yy'),-9))----input parameter
    AND trunc(dd.assumed_time_sql)=TRUNC(rp.start_date)
    AND prc.prc_program_id=rp.tiered_rebate_id
    AND sd.struct_doc_id=prc.struct_doc_id
    AND sd.struct_doc_id_num='M0000763'----input parameter
    group by trunc(assumed_time_sql);
    I am getting output as
    date1      sum1
    01-JAN-10      10
    01-APR-10     15
    01-JUL-10     20
    But i want my output to be as
    date1      sum1
    01-JAN-10      10
    01-APR-10     15
    01-JUL-10     20
    01-OCT-09 NULL
    I have tried with outer joins but this didn't help me
    Can any one please give me help in getting this done
    Thanks

    Hi,
    As SB pointed out, you'd better provide tables and data in order to be helped more efficiently.
    Anyway, you may want to investigate the use of NVL and/or DECODE so that you can translate NULL into valid values so they are returned to your select statement.
    HTH,
    Thierry
    Handle:  p78   
    Status Level:  Newbie (10) 
    Registered:  Mar 9, 2009 
    Total Posts:  60 
    Total Questions:  35 (30 unresolved)  Be kind to share your helpful / correct threads with other with marking them as ANSWERED
    Edited by: Urgent-IT on Feb 13, 2011 11:00 AM

  • Generate a where clause with outer join criteria condition: (+)=

    Hi,
    In my search page, I use Auto Customization Criteria mode, and I build where clause by using get Criteria():
    public void initSrpQuery(Dictionary[] dic, String userName) {
    int dicSize = dic.length;
    StringBuffer whereClause = new StringBuffer(100);
    Vector parameters = new Vector(5);
    int clauseCount = 0;
    int bindCount = 1;
    for(int i=0; i < dicSize; i++){
    String itemName = (String)(dic.get(OAViewObject.CRITERIA_ITEM_NAME));
    Object value = dic[i].get(OAViewObject.CRITERIA_VALUE);
    String joinCondition = (String)dic[i].get(OAViewObject.CRITERIA_JOIN_CONDITION);
    String criteriaCondition = (String)dic[i].get(OAViewObject.CRITERIA_CONDITION);
    String criteriaDataType = (String)dic[i].get(OAViewObject.CRITERIA_DATATYPE);
    String viewAttributename = (String)dic[i].get(OAViewObject.CRITERIA_VIEW_ATTRIBUTE_NAME);
    String columnName = findAttributeDef(viewAttributename).getColumnNameForQuery();
    if((value != null) /*&& (!("".equals((String).trim())))*/){
    if(clauseCount > 0){
    whereClause.append(" AND ");
    whereClause.append(columnName + " " + criteriaCondition + " :");
    whereClause.append(++bindCount);
    parameters.addElement(value);
    clauseCount++;
    If I want to generate following where clause:
    select
    ,emp.name
    ,emp.email
    ,emp.salesrep_number
    ,comp.name
    ,gs.srp_goal_header_id
    ,gs.status_code
    ,gs.start_date
    ,gs.end_date
    from g2c_goal_shr_emp_assignments_v emp
    ,jtf_rs_salesreps rs
    ,xxg2c_srp_goal_headers_all gs
    ,cn_comp_plans_all comp
    where 1 = 1
    and rs.salesrep_id = gs.salesrep_id (+)
    and gs.comp_plan_id = comp.comp_plan_id (+)
    and gs.period_year (+) = :1 -- :1 p_fiscal_year
    How can I generate a where clause with outer join : gs.period_year (+) = :1 ? Will I get '(+)=' from get(OAViewObject.CRITERIA_CONDITION)?
    thanks
    Lei

    If you are using SQL-Plus or Reports you can use lexical parameters like:
    SELECT * FROM emp &condition;
    When you run the query it will ask for value of condition and you can enter what every you want. Here is a really fun query:
    SELECT &columns FROM &tables &condition;
    But if you are using Forms. Then you have to change the condition by SET_BLOCK_PROPERTY.
    Best of luck!

  • Group by with outer join

    Group by sum doesn't work with outer join. Can anyone please help me to get it right?
    I've posted some sample data and queries below:
    CREATE TABLE COMPLAINT
      CNO     NUMBER,
      REASON  VARCHAR2(15 BYTE),
      TOTAL   NUMBER
    Insert into COMPLAINT
       (CNO, REASON, TOTAL)
    Values
       (1, 'edge', 250);
    Insert into COMPLAINT
       (CNO, REASON, TOTAL)
    Values
       (2, 'edge', 250);
    Insert into COMPLAINT
       (CNO, REASON, TOTAL)
    Values
       (3, 'brst', 300);
    Insert into COMPLAINT
       (CNO, REASON, TOTAL)
    Values
       (4, 'crea', 400);
    COMMIT;
    CREATE TABLE SCOTT.COMPLAINTROLL
      CNO   NUMBER,
      ROLL  VARCHAR2(15 BYTE)
    SET DEFINE OFF;
    Insert into COMPLAINTROLL
       (CNO, ROLL)
    Values
       (2, 'roll22');
    Insert into COMPLAINTROLL
       (CNO, ROLL)
    Values
       (1, 'roll4');
    Insert into COMPLAINTROLL
       (CNO, ROLL)
    Values
       (1, 'roll3');
    Insert into COMPLAINTROLL
       (CNO, ROLL)
    Values
       (1, 'roll2');
    Insert into COMPLAINTROLL
       (CNO, ROLL)
    Values
       (1, 'roll1');
    COMMIT;
    select * from complaint
    CNO     REASON     TOTAL
    1     edge     250
    2     edge     250
    3     brst     300
    4     crea     400
    select * from complaintroll
    CNO     ROLL
    1     roll1
    1     roll2
    1     roll3
    1     roll4
    2     roll22
    -- total of reason code edge is 500
    select reason,sum(total)
    from complaint c
    group by reason
    REASON     SUM(TOTAL)
    brst     300
    crea     400
    edge     500
    -- total of reason code edge after outer join is 1250
    select reason,sum(total)
    from complaint c,complaintroll cr
    where c.cno=cr.cno(+)
    group by reason
    REASON     SUM(TOTAL)
    brst     300
    crea     400
    edge     1250
    {\code}
    Thanks for reading this post.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    The problem that you described is simple. The outer join duplicates all the rows from the parent table (complaint). If you want to sum a column from the parent table, then this sum includes all the duplicated rows.
    There are several solutions for this problem.
    A) One had been shown already by Cenutil. Instead of doing an outer join, you can do a subquery in the select clause that delivers the additional information from the detail table.
    SQL> select reason,
       sum(total),
       sum((select count(*) from complaintroll cr where c.cno=cr.cno)) cnt_rolls
    from complaint c
    group by c.reason;
    REASON          SUM(TOTAL)  CNT_ROLLS
    crea                   400          0
    brst                   300          0
    edge                   500          5b) sum in two steps. First sum and count including the join criteria, then use this information to calculate the correct total sum.
    SQL> select reason, sum(stotal), sum(stotal/scount), sum(scount), sum(cnt_rolls)
      2  from (select reason, sum(total) stotal, count(*) scount, count(cr.cno) cnt_rolls
      3         from complaint c
      4         left join complaintroll cr on c.cno=cr.cno
      5         group by reason, c.cno
      6         )
      7   group by reason;
    REASON          SUM(STOTAL) SUM(STOTAL/SCOUNT) SUM(SCOUNT) SUM(CNT_ROLLS)
    crea                    400                400           1              0
    brst                    300                300           1              0
    edge                   1250                500           5              5
    sql> c) another option is to do the left join, but do the aggregation only one time for the parent table. Analytic functions are helpful for that. However since analytic fuinctions can't be used inside an aggregation function, we would again need an inline view.
    SQL> select reason, sum(case when rn = 1 then total end) sum_total, count(*), count(crcno)
      2  from (select row_number() over (partition by c.reason order by c.cno) rn,
      3                   c.*, cr.cno crcno
      4         from complaint c
      5         left join complaintroll cr on c.cno=cr.cno
      6         )
      7  group by reason;
    REASON           SUM_TOTAL   COUNT(*) COUNT(CRCNO)
    brst                   300          1            0
    crea                   400          1            0
    edge                   250          5            5
    SQL> Edited by: Sven W. on Feb 10, 2011 1:00 PM - formatting + column added to 2nd option

  • Trim With Outer Join in where

    Getting an error called Invalid relational Operator
    SELECT DISTINCT t1.recv_order_no, t2.reference_no
    FROM receiving_order t1, receiver_num t2
    WHERE TRIM(t2.reference_no) (+) = TRIM (t1.recv_order_no)
    ORDER BY t2.reference_no ASC
    What I am doing wrong here ?
    Can I use trim fun with outer join ?
    Thanks for help.
    Srini

    Hi Srini,
    I have done this with emp and dept
    Following is an example:
      1  select a.deptno, b.ename
      2     from dept a, emp b
      3*   where trim(a.deptno) = trim(b.deptno(+))
    scott>/
        DEPTNO ENAME
            10 CLARK
            10 KING
            10 GHULAM
            10 MILLER
            20 SMITH
            20 ADAMS
            20 FORD
            20 SCOTT
            20 JONES
            30 ALLEN
            30 BLAKE
            30 MARTIN
            30 JAMES
            30 TURNER
            30 WARD
            40Hope this helps
    Ghulam

  • How to use common object from two tables with out join.

    HI,
    I have two tables called A & B In A table i have the following objects
    1.weekend
    2.S1(measure)
    3.S2(measure)
    4.S3(measure)
    5.S4(measure)
    And In B table i have followning columns
    1.week end
    2.p1(measure)
    3.p2(measure)
    4.p3(measure)
    5.p4(measure)
    Now in universe i created all the measure objects i.e.s1,s2,s3,s4,p1,p2,p3,p4 A.weekend,B.weekend.
    instead of using week end two times i wnt to use only once because this is common in both table.
    if i use join between these tables i am getting values fine
    But With out join is there any thing to do in universe level to create common objects to use from both the tables..I tried using aggregate awareness but while reporting it is taking as two SQL.which is not synchronized.
    Please help me on this ...

    hi,
    Although  Weekend column is present in both tables, by creating a single Object in Universe, Universe can identify relationship with only table referenced in Object Creation.
    So, there will be no identification of relationship with other table measures.
    Obviously, you need to create 2 Weekend objects in Universe (in two classes).
    Case 1: You need not join these two tables in Universe. When you create 2 Queries in WEBI, automatcially Weekend objects are synchronized (if both are of same datatype)
    Case 2: If you join these two tables in Universe, Obviously,
    your SQL may contain Weekend from Table1, measures from Table 2
    or
    your SQL may contain Weekend from Table2, measures from Table 1
    Finally, You need to create 2 objects in Universe. But your query may contain a single Object based on Case 2.
    Regards,
    Vamsee

Maybe you are looking for

  • Customer open items knock off on FIFO basis

    Friends, Is it possible to knock off the customer payments on first in first out basis, without manual clearing through F-32. Payments user will post the incoming payments on account, which should be adjusted for 1st bill on FIFO basis.  Just user ha

  • Connecting WIRED Blue ray player to network

    I only have coax running to my TV... does the Motorola NIM100 NIM 100 Cable Modem work in such a manner that I could plug the blue ray Ethernet connection into it & the coax going to the TV Basically acting as a splitter. Thanks

  • Import pdf multilayers in Photoshop (Photoshop CS3, Acrobat 8)

    Hi, I need to translate pdf multilayers in psd multilayers. Now for doing that, I import it layer by layer, but it is so long. How I could do that in one step? I use Photoshop CS3 and Acrobat 8. Can I do that with Photoshop CS5 or with Acrobat 10?

  • Logical volume activation during bootup shows "Maps lock" errors

    this started happening sometime after the creation of two lvm snapshots (including 1 root volume snapshot which, as i have since read, may be an issue) but this has never happened to me before in conjunction with snapshotting.  the following outputs

  • What displays does the mac mini work with?

    and what kind of plug do they work with I'm getting one off of ebay a 8GB model from 07