Create oracle.jbo.Key with String

Hello

I use JDeveloper 12.1.3.

Someone give me a working example of the creation of oracle.jbo. Key with the string in the constructor.

All the tutorial I have tried do not work for me.

THX.

I just did a small test case using the table HR job because he has a channel a PK.

inside the JobsViewImpl, I've implemented a method

public String dummyTest() {}

String strkey1 = "01234";

String srtkey2 = "9876";

Key = new key (new Object() {strkey1});

Line lines [] = findByKey (key, 1);

If (rows.length > 0) {}

String res = (String) rows [0] .getAttribute ("JobTitle");

return res;

} else {}

return "nothing found";

}

}

What called wenn of the Tester application module returns

and the data in the table

Summary: it works for me.

One thing I saw is that you used a constructor that is not recommended for the key as the new Key (String) is obsolete.

Timo

Tags: Java

Similar Questions

  • Another user changed the row with a primary key oracle.jbo.Key]

    I see many discussions about this error, but still cannot understand the difficulty that I need in my scenario.

    I am an Oracle Developer and completely new to ADF, please bear with me.

    I use JDeveloper 11.1.1.9.0

    My scenario:

    Creates an object editable view (UVO) with sub selects in the query, which is from several db tables.

    Creating a table using the UVO

    When I try to update a field in the table, and then click the validate, I get the error message:

    Another user changed the row with a primary key oracle.jbo.Key]

    Can someone explain in what scenarios I see this error and how do I solve this problem?

    Try the viewObject execution after validation and reQueryOnCommit set to true

    For details see - binary: a reason more for "Houston-25014: another user has modified the line containing oracle.jbo.Key primary key '

    Ashish

  • Feature line with key oracle.jbo.key is not found

    I've seen similar issues posted here but no go in enough detail to help me solve the problem I have just started using Oracle ADF a few hours ago.

    I have connected to our oracle successfully database and set up the display of an entity based on a base table which seems to have worked very well. When I run AppModule I see all the fields of the fine table, but when I change a content of columns to a valid value, and then click validation I get this error: "line entity with key oracle.jbo.key [all fields in table] is not found in the table" even though I don't know why, because it is without a doubt.

    The base table is a table of configuration when a new record is added manually a sequence is triggered to autopopulate the column id of the table. I read that this trigger could be the problem but I'm not sure why, as I'm only an update on an existing id, not create new ones?

    User, tell us your version of jdev, please!

    The framework must be a primary key defined on a table that you want to update. It will be weird if your doe not table a PK. define a pk in the table (if you cannot change the db, you can define the pk in the framework and try again.

    Timo

  • Houston-25019: line entity with key oracle.jbo.Key not found

    Hi guys,.

    I just started learning ADF and I'm stuck on this issue. I created a very simple page based on a table. I have check the button submit to be allowed on the page, then drag the operator commit button. Together the partial trigger to panelformlayout and changed the status of the fields for autosubmit to true.

    Now, I get this error when I change any value in the field and press the submit button. Don't know what else to do. Any help would be greatly appreciated.


    oracle.jbo.RowAlreadyDeletedException: Houston-25019: line entity with oracle.jbo.Key [1842 key null null null 6257 null null null null null null null null null null Sr accountant null null null null null null null null null null null null null 25 April 25, 2014 / Apr / 2014-09: 00:07] is not in XxaseIvantInterfaceHr.

    How many rows were marked as primary key in your EO/VO? Make sure only relevant ae marked. Looks something like this - http://3.bp.blogspot.com/_ex9GjJ9fvbk/TIiIfaJ3gqI/AAAAAAAAAEw/XfYhBthhyKE/s1600/7.JPG

    Ether this or if you have a use case for PK actually as much of your line is deleted in the DB or data types are mismatched.

    My thoughts: strange problem of ADF, Timepart a Date lost

  • If you select value of LOV gets this oracle.jbo.InvalidOperException: No. JBO-34014 no child node found for line with key:oracle.jbo.Key when inserting line

    I use JDev 12 c on Windows 7 Pro

    I do a CreateInsert in ADF button on af:table. The model is set up so that T1 is one to many with t2, t2 is one to many with t3.

    I have recordings in t1 and t2, and trying to insert a record into t3.

    After I click the button, two of the three PK columns have values of t2. The third column is served by LOV. I open the LOV and select a value, and I get this exception:

    oracle.jbo.InvalidOperException: Houston-34014: no child node not found for line with key:oracle.jbo.Key [79449 Xnnnn-nn-X-nnnn null] under parent node: root

    at oracle.jbo.uicli.binding.JUCtrlHierBinding.bringNodeToRangeKeyPath(JUCtrlHierBinding.java:875)

    at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding.bringNodeToRangeKeyPath(FacesCtrlHierBinding.java:121)

    at oracle.adfinternal.view.faces.model.binding.RowDataManager.setRowKey(RowDataManager.java:131)

    to oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$ FacesModel.setRowKey (FacesCtrlHierBinding.java:951)

    at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(UIXCollection.java:553)

    at org.apache.myfaces.trinidad.component.UIXTable.setRowKey(UIXTable.java:768)

    at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:188)

    more of the stack trace was stopped for brevity.

    I've seen other posts related to this exception but no solid answers. I tried a few suggestions but nothing worked.

    If I remove the 3rd key I can insert a line, but on the second row, I get an error indicating that the primary key violation. It's like the page checks the constraints of the entity before the validation.

    Insert in this table works fine in the tester model.

    Thank you

    Dave

    And by LOV you mean: af:inputListOfValues?

    It usually works within the af: table if you VO with composite key.

    Maybe you can set ChangeEventPolicy = none on your iterator, but it will probably not help.

    Dario

  • oracle.jbo.Key key creates Blad: java.io.StreamCorruptedException: in Groovy

    Hello

    I use JDeveloper 12.1.3.

    I have the transitional VO attribute. It is based on groovy expression.

    Whenever I have add

    key oracle.jbo.Key = new oracle.jbo.Key (myattribute); I get:

    java.io.StreamCorruptedException: invalid stream header: 01000000

    java.io.StreamCorruptedException: invalid stream header: 10000000

    Irony is that it works on other projects of the ADF. And Yes myattribute PK.

    Any help or suggestion.

    Thank you

    The problem described here i part of known Bug in Oracle ADF.

    BUG 19285994 - GROOVY COMPILATION ERROR

  • Exception in thread "AWT-EventQueue-0" oracle.jbo.TooManyObjectsException: Houston-25013: too many objects correspond to the oracle.jbo.Key [4 primary key].

    Mr President

    I am able to add records with the following method but when I navigate through folders and then I get the above error.

    When you use this code in my doDML()

    package model;
    
    
    import java.sql.PreparedStatement;
    
    
    import oracle.jbo.Key;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.EntityDefImpl;
    import oracle.jbo.server.EntityImpl;
    import oracle.jbo.server.SequenceImpl;
    import oracle.jbo.server.TransactionEvent;
    // ---------------------------------------------------------------------
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Tue Nov 10 11:03:43 PKT 2015
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    // ---------------------------------------------------------------------
    public class TableNameImpl extends EntityImpl {
        /**
         * AttributesEnum: generated enum for identifying attributes and accessors. DO NOT MODIFY.
         */
        public enum AttributesEnum {
            Column1,
            Column2,
            Column3,
            JoinColumn,
            HiddenColumn;
            private static AttributesEnum[] vals = null;
            private static final int firstIndex = 0;
    
    
            public int index() {
                return AttributesEnum.firstIndex() + ordinal();
            }
    
    
            public static final int firstIndex() {
                return firstIndex;
            }
    
    
            public static int count() {
                return AttributesEnum.firstIndex() + AttributesEnum.staticValues().length;
            }
    
    
            public static final AttributesEnum[] staticValues() {
                if (vals == null) {
                    vals = AttributesEnum.values();
                }
                return vals;
            }
        }
        public static final int COLUMN1 = AttributesEnum.Column1.index();
        public static final int COLUMN2 = AttributesEnum.Column2.index();
        public static final int COLUMN3 = AttributesEnum.Column3.index();
        public static final int JOINCOLUMN = AttributesEnum.JoinColumn.index();
        public static final int HIDDENCOLUMN = AttributesEnum.HiddenColumn.index();
    
    
        /**
         * This is the default constructor (do not remove).
         */
        public TableNameImpl() {
        }
    
    
        /**
         * Gets the attribute value for Column1, using the alias name Column1.
         * @return the value of Column1
         */
        public Number getColumn1() {
            return (Number) getAttributeInternal(COLUMN1);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for Column1.
         * @param value value to set the Column1
         */
        public void setColumn1(Number value) {
            setAttributeInternal(COLUMN1, value);
        }
    
    
        /**
         * Gets the attribute value for Column2, using the alias name Column2.
         * @return the value of Column2
         */
        public Number getColumn2() {
            return (Number) getAttributeInternal(COLUMN2);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for Column2.
         * @param value value to set the Column2
         */
        public void setColumn2(Number value) {
            setAttributeInternal(COLUMN2, value);
        }
    
    
        /**
         * Gets the attribute value for Column3, using the alias name Column3.
         * @return the value of Column3
         */
        public Number getColumn3() {
            return (Number) getAttributeInternal(COLUMN3);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for Column3.
         * @param value value to set the Column3
         */
        public void setColumn3(Number value) {
            setAttributeInternal(COLUMN3, value);
        }
    
    
        /**
         * Gets the attribute value for JoinColumn, using the alias name JoinColumn.
         * @return the value of JoinColumn
         */
        public Number getJoinColumn() {
            return (Number) getAttributeInternal(JOINCOLUMN);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for JoinColumn.
         * @param value value to set the JoinColumn
         */
        public void setJoinColumn(Number value) {
            setAttributeInternal(JOINCOLUMN, value);
        }
    
    
        /**
         * Gets the attribute value for HiddenColumn, using the alias name HiddenColumn.
         * @return the value of HiddenColumn
         */
        public Number getHiddenColumn() {
            return (Number) getAttributeInternal(HIDDENCOLUMN);
        }
    
    
        /**
         * Sets <code>value</code> as the attribute value for HiddenColumn.
         * @param value value to set the HiddenColumn
         */
        public void setHiddenColumn(Number value) {
            setAttributeInternal(HIDDENCOLUMN, value);
        }
    
    
        /**
         * @param column1 key constituent
    
    
         * @return a Key object based on given key constituents.
         */
        public static Key createPrimaryKey(Number column1) {
            return new Key(new Object[] { column1 });
        }
    
    
        /**
         * @return the definition object for this instance class.
         */
        public static synchronized EntityDefImpl getDefinitionObject() {
            return EntityDefImpl.findDefObject("model.TableName");
        }
    
    
        /**
         * Add locking logic here.
         */
        public void lock() {
            super.lock();
        }
    
    
        /**
         * Custom DML update/insert/delete logic here.
         * @param operation the operation type
         * @param e the transaction event
         */
        protected void doDML(int operation, TransactionEvent e) {
                if(operation == DML_INSERT)
                    {
                      SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
                      oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
                      setJoinColumn(seqValue);
                      insertSecondRowInDatabase(getColumn1(), getColumn2(), getColumn3(), getJoinColumn());
                    }
                   
                    if(operation == DML_UPDATE)
                    {
                      updateSecondRowInDatabase(getColumn1(), getColumn2(), getColumn3(), getJoinColumn());
                    }
                super.doDML(operation, e);
            }
          
            private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
              {
                PreparedStatement stat = null;
                try
                {
                  String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
                  System.out.println("sql= " + sql);  
                  stat = getDBTransaction().createPreparedStatement(sql, 1);
                  stat.executeUpdate();
                }
                catch (Exception e)
                {
                  e.printStackTrace();
                }
                finally
                {
                  try
                  {
                    stat.close();
                  }
                  catch (Exception e)
                  {
                    e.printStackTrace();
                  }
                }
              }
            
              private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
              {
                PreparedStatement stat = null;
                try
                {
                  String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
                  System.out.println("sql= " + sql);    
                  stat = getDBTransaction().createPreparedStatement(sql, 1);
                  stat.executeUpdate();
                }
                catch (Exception e)
                {
                  e.printStackTrace();
                }
                finally
                {
                  try
                  {
                    stat.close();
                  }
                  catch (Exception e)
                  {
                    e.printStackTrace();
                  }
                }
              }
        }
    
    
    

    To me the error.

    Exception in thread "AWT-EventQueue-0" oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[4 ].
      at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:862)
      at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:555)
      at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:9089)
      at oracle.jbo.server.EntityImpl.populate(EntityImpl.java:7664)
      at oracle.jbo.server.EntityImpl.merge(EntityImpl.java:8008)
      at oracle.jbo.server.EntityCache.addForAltKey(EntityCache.java:1189)
      at oracle.jbo.server.EntityCache.add(EntityCache.java:579)
      at oracle.jbo.server.ViewRowStorage.entityCacheAdd(ViewRowStorage.java:3454)
      at oracle.jbo.server.ViewRowImpl.entityCacheAdd(ViewRowImpl.java:4062)
      at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:6351)
      at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:4145)
      at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:4000)
      at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2491)
      at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5540)
      at oracle.jbo.server.ViewRowSetIteratorImpl.getRowInternal(ViewRowSetIteratorImpl.java:3590)
      at oracle.jbo.server.ViewRowSetIteratorImpl.hasNext(ViewRowSetIteratorImpl.java:2007)
      at oracle.jbo.server.ViewRowSetImpl.hasNext(ViewRowSetImpl.java:3859)
      at oracle.jbo.server.ViewObjectImpl.hasNext(ViewObjectImpl.java:11845)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.isOperationEnabled(JUCtrlActionBinding.java:473)
      at oracle.jbo.uicli.binding.JUCtrlActionBinding.isActionEnabled(JUCtrlActionBinding.java:300)
      at oracle.jbo.uicli.controls.JUNavigationBar._isEnabled(JUNavigationBar.java:1345)
      at oracle.jbo.uicli.controls.JUNavigationBar._updateButtonStates(JUNavigationBar.java:1334)
      at oracle.jbo.jbotester.app.NavigationBar._updateButtonStates(NavigationBar.java:123)
      at oracle.jbo.uicli.controls.JUNavigationBar$3.run(JUNavigationBar.java:1249)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
      at java.awt.EventQueue.access$500(EventQueue.java:97)
      at java.awt.EventQueue$3.run(EventQueue.java:709)
      at java.awt.EventQueue$3.run(EventQueue.java:703)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    
    
    

    Concerning

    You can't repeat the value of pharmacokinetics in several lines. try to follow this:

    1. in your database to create new sequence "PK_SEQ".

    2. in doDML write this

        if (operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          setPKey(getPkSeqNextNumber())
          insertSecondRowInDatabase(getPkSeqNextNumber(), getColumn1(), getColumn2(), getColumn3(), getJoinColumn());
        }
    

    the getPkSeqNextNumber will be

    private Number getPkSeqNextNumber()
    {
      SequenceImpl pkSeq = new SequenceImpl("PK_SEQ", getDBTransaction());
      return pkSeq.getSequenceNumber();
    }
    

    or

    You can do a trigger in the database, this trigger Gets the value of the sequence and sets the pkey to insert before

  • Too many objects correspond to the primary key oracle.jbo.Key

    I get this error: Too many objects match the primary key oracle.jbo.Key when I tried to look for in a display object where the primary key is consists of more than one filed.

    Use case:

    In Jdeveloper 11.1.2.3 I Entity object called someTable this table has three fields A,B and C where the primary key is consist class towing A and B .

    I created different towing View object of someTable object enity that are someTableVO1 and someTableVO2 . Rated A in the view object somtableVO1 is a List Of Value(LOV) and the data are coming form filed A in the someTableVO2 .

    In application I have a search page that contains a drop-down list of registered A in somTableVO1 . Based on certain conditions, the drop-down list of the values in the list is not static. The value of the drop-down list is editable based on a select query run on someTableVO1 and it is based on the class thried C is NOT part of the primary key .

    The page displays the drop down menu with the correct values. But I have a ValeChangeListener method that will be activated whenever the user selects a value form the drop-down list.

    The problem is:

    The error Too many objects match the primary key is occur whenever I am executing this method.

    Support:

    I think the problem is with multiple fields for the primary key. of curse, there is an overlap in a part of the primary key (IE that paid A or B ) but the combination of A and B are always unique.

    Notes:

    1. I check the query by executing SQL Developer and it shows not all duplicate values.

    2 I don't attach code, because I think that the problem is not on (how to) this is (what to do).

    I hope that the idea is clear

    Problem solved.

    My goal was to show a summer that A form someTableVO1 as a list of value and I was trying to achieve by creating the list of value the same form Entity object . I understand that it was the wrong approach (correct me if I'm wrong). to achieve this in ADF technology, I have to do the following:

    1. Simply to drag and drop the view object from the Data Controls page.
    2. List of options appears asking how you want to display the view object (shape, chart, table, only one selection,...).

    3. Select Single Selection ->ADF one Selection

    4. Select the attributes that you want to show the user a list of values.

    Thanks for your comments.

  • Too many objects match the [2044 primary key] oracle.jbo.Key. ;

    When I try to use the Accounting Setup Manager Wizard, I get an empty error message and when I click once again, I get the following exception:

    Application: DNF, Message name: FND_GENERIC_MESSAGE. Chips: MESSAGE = oracle.jbo.TooManyObjectsException: Houston-25013: too many objects correspond to the oracle.jbo.Key [2044 primary key]. ;


    Any ideas?

    P.S. I did all my storage spaces, CanGrow, I chose a method of accounting, and I checked to make sure my balance field has a valid value defined.

    EDIT: I made a new calendar and it worked. Sorry for the question as "stupid". It's a pretty stupid error if, in my defense

    Published by: ASCI Sep 21, 2012 11:32

    Please see these documents.

    R12: Accounting Setup Manager errors with Houston-25013 too many objects Match The Primary Key oracle.jbo.Key [604784.1 ID]
    Accountant Assistant with Exception Houston-25013 [ID 1276858.1] Setup Manager
    General Ledger FAQ for Accounting Assistant Setup Manager (ASM) [ID 778826.1]
    Houston-25013: too many objects correspond to the primary key [730055.1 ID] oracle.jbo.Key
    How to create a book of model with minimal GL installation for the installation of the Agency? [1300365.1 ID]

    Thank you
    Hussein

  • Another user has modified the line containing oracle.jbo.Key [5046 primary key].

    The application of the ADF was working fine until I made the following changes. I changed the phone number field in the number to varchar2 database. Then I synced the entity with the database to take the field changes. I then updated to manually the setter methods and the Get accessor of < entity > RowImpl.java for the phone number field (channel number). I then did the changes associated with in the jspx file to show the phone field.

    Now I am facing this error: another user has modified the line containing oracle.jbo.Key [5046 primary key]. How to debug and fix this? Is that all I need to do to the view the feature-based object?

    Thank you

    Published by: user5108636 on February 8, 2012 15:31

    Published by: user5108636 on February 8, 2012 15:33

    maybe try to drop the EO/VO and create it again.

  • Too many objects correspond to the oracle.jbo.Key [2 primary key]. Error

    Hello

    I view a read-only table, and an editable form below so that the user can select a line in the table and the rank must be filled in the form below.
    The user must be able to update the line and save in the form below.
    Then the table above must also be updated with the updated values.

    To do this, I created a from VO EO.

    Using the same data control, I created a table UI Readonly and an editable form in the same JSF page.

    When I run the page, the first line is filled in the table and the form.
    When I select the second line of the table, I get the following error in the editable form

    Error: too many objects match the [2 primary key] oracle.jbo.Key.

    My EO has only one primary key, and I have not included the column ROWID EO or VO.

    How can we solve this problem?

    However, if I move the form to another page, it works well.
    But we have the table and editable form on the same page for ease of use purposes.

    Thanks for any help.
    Sameer

    Hi Sameer,

    You can run your VO in many ways as Amit said...
    Otherwise you can go to your entityImpl, the super.doDML method of the validation without any errors you can re-providing your VO here itself
    And give the save button as partial triggers for Table...

    Kind regards
    Suganth.G

  • Another user has modified the line containing oracle.jbo.Key [186 primary key].

    $36F1884EBC353A84.jpg

    as summer sees in this photo, when I click on the button to edit, it will invoke the code like this:

    BindingContext bcxt1 = BindingContext.getCurrent ();

    DCBindingContainer bc1 = (DCBindingContainer) bcxt1.getCurrentBindingsEntry ();

    DCIteratorBinding iterProj = bc1.findIteratorBinding("CuxProjects1Iterator");

    DC DCDataControl = iterProj.getDataControl ();

    ApplicationModule am = (ApplicationModule) dc.getDataProvider ();

    ViewObject projVO = am.findViewObject("CuxProjects1");

    projVO.clearCache ();

    projVO.setNamedWhereClauseParam ("project", currProjId);

    projVO.executeQuery ();

    got this page with changes on the name of the project:

    $24017B6E59120421.jpg

    then click on 'done' button.invoke a procedure like this:

    State channel = null;

    DBTransaction connection BD = this.getDBTransaction ();

    CallableStatement st =

    BD connection.createCallableStatement ("start cux_projects_crud.update_proj(?,?,?,?,?,?,?); end; ", 0) ;

    try {}

    st.setInt (1, proId);

    st.setString (2, proName);

    st.setString (3, proSummary);

    st.setDate (4, null);

    st.setDate (5, endDate);

    st.setInt (6, userId);

    st.registerOutParameter (7, Types.CHAR);

    st.executeUpdate ();

    State = st.getString (7);

    Then return to the first page as the top image.

    My problem is not rested but redesigned data into DB. When I click on the button to edit again, I get ' javax.faces.el.EvaluationException: oracle.jbo.RowInconsistentException: Houston-25014: another user has modified the line containing oracle.jbo.Key [186 primary key].» This error. How to solve this problem?

    In addition, I see a problem that the changes you make in the procedure are not validated and will not be picked up by the query.

    Timo

  • Another user has modified the line containing oracle.jbo.Key primary key

    Hello

    In jdev 12 c

    I have a jsf page in a BTF, and there is a display of master(A:readonly table)-detail(B1:readonly table)-detail(B2:editable form) this page

    The (readonly table) B1 and B2 (editable form) are created on the same data control. There is no other layout compicated or functions on this page.

    The B2 (editable form) was based on a VO whose id is a type of DBSequence, and the new value has been created by a database trigger.

    I put

    All the columns that are updated by a database trigger or a PL/SQL call, are enabled for "Refersh on Insert" (for the case of the insertion) or "Refresh update" (for the case of update) or both in the entity object xml file.

    But when I submit/validate the page (form B2), the error msg 'another user has changed the line containing oracle.jbo.Key primary key' was always held randonly.

    And after the error msg, I can commit the data successfully by press the button validate again.

    How can I solve this problem?

    Thank you.

    The problem is that you use the pl/sql code. It is run out of the box. When a change is made in a row in this way, the framework removes upward, neither knowing that the change was done rightly and throws an error message.

    The code (which I copied from the other thread for reference) intercepts the error and re executs the lock in the case of the specific error.

    /*** customizing locking management:

    * Because attribute values can change 'outside' ADF standard life cycle,

    * when optimistic locking executes, the exception "Another User Changed the Row" is thrown.

    * In this case, we execute locking again, ignoring the exception

    */

    public void lock()

    {

    try

    {

      super.lock();

    } catch (oracle.jbo.RowInconsistentException e)

    {

      if (e.getErrorCode().equals("25014"))

      {

      super.lock();

      }

      else throw e;

    }

    }


    Timo

  • Houston-25152: calling the constructor for the class oracle.jbo.Key is not allowed.

    Hello

    I use JDev 12.1.3;

    I'm calling the following expression in a transitional attribute to my VO;

    key oracle.jbo.Key = new oracle.jbo.Key ("yourKey"); return yourViewAccessor.findByKey(key,1) [0] .getAttribute ("yourAttribute")


    It comes to getting an attribute of my LOV accessor. He used to work in previous versions of JDev but now I get the above error.

    Should it?

    Related to this thread: Jdev 12.1.3: Houston-25152: call the constructor of class oracle.jbo.server.SequenceImpl is not allowed (WITH HR TEST CASE!)

  • Houston-25013: too many objects match the [primary key Lookup.USR_PROCESS_TRIGGERS USR_EMP_TYPE] oracle.jbo.Key.

    Hello

    I am trying to open the Console of the IOM of Sysadmin,

    try checking the research,

    search specific "Lookup.USR_PROCESS_TRIGGERS".

    and get the error on the screen

    Houston-25013: too many objects match the [primary key Lookup.USR_PROCESS_TRIGGERS USR_EMP_TYPE] oracle.jbo.Key.

    This known issue?

    This patch it for it?

    tried searching discussion forums, nothing here

    Thank you

    Check from the console design.  Looks like you have a duplicate key Code value.

    -Kevin

Maybe you are looking for