Workflow Resubmision within Same Transaction?

Hi ,
"Workflow with item type (XXXX) and item key (100000) is in progress. Abort existing workflow before launching a new process for this "
can we have multiple submissions workflow process within a single transaction .
Please guide if there is a solution to overcome this issue.
Regards,
srinivas

Hello Tom,
Even I am facing the same issue and I am quite sure that I am generating new item-key every time as I am using a sequence for that.
String serialNumber = "XXIFMS_NO_";
String wfItemKey = serialNumber + tr.getSequenceValue("POR_REQ_NUMBER_S").toString();Error MESSAGE_NAME is FND_WF_IN_PROGRESS_FOR_TXN and
Workflow with item type (&ITEMTYPE) and item key (&ITEMKEY) is in progress. Abort existing workflow before launching a new process for this transaction.
Basically I am creating an entity and at the end of the entity creation, I am triggering workflow for its approval. It works first time and now I create a new entity and
try to trigger approval, I get this error. But if I wait for sometime and trigger second workflow it works fine.
For some reason, exception shows item key, of the workflow which got successfully triggered earlier.
So second time, when I try to trigger workflow Item key used is Item key: XXIFMS_NO_100072
but exception is for previous key
oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_WF_IN_PROGRESS_FOR_TXN. Tokens: ITEMTYPE = XXIFMSSA; ITEMKEY = XXIFMS_NO_100071; at oracle.apps.fnd.framework.webui.OANavigation.initialize(OANavigation.java:233) at oracle.apps.fnd.framework.webui.OANavigation.createProcess
regards, Yora

Similar Messages

  • Calling two different data sources within same transaction

    Hi,
    I have a method (in an Entity Bean), which I need to use two data sources.
    But the system give this error when I try to do it.
    An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction.
    Please help me to solve this problem.
    Best Regards,
    Chamal.

    I hope you need to use XA Drivers (while create the connection pool it self you need to choose the XA Drivers) for this. else you need to use the userTranscations instead of containers.
    Because other database drivers won't support this feature.
    Please try any of this. Using XA drivers is costly interms of performace.

  • How to use same transaction when calling CMP entity beans and  DAO (JDBC)

    We are currently using Weblogic 8.1 SP2 with an Oracle 10g database (using XA thin and non-XA drivers).
    We have a session bean that invokes an entity bean and a DAO (data access object pattern) in order to add data in 2 separate tables (account and history). Rows are added to the first (account) table using a CMP Entity bean while inserts are done in the 2nd (history) table using a DAO. Here is some pseudo code:
    addHistorySessionBean (trans-attribute="Required")
    begin
    Step #1 - call addAccountEntityBean (trans- attribute="Required")
    Step #2 - call addHistoryDAO (get datasource, connection)
    end
    The 2nd table (history) has a foreign key constraint to ensure that the corresponding key exists in the first (account) table. Unfortunately, DAO inserts on the 2nd (history) table fail with a foreign key constraint violation (INTEGRITY CONSTRAINT VIOLATION - PARENT KEY NOT FOUND!) since they cannot see the row added to the 1st (account) table in step #1 by the CMP entity bean.
    How does one ensure that all this is done in a single transaction ? It appears that the app server creates two seperate transactions (one for the session bean facade and the entity bean and a 2nd transaction (when we retrieve a connection using the same data source JNDI name) for the DAO.
    A post on server side suggested using a "<resource-ref>" in the session bean to tie the two potentially separate transactions together, but that does not work for us. However, I am not sure if we are doing that correctly. After we define the resource ref in the session facade bean, do we use the resource ref "name" attribute to lookup the datasource or do we still lookup the datasource by JNDI name ? Do we need to define the resource-ref tag in the entity bean also ?
    Does Weblogic allow using a single transaction for this type of a scenario ? How does one specify within Weblogic that the same transaction should be utilized by the entity bean and any subsequent DAOs?
    People have also suggested that we defer constraint checking until the transaction(s) are committed but that sounds like a work acount without addressing this issue. Would postponing the constraint checking in Oracle cause any additional overhead ?
    Any suggestions with specific examples or documentation on how to address this issue will be gratefully appreciated.

    Thanks for your suggestion. Unfortunately, this does not work since it appears that there are 2 separate transactions going on here. One, the original one initiated by the session bean and used by the entity bean and the other initiated by the DAO. Any other ideas appreciated.
    Hi,
    Try setting the delay-database-inserts tag to
    ejbCreate in RDBMS descriptor file.
    http://bernal/stage/wls/docs81/ejb/DDreference-cmp-jar
    .html#1113981
    vasanthi ramesh

  • Using table CRMC_PROC_TYPE within the transaction launcher...

    Table CRMC_PROC_TYPE contains all sorts of interesting fields, namely:
    Number range Internal
    Number rnage External
    User stat procedure
    Text Procedure
    Partner determination Pocedure
    Object type
    Time and Action profile
    Org Profile ID
    This table is used by the oler Action Boxes (forerunner to the transaction launcher).
    The key field for the above table is the Process type. I would like to forward the process type to the transaction and set this up within the transaction launcher, but so far all attempts have failed. The action boxes as used by the Winclient IC stil work, even in CRM 7, so one assumes that the same functionality can be configured in some way within the transaction launcher.
    I have found documentation, comments, guides on this subject, so this is my plea to anyone who may know how to achieve this.
    Jason

    hi anindya,
    the description of transaction type you can get it from table CRMC_PROC_TYPE_T
    just query to this table by the transaction type
    hopes it helps
    cheers

  • Can multiple threads use same transaction concurrently?

              Is it possible that same transaction is being used by multiple threads concurrently
              in WLS? If each thread is doing suspend and resume how does it work? Does the
              transaction implementation support it? Is there a way to do it?
              

    Why you don't tell us some more about your application?
              I'm assuming this is a relatively long running transaction if run
              serially. One common solution is to break this type of workflow into
              several separate transactions with queues between them.
              -- Rob
              Karambir Singh wrote:
              > Is there any workaround for this? I mean to something like explicitly associating
              > the txn with user created threads.
              >
              > "krishna" <[email protected]> wrote:
              >
              >>Transaction context cannot be propagated to user created Threads.
              >>-Krishna
              >>"Karambir Singh" <[email protected]> wrote in message
              >>news:[email protected]...
              >>
              >>>I'm starting a transaction in main thread and this thread spawns three
              >>
              >>threads.
              >>
              >>>I want updates done in main transaction and updates done in three child
              >>
              >>threads
              >>
              >>>to be part of the same transaction. The transaction is finally commited
              >>
              >>by
              >>main
              >>
              >>>thread.
              >>>
              >>>
              >>>
              >>>
              >>>
              >>>"Dimitri I. Rakitine" <[email protected]> wrote:
              >>>
              >>>>What are you trying to do ?
              >>>>
              >>>>Karambir Singh <[email protected]> wrote:
              >>>>
              >>>>
              >>>>>Is there any workaround to do this?
              >>>>
              >>>>>"Dimitri I. Rakitine" <[email protected]> wrote:
              >>>>>
              >>>>>>No, it is associated with a thread which started it.
              >>>>>>
              >>>>>>Karambir Singh <[email protected]> wrote:
              >>>>>>
              >>>>>>
              >>>>>>>Is it possible that same transaction is being used by multiple
              >>
              >>threads
              >>
              >>>>>>concurrently
              >>>>>>
              >>>>>>>in WLS? If each thread is doing suspend and resume how does it
              >>
              >>work?
              >>
              >>>>>>Does the
              >>>>>>
              >>>>>>>transaction implementation support it? Is there a way to do it?
              >>>>>>
              >>>>>>--
              >>>>>>Dimitri
              >>>>>>
              >>>>
              >>>>--
              >>>>Dimitri
              >>>>
              >>>
              >>
              >
              

  • DB_APPEND on a queue within a transaction

    Hello,
    With your help, I did get my test program worked. It appends data on a queue.
    But now I have problems to do the same thing but within a transaction. I get an "Invalid argument" error.
    Thanks for a little help.
    Here is my small test program :
    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
    #include <fcntl.h>
    #include <errno.h>
    #include <db.h>
    DB_ENV *env;
    int ret;
    DB * db;
    const int QUEUE_RECORD_SIZE = 50;
    int pad_char = 35; // #
    char * dbName = "queue-test-file.db";
    u_int32_t db_flags;
    u_int32_t env_flags =
    DB_CREATE | DB_INIT_TXN | DB_INIT_LOCK | DB_INIT_LOG |
    DB_INIT_MPOOL | DB_THREAD | DB_RECOVER | DB_REGISTER;
    db_recno_t recno;
    DBT key, data;
    char buf[1024];
    u_int32_t len;
    typedef enum { FALSE = (0 == 1), TRUE = (1 == 1)} Boolean;
    Boolean FirstTime = TRUE;
    int main(void) {
    DB_TXN *l_txn = NULL;
    int i = 0;
    ret = db_env_create (&env, 0);
    if (ret != 0) {
    printf("error in db_env_create\n");
    ret = env->open (env, "/data/test/", env_flags, 0);
    if (ret != 0) {
    printf("error in env open\n");
    ret = db_create (&db, env, 0);
    if (ret != 0) {
    printf("error in db_create\n");
    ret = db->set_re_len(db, QUEUE_RECORD_SIZE);
    if (ret != 0) {
    printf ("error in set_re_len\n");
    ret = db->set_re_pad(db, pad_char);
    if (ret != 0) {
    printf("error in set_re_pad\n");
    db_flags = DB_CREATE;
    ret = db->open (db, NULL, dbName, NULL, DB_QUEUE, db_flags, 0);
    if (ret != 0) {
    printf ("database opening failed (%s) Error = %s\n", dbName, db_strerror (ret));
    memset (&key, 0, sizeof (DBT));
    memset (&data, 0, sizeof (DBT));
    // writing
    while (TRUE) {
    printf("record #%lu> ", (u_long)recno); fflush(stdout);
    fgets(buf, sizeof(buf), stdin);
    if(!strncmp(buf, "quit", 4)) {
    if (i > 0) ret = l_txn->commit (l_txn, 0);
    break;
    if ((len = strlen(buf)) <= 1) continue;
    key.data = &recno;
    key.flags = DB_DBT_USERMEM;
    key.ulen = sizeof(recno); // for the check out
    data.data = buf;
    data.size = len - 1;
    if (FirstTime) ret = env->txn_begin (env, NULL, &l_txn, 0);
    if (i == 2) {
    ret = l_txn->commit (l_txn, 0);
    ret = env->txn_begin (env, NULL, &l_txn, 0);
    i = 0;
    FirstTime = FALSE;
    switch (ret = db->put(db, NULL, &key, &data, DB_APPEND)) {
    case 0: printf("OK\n");
    ++i;
    break;
    default: db->err(db, ret, "DB->put"); break;
    db->close (db, 0);
    if (ret != 0) {
    printf ("database close failed (%s) Error = %s\n", dbName, db_strerror (ret));
    ret = env->close (env, 0);
    if (ret != 0) {
    printf ("database close failed (%s) Error = %s\n", dbName, db_strerror (ret));
    return(0);
    } // end of main

    To perform transactional operations on a Berkeley DB database, the DB->open call must be done in a transaction. The simplest way to do this is to change:
    db_flags = DB_CREATE;to:
    db_flags = DB_CREATE | DB_AUTO_COMMIT;Regards,
    Michael Cahill, Oracle Berkeley DB.

  • BC4J - Inserting Master/Detail records in same transaction.

    I know this is possible, but I seem to be missing something to allow it to happen within BC4J.
    I'm creating a RowSet off of a View Object and inserting new Rows into this RowSet. This RowSet represents my child/detail records for insert into a child table.
    I then create a new Row off of another View Object. This row represents my Master/parent record for insert into a parent table.
    All of the above is being done in the same applicationModule transaction with locking mode set to Optimistic.
    Before I commit the transaction, I grab the next sequence # to use as the primary key for the master record and the foreign key for the child records. I apply those to the newly created child rows and the newly created master row.
    However, when I commit I continue to get a JBO-26041: Failed to post data to database during "Insert": error due to ORA-02291: integrity constraint (CUST_LICENSES_FK4) violated - parent key not found
    If everything was created in the same transaction, why won't this allow me to insert into both tables with the correct primary/foreign keys? It's almost as if the child records are being inserted first prior to the parent record.
    Any ideas?
    Thanks in advance..
    Teri Kemple
    TUSC
    [email protected]

    However, when I commit I continue to get a JBO-26041: Failed to post data to database during "Insert": error due to ORA-02291: integrity constraint (CUST_LICENSES_FK4) violated - parent key not found
    If everything was created in the same transaction, why won't this allow me to insert into both tables with the correct primary/foreign keys? It's almost as if the child records are being inserted first prior to the parent record.This is due to the order of rows being posted. In this case it seems the detail row is getting posted before the master.
    To avoid such situations, either you may implement your own post ordering by making sure that when a detail is to
    be inserted, it's master is inserted or you may use "Composition Association" flag in the association wizard between
    the master and the detail entities to let the framework manage a tight composition relationship between the two entity
    types. BTW, there was another definitive thread recently on inserting master-detail in the
    same transaction, but the forum search engine is so useless I can't find it. Anyone
    have the msgid handy or know how to find that thread again??
    FYI: the help describes the Composition flag functionality in terms of the Master record already existing in the DB. In our problem here, the Master is being inserted in the same transaction. Thus needs to be posted FIRST.
    I got a integrity constraint exception too, then set the composition flag and now I get:
    500 Internal Server Error
    oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
         void oracle.jbo.server.EntityImpl.create(oracle.jbo.AttributeList)
         void gov.ga.gdc.otf.bc.JotfWithdrawalsImpl.create(oracle.jbo.AttributeList)
         void oracle.jbo.server.ViewRowStorage.create(oracle.jbo.AttributeList)
         void oracle.jbo.server.ViewRowImpl.create(oracle.jbo.AttributeList)
         oracle.jbo.server.ViewRowImpl oracle.jbo.server.ViewObjectImpl.createInstance(oracle.jbo.server.ViewRowSetImpl, oracle.jbo.AttributeList)
         oracle.jbo.server.RowImpl oracle.jbo.server.QueryCollection.createRowWithEntities(int[], oracle.jbo.server.EntityImpl[], oracle.jbo.server.ViewRowSetImpl, oracle.jbo.AttributeList)
         oracle.jbo.Row oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(int[], oracle.jbo.server.EntityImpl[], oracle.jbo.AttributeList)
         oracle.jbo.Row oracle.jbo.server.ViewRowSetImpl.createRow()
         oracle.jbo.Row oracle.jbo.server.ViewObjectImpl.createRow()
         void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.insertWithdrawal(java.lang.String, java.lang.String, java.math.BigDecimal, oracle.jbo.domain.Number, java.lang.Integer, int)
         void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.payOneObligation(java.lang.String, java.lang.String, java.lang.Integer, oracle.jbo.domain.Number, java.math.BigDecimal, int)
         void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.payObligations(java.lang.String, java.lang.String, java.math.BigDecimal, oracle.jbo.domain.Number)
         void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.receiveFunds(java.lang.String, java.lang.String, int, java.math.BigDecimal, java.lang.String, java.lang.String, java.lang.String, java.math.BigDecimal, long)TIA much! curt

  • Dirty reads within a transaction

    Hello,
    I have a method which inserts a record into a table and returns the primary key of the record which is generated via a trigger on insert.The problem is that I cannot read the row within the same transaction.Unless I do a explicit commit the select query keeps on returning 0 records.
    I am using the same Statment object to execute both insert and select queries. How can I read uncommitted data within the same transaction. I thought using the same statement object would allow me to do that.
    I tried to set the transaction isolation level to read uncommitted before the insert statement but oracle 9i drivers allow only read committed and serializable transaction levels.
    Any help is appreciated.
    Here is the code.
    //insert.
    connection.setAutoCommit(false);
    String insert_query = " insert into employee " .....
    stmt = connection.createStatement();
    stmt.executeUpdate(insert_query);
    //select
    select_query = "select employee_id from employee where ... ";
    stmt.executeQuery(select_query);
    if (rs.next())
    int primary_key = rs.getInt(1);
    stmt.close();
    connection.commit();
    connection.setAutoCommit(true);

    I tried the following using seperate 3 seperate statements (pseudo code) using the statement defaults for cursor types. This worked as designed (I was curious about the need for a single statement, it does not look like it is required):
    1) Open 1 connection
    1) set autocommit = false
    2) Create statement, then Select * from mytable, (row count = 3)
    3) Create statement, then Insert into mytable, (update count = 1)
    4) Create statement, then Select * from mytable (row count = 4)
    I didn't take this as far as creating the trigger, and yes, I know that could defintely have an effect on the overall behavior. I'm including the code so there is no confusion on what I did.
    It would have been my hypothesis that the trigger would have no effect on reading uncommited data within the same program / transaction. If there is any way you could post the code that shows the exact problem, I could probably do a better job of reproducing it in my environment.
    Here is the code I used:
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    class dbtest2 {
        public static void main (String args []) throws SQLException {
            try {
                String insert = "INSERT INTO TEST2 VALUES(1,'A',SYSDATE)";
                String select = "SELECT " +
                                    "COL1, " +
                                    "COL2, " +
                                    "TO_CHAR(COL3,'YYYY-MM-DD HH24:MI:SS') COL3DATE " +
                                "FROM TEST2";
                String col1, col2, col3;
                DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
                Connection conn = DriverManager.getConnection (
                                     "jdbc:oracle:thin:@riker:1521:clt12fva",
                                     "clarit",
                                     "clarit");
                conn.setAutoCommit(false);
                //  Select all rows from the table and display them
                Statement statement1 = conn.createStatement();
                ResultSet rs1 = statement1.executeQuery(select);
                int rowctr1 = 0;
                while(rs1.next()) {
                    rowctr1++;
                    col1 = rs1.getString(rs1.findColumn("COL1"));
                    col2 = rs1.getString(rs1.findColumn("COL2"));               
                    col3 = rs1.getString(rs1.findColumn("COL3DATE"));
                    System.out.println("Row="+rowctr1+" col1="+col1+" col2="+col2+" col3="+col3);  
                // Insert a new row with autocommit = false;
                Statement statement2 = conn.createStatement();
                int updateCount = statement2.executeUpdate(insert);
                System.out.println("updateCount="+updateCount);
                //  Select all rows from the table and display them
                Statement statement3 = conn.createStatement();           
                ResultSet rs3 = statement3.executeQuery(select);
                int rowctr3 = 0;
                while(rs3.next()) {
                    rowctr3++;
                    col1 = rs3.getString(rs3.findColumn("COL1"));
                    col2 = rs3.getString(rs3.findColumn("COL2"));               
                    col3 = rs3.getString(rs3.findColumn("COL3DATE"));
                    System.out.println("Row="+rowctr3+" col1="+col1+" col2="+col2+" col3="+col3);  
                //  Rollback the changes and close the JDBC objects
                conn.rollback();
                rs1.close();
                rs3.close();
                statement1.close();
                statement2.close();
                statement3.close();
            catch (Exception e) {
                System.out.println("Java Exception caught, error message="+e.getMessage());
    }Console Results:
    Row=1 col1=123.123 col2=1.01 col3=2002-12-31 23:04:01
    Row=2 col1=3333.333 col2=5 col3=2002-12-31 23:04:01
    Row=3 col1=5 col2=10000 col3=2002-12-31 23:04:01
    updateCount=1
    Row=1 col1=123.123 col2=1.01 col3=2002-12-31 23:04:01
    Row=2 col1=3333.333 col2=5 col3=2002-12-31 23:04:01
    Row=3 col1=5 col2=10000 col3=2002-12-31 23:04:01
    Row=4 col1=1 col2=A col3=2002-12-27 00:24:10

  • How to Create and Remove CMP Entity with Toplink in same transaction??

    Hi, i have a problem to create and delete cmp intances with toplink.
    I create a entity bean and remove the same entity bean in the same transaction.
    ie. my method have this code:
    bean a = homeBean.create(pk);
    a.remove();
    bean a = homeBean.create(pk);
    this code throws a javax.ejb.DuplicateKeyException
    Toplink not remove CMP, execute the two calls of create first.
    What configure toplink to support this case ??
    Is this possible ??
    I Can't controling the transaction manualy i'm using CMP entity beans with CMT.
    tanks.
    Message was edited by:
    Carlos Lacerda

    BM,
    If you want to import the utils package into your code, then the location of the utils package has to be in your CLASSPATH. JDeveloper uses libraries to define a project's CLASSPATH.
    I'm not sure exactly what's going on here, but you might want to read the information about packages and class libraries in the online documentation. It's under:
    User Guides
    -> Working with JDeveloper
    -> Packages and Class Libraries
    Blaise

  • Error in shared component import within same as well as diff instance.

    Please help me with below issue:
    I am trying to import shared components related to a single page within same instance to diff application.I changed the application_id to target application_id and also set wwv_flow_api.g_id_offset to diff value.
    Still getting following error:
    ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-00001: unique constraint (APEX_030200.WWV_FLOW_MENU_TEMP_IDX2) violated &lt;pre&gt;begin begin wwv_flow_api.create_menu_template ( p_id=&amp;gt; 94480251996632657 + wwv_flow_api.g_id_offset, p_flow_id=&amp;gt; wwv_flow.g_flow_id, p_name=&amp;gt;'Breadcrumb Menu', p_before_first=&amp;gt;'', p_current_page_option=&amp;gt;'&amp;lt;a href=&amp;quot;#LINK#&amp;quot; class=&amp;quot;t20Current&amp;quot;&amp;gt;#
    And also tried to import shared components of single page to a application in diff instance.I changed the application_id,workspace_id with target application_id and workspace_id and also set wwv_flow_api.g_id_offset to diff value.
    there also I am getting same error.

    The error seems to be that the template (some breadcrumb template) does exist already. What kind of shared component do you want to copy? Some, like images and templates, can be shared between applications in the same workspace. Thats the main reason why they are named "shared". Also possible would be that this component was created or is using some standard template/theme/menu, that is created during the standard apex installation. Or it was already copied during the workspace installation.
    Edited by: Sven W. on Aug 7, 2012 7:42 PM

  • Control multiple updates and queries within one transaction in JPA

    Hi,
    I have a question regarding control multiple updates and queries within one transaction. We are using EclipseLink 2.3.1. With below code, will I be able to:
    - have all insert, update, select queries committed in one transaction;
    - queryGetBalance will return the latest OrgBalance after update;
    - if one fails, everything rolls back.
    Thanks!
    Jeffrey
    PS: I realized that I cannot use em.getTransaction().begin() and em.getTransaction().commit(), since I am using JTA.
    =============
    @PersistenceContext(unitName="Test")
    EntityManager em;
    em.setFlushMode(FlushModeType.COMMIT);
    newTransaction.setAmount(1000);
    newTransaction.setType("check");
    em.persist(newTransaction);
    orgAudit.setUpdateUser("Joe")
    orgAudit.setupUpdateTime(time);
    em.merge(orgAudit);
    Query queryUpdateBalance = em.createQuery("update OrgBalance o set o.balance = o.balance + :amount where orgId = :myOrgId");
    queryUpdateBalance.setParameter("amount", 1000);
    queryUpdateBalance.setParameter("myOrgId", 1234);
    Query queryGetBalance = em.createQuery("select OrgBalance o where o.orgId = :myOrgId");
    queryGetBalance.setHint("javax.persistence.cache.storeMode", CacheStoreMode.REFRESH);
    queryGetBalance.setHint("javax.persistence.cache.retrieveMode", CacheRetrieveMode.BYPASS);
    queryGetBalance.getResultList();
    em.flush();
    Edited by: JeffreyW on Dec 12, 2011 10:34 AM

    Yes, the operation will be in a single transaction, assuming you are using a JTA managed SessionBean and the code is part of a SessionBean method.

  • Drag and drop row within same table.

    Version 12.1.2
    I am trying to implement drag and drop row within same table, and I am trying to follow this sample from Frank:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/106-reorder-table-rows-1921121.pdf
    But, I am getting this cast exception. The code I have in my dropEvent bean is identical to whats on the sample.
    oracle.jbo.server.ViewRowImpl cannot be cast to oracle.jbo.uicli.binding.JUCtrlHierNodeBinding
    ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #1
    Not sure if anything has changed on 12c release, or if I am missing anything.
    Here is my complete code:
    public DnDAction doDnD(DropEvent dropEvent) {
    RichTable table = (RichTable) dropEvent.getDragComponent();
    List dropRowKey = (List) dropEvent.getDropSite();
    if (dropRowKey == null) {
    return DnDAction.NONE;
    Transferable t = dropEvent.getTransferable();
    DataFlavor<RowKeySet> df = DataFlavor.getDataFlavor(RowKeySet.class, "rowmove");
    RowKeySet rks = t.getData(df);
    Iterator iter = rks.iterator();
    List draggedRowKey = (List) iter.next();
    JUCtrlHierNodeBinding draggeRowNode = (JUCtrlHierNodeBinding) table.getRowData(draggedRowKey);
    Row dragRow = draggeRowNode.getRow();
    JUCtrlHierNodeBinding dropRowObject = (JUCtrlHierNodeBinding) table.getRowData(dropRowKey);
    Row dropRow = dropRowObject.getRow();
    //get the table's ADF JUCtrlHierBinding
    CollectionModel collectionModel = (CollectionModel) table.getValue();
    JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) collectionModel.getWrappedData();
    DCIteratorBinding objectsIterator = treeBinding.getDCIteratorBinding();
    RowSetIterator rsi = objectsIterator.getRowSetIterator();
    int indexOfDropRow = rsi.getRangeIndexOf(dropRow);
    dragRow.removeAndRetain();
    rsi.insertRowAtRangeIndex(indexOfDropRow, dragRow);
    objectsIterator.setCurrentRowIndexInRange(indexOfDropRow);
    AdfFacesContext adfctx = AdfFacesContext.getCurrentInstance();
    adfctx.addPartialTarget(table.getParent());
    return DnDAction.MOVE;
    It does not seem to like this line of code:
    JUCtrlHierNodeBinding draggeRowNode = (JUCtrlHierNodeBinding) table.getRowData(draggedRowKey);
    I would greatly appreciate any help.
    Thanks.

    Well there has bee a changes somehow. using 12c
    table.getRowData(draggedRowKey);
    returns a ViewRowImpl and no longer anything which can be convertet to JUCtrlHierNodeBinding. Anyway, the fix is easy:
        public DnDAction onDepartmentsRowDrop(DropEvent dropEvent) {
            //get the table instance. This information is later used
            //to determine the tree binding and the iterator binding
            RichTable table = (RichTable) dropEvent.getDragComponent();
            List dropRowKey = (List) dropEvent.getDropSite();
            //if no dropsite then drop area was not a data area
            if (dropRowKey == null) {
                return DnDAction.NONE;
            //The transferable is the payload that contains the dragged row's
            //row key that we use to access the dragged row handle in the ADF
            //iterator binding
            Transferable t = dropEvent.getTransferable();
            //get the row key set of the dragged row. The "rowmove" string is the
            //discriminant defined on the drag source and the collectionDrop target.
            DataFlavor<RowKeySet> df = DataFlavor.getDataFlavor(RowKeySet.class, "rowmove");
            RowKeySet rks = t.getData(df);
            Iterator iter = rks.iterator();
            //for this use case the re-order of rows is one-by-one, which means that the rowKeySet
            //should only contain a single entry. If it contains more then still we only look at a
            //singe (first) row key entry
            List draggedRowKey = (List) iter.next();
            //get access to the oracle.jbo.Row instance represneting this table row
            Object objdragg = table.getRowData(draggedRowKey);
            Row dragRow = (Row) objdragg;
            Object objdrop = table.getRowData(dropRowKey);
            Row dropRow = (Row) objdrop;
            //get the table's ADF JUCtrlHierBinding
            CollectionModel collectionModel = (CollectionModel) table.getValue();
            JUCtrlHierBinding treeBinding = (JUCtrlHierBinding) collectionModel.getWrappedData();
            //get access to the ADF iterator binding used by the table and the underlying RowSetIterator.
            //The RowSetIterator allows us to remove and re-instert the dragged row
            DCIteratorBinding departmentsIterator = treeBinding.getDCIteratorBinding();
            RowSetIterator rsi = departmentsIterator.getRowSetIterator();
            int indexOfDropRow = rsi.getRangeIndexOf(dropRow);
            //remove dragged row from collection so it can be added back
            dragRow.removeAndRetain();
            rsi.insertRowAtRangeIndex(indexOfDropRow, dragRow);
            //make row current in ADF iterator.
            departmentsIterator.setCurrentRowIndexInRange(indexOfDropRow);
            //ppr the table
            AdfFacesContext adfctx = AdfFacesContext.getCurrentInstance();
            //note that the refresh of the table didn't work when refreshing the table
            //so I needed to refresh the container component (af:panelStretchLayout).
            adfctx.addPartialTarget(table.getParent());
            return DnDAction.MOVE;
    does the trick. I changed the line to
    //get access to the oracle.jbo.Row instance represneting this table row
            Object objdragg = table.getRowData(draggedRowKey);
            Row dragRow = (Row) objdragg;
    so you don't need the detour through the JUCtrlHierNodeBinding any longer.
    Timo

  • ORA-00164: autonomous transaction disallowed within distributed transaction

    I have been trying to solve this problem for weeks now, I have posted this question everywhere I can think of, but I havent really received and answer that has helped, so now I am going to post it here hoping for an answer.
    We are running 9iAS on Solaris and when the following stuff is run we are getting ORA-00164 errors. If you refresh the page a bunch of time the problem goes away. But it comes back the next time you try to execute the procedure again. Here are the cases when the problem shows up.
    Editing the style:
    PROCEDURE : PORTAL30.wwpob_app_style.edit_style
    Saving changes to the banner for a page
    PROCEDURE : PORTAL30.wwptl_banner.savecustom
    Logging out
    PROCEDURE : PORTAL30.wwsec_app_priv.logout
    After setting the default user group and applying the changes:
    PROCEDURE : PORTAL30.wwsec_app_user_mgr.edit_user
    Creating a new group:
    PROCEDURE : PORTAL30.wwsec_app_group_mgr.create_group
    Opening the add portlet screen:
    PROCEDURE : PORTAL30.wwv_main.main
    There are a few other places but I don't have them documented. In ALL cases the problem goes away once we start and stop the Apache using the following comands:
    /app/oracle/n_portal/Apache/Apache/bin/apachectl stop
    ps -ef | grep httpd | grep n_portal
    /app/oracle/n_portal/Apache/Apache/bin/apachectl start
    After starting and stopping Apache the problem is gone for a little while (20-30 mins) then it starts coming back slowly (sometimes the problem is there then it is not). Once the problem is back if you continually press refresh on the browser (5-10 times) the page might appear, if the page does not appear you will see the
    ORA-00164: autonomous transaction disallowed within distributed transaction
    The following error appears in apache log (50% of the time) when Autonomous Transaction error shows up on the screen:-
    DSHttpSessionBindingListenerImpl.valueUnbound : closing DS session : DSSession id = 5225534324468880950975536484
    215 PortalSession id = 521335001720MERAJ
    DSHttpSessionBindingListenerImpl.valueUnbound : closing DS session : DSSession id = -638034231325135430097553725
    8001 PortalSession id = 992335001711JDALGLIESH
    These errors might be related to dynamic services but we were had the problem long before Dynamic services was installed.
    We want to start pre-production user testing as we have just had 11 developers building portlets for the company, but we cant do much with this error popping up every time a user wants to test it. We have one of the Oracle consultants here and he has asked the oracle developer group what the problem could be, and they seem to think it might be related to our use of DB links however, we never get the problem when we try to run a portlet that uses a database link.
    Please help.
    Jeff Dalgliesh
    null

    Jay,
    My name is Craig McCauley. I'm an Oracle Technical Manager working onsite at Unocal Indonesia. I'm with the Portal group in ATS.
    When I got here the first thing we did was bump up init.ora parameters and apache confif parameters as suggested by the iPlatform group. We have thes sessions parameter (in init.ora) bumped up from 100 to 700. I'm watching v$session and the get these AT messages with as few as 70 total db sessions. Any help your group can give will be greatly appreciated.
    Unocal is planning on implementing Oracle Portal globally - as a common interface. They have similar installs in Thailand and Houston and thus far have not seen the AT messages (although there has not been much development going on at those sites).
    Thanks,
    Craig

  • Oracle.xml.sql.OracleXMLSQLException:Cannot enable auto commit within JTS transaction

    Hi All,
    OracleXMLSave class in the Oracle XDK is being used to load XML data into an 8170 database. The Java code is running in IBM WebSphere with container-managed transactions. When JTA is enabled with the Merant JDBC driver for Oracle, we get the following error when the XML is loaded:
    oracle.xml.sql.OracleXMLSQLException: Cannot enable auto commit within JTS
    transaction
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2213)
         at oracle.xml.sql.dml.OracleXMLSave.insertXML(Compiled Code)
    This suggests the OracleXMLSave class is not aware of the fact that it is now operating in a JTS transaction where control is managed elsewhere. i.e. should also not attempt to commit or rollback, as this is the responsibility of the container.
    Is there a property which needs to set to prevent the above or does the XDK not work with J2EE (JTS) transactions?.
    If you have any useful comments, let me know. Testing the above presents me with a number of problems so if this is easily explained , let me know.
    Thanks,
    Malcolm

    Clearly , there does seem to be something a bit odd with the above stack.
    <Bug:1917808> mentions OracleXMLSave in context of plsql equivalent : dbms_xmlsave . i.e dbms_xmlsave is a wrapper around OracleXMLSave class.
    disabling autocommit on connection as follows should help:
    conn = DriverManager.getConnection("connect string","scott","tiger");
    conn.setAutoCommit(false);
    to disble auto commit and see if this has an effect.
    This issue might be <Bug:1497506>. If disabling autocommit does not work then it appears that it could be this issue .
    Malcolm
    Hi All,
    OracleXMLSave class in the Oracle XDK is being used to load XML data into an 8170 database. The Java code is running in IBM WebSphere with container-managed transactions. When JTA is enabled with the Merant JDBC driver for Oracle, we get the following error when the XML is loaded:
    oracle.xml.sql.OracleXMLSQLException: Cannot enable auto commit within JTS
    transaction
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2213)
         at oracle.xml.sql.dml.OracleXMLSave.insertXML(Compiled Code)
    This suggests the OracleXMLSave class is not aware of the fact that it is now operating in a JTS transaction where control is managed elsewhere. i.e. should also not attempt to commit or rollback, as this is the responsibility of the container.
    Is there a property which needs to set to prevent the above or does the XDK not work with J2EE (JTS) transactions?.
    If you have any useful comments, let me know. Testing the above presents me with a number of problems so if this is easily explained , let me know.
    Thanks,
    Malcolm

  • Oracle 11g: How to ensure the same transaction across several BPEL calls?

    How to ensure transaction semantics across invocations of several BPEL services with a Database operations (Insert, update)? We are using transaction REQUIRED property in all of our BPELs. We are using webserive and JCA to access and modify the same row. Our code uses a combination of JCA, Spring bean, enity services, EJBs in these BPELs. The code can be more efficient, but, at this point, we have no option but to fix the transaction issue in this code. So, our question is how to ensure the same transaction context is used in all these BPELs to inser/update the same row? We have tried to set the GetUnitOfWork in the JCA Adapter but it did not provide any solution. Apaert from setting transaction in BPEL to REQUIRED and the JCA Adapter to use Unit of work, we are out of ideas. Any help is much apprecited. We are using Oracle SOA Suite 11g 11.1.1.5 version. --chary

    Hi,
    I can help you if you can describe the processes.
    There can be some difficulties when you try to use the same transaction especially when you use many DB transactions & BPEL processes.
    Using unit of work only ,might not be enough.
    Thanks
    Arik

Maybe you are looking for

  • Constrain window to image in tab view, how?

    I have photoshop workspace set up with the open documents across the top in tabs. Usually one of those tabs is the "Host" document and the other tabs are "Element" documents. In the process of creating, Element documents are usually resized to fit in

  • Site fine in Safari, but not in Firefox

    so I made a simple photo page in iWeb. the page works fine in safari, but I actually get a 404, page not found error when I look at it in Firefox. now the even weirder thing is I get this error on my macbook pro, but it works just fine in firefox on

  • Playing video via the native iphone movieplayer

    Does anyone know how you can launch a video (m4v) using the native iphone movieplayer WITHOUT first launching safari? I need to return to my app after the movieplayer stops. Now, if I launch a movie with a URLRequest the app closes, launches safari a

  • Client Copy - Sap Netweaver 7.3

    Hi Folks, I am working on SAP Netweaver release 7.3 and I'd like to know if there is any best practices to perform client copy for this new version. Tks a  lot Mari

  • Can a US resident purchase from a non-US Music Store?

    When I (a US resident) attempt to purchase from the French or Italian Music Stores, I get the following message: "Your account is only valid for purchases in the US Music Store. Clicking OK will take you to this store." (1) Is there any way I can ame