This discussion is archived
8 Replies Latest reply: Feb 20, 2013 3:11 AM by adf009 RSS

not able to insert row programticaly

adf009 Explorer
Currently Being Moderated
hi am trying to insert row to another viewObject from another viewobject programaticaly ,can somebody help me,i have recreate the problem i upload it in hostfile,am in jdeveloper

am geting this log error
Caused by: oracle.jbo.InvalidOwnerException: JBO-29114 ADFContext is not setup to process messages for this exception. Use the exception stack trace and error code to investigate the root cause of this exception. Root cause error code is JBO-25030. Error message parameters are {0=UamUserdetails, 1=oracle.jbo.Key[marksn ]}
     at oracle.jbo.server.EntityImpl.internalCreate(
     at oracle.jbo.server.EntityImpl.create(
     at oracle.jbo.server.EntityImpl.callCreate(
     at oracle.jbo.server.ViewRowStorage.create(
     at oracle.jbo.server.ViewRowImpl.create(
     at oracle.jbo.server.ViewRowImpl.callCreate(
     at oracle.jbo.server.ViewObjectImpl.createInstance(
     at oracle.jbo.server.QueryCollection.createRowWithEntities(
     at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(
     at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(
     at oracle.jbo.server.ViewRowSetImpl.createAndInitRow(
     at oracle.jbo.server.ViewObjectImpl.createAndInitRow(
     at worklis.view.beantest.addnew(
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(
     at java.lang.reflect.Method.invoke(
     at com.sun.el.parser.AstValue.invoke(Unknown Source)
     at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
     at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(
     at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(
     at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(
     at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(
     at org.apache.myfaces.trinidad.component.UIXTable.broadcast(
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(
     at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(
     at javax.faces.webapp.FacesServlet.service(
Edited by: adf009 on 2013/02/15 4:43 PM

Edited by: adf009 on 2013/02/15 4:57 PM

Edited by: adf009 on 2013/02/15 7:22 PM
  • 1. Re: not able to insert row programticaly
    Frank Nimphius Employee ACE
    Currently Being Moderated

    can you paste the code that you use to create the row?

  • 2. Re: not able to insert row programticaly
    adf009 Explorer
    Currently Being Moderated
    the code am using is below
        public void addnew(ActionEvent actionEvent) {
            // Add event code here...
            // Add event code here...
            //Code to get the bindings for TargetVO :
            Map<Object,String> mp=new HashMap<Object, String>();
                    DCBindingContainer bindings2 =
                   JUCtrlHierBinding obj = (JUCtrlHierBinding)bindings2.findCtrlBinding("UamUserdetailsView2");
                   ViewObject targetVO = obj.getViewObject();
              DCBindingContainer bindings =
                   DCIteratorBinding empIter =
            //SourceVO1Iterator is the iterator under Executables section for the SourceVO1 bindings.
            RowSetIterator roleRSIters = empIter.getRowSetIterator();
            RowSetIterator rs1 = roleRSIters.getRowSet().getViewObject().createRowSetIterator(null);
                   NameValuePairs nvp = null;
                   String username = null;
            while (rs1.hasNext()) {
                               Row r =;   
                       nvp = new NameValuePairs();
                      // nvp.setAttribute("organisationid", r.getAttribute("organisationid"));
                       nvp.setAttribute("Organisationid", getorgid());
                       System.out.println("printedorgid" +getorgid());
                       // username = (String)r.getAttribute("Username");
                       System.out.println("prininstead " + nvp);
                     //  targetVO.createAndInitRow(nvp);
                        r = targetVO.createAndInitRow(nvp);
                        //createAndInitRow(AttributeList nvp); 
            //Row row = targetVO.createAndInitRow(nvp);
              //      targetVO.insertRow(row);
    i have re-created the problem i upload in this hostfile,you can have the whole picture of what am trying to do
    Edited by: adf009 on 2013/02/15 7:36 PM

    Edited by: adf009 on 2013/02/15 7:38 PM

    Edited by: adf009 on 2013/02/15 8:01 PM
  • 3. Re: not able to insert row programticaly
    Timo Hahn Oracle ACE
    Currently Being Moderated
    adf009, this is a continuation of your previous post {thread:id=2497655}
    Nice that you have created a test case, however, this case can only be loaded if we register to the share hoster. I doubt that anyone will do this.

    Next I hope that your test case is build on a db schema like HR or that you included scripts to generate the tables needed and provided test data. Last but not least I hope you have included instructions on what to do to see the problem.

  • 4. Re: not able to insert row programticaly
    adf009 Explorer
    Currently Being Moderated
    ok i have upload the file in this link or this file host
    if you what to see the problem navigate to next page and go to second tab and try to click the add button you will see the error can also check this file hosting <img src= width=127 height=145 border=0/>
    <div style=font-size:9px;font-family:Arial, Helvetica, sans-serif;width:127px;font-color:#44a854;> share files free</div>

    Edited by: adf009 on 2013/02/16 8:00 AM

    Edited by: adf009 on 2013/02/16 11:34 AM
  • 5. Re: not able to insert row programticaly
    Timo Hahn Oracle ACE
    Currently Being Moderated
    adf009, you need to pay more attention. You sample can't be loaded as some parts of the db are missing (sequences are missing and some table definition).

    Then I don't see a detailed description on what to do. I guess you are on your own with this.

  • 6. not able to insert row programaticaly
    adf009 Explorer
    Currently Being Moderated
    hi i was able to correct my script i test them using plain schema is working you can just copy and paste them in sql*plus or this <img src= width=127 height=145 border=0/>
    <div style=font-size:9px;font-family:Arial, Helvetica, sans-serif;width:127px;font-color:#44a854;> online backup</div> has anybody able to check my problem,if there is something not clear let me know

    Edited by: adf009 on 2013/02/18 9:53 AM
  • 7. Re: not able to insert row programticaly
    Timo Hahn Oracle ACE
    Currently Being Moderated
    I spend some time on your test case. I was still not able to create/load the db with your scripts (I'm not using sqlplus). There are some problems with the locale (not your fault). OK, I managed to tweak the scripts and get most of the data in. All in all the DB looks OK (some rows are missing).

    The code is a mess! You should at least format the code and comment it in a way that on can understand what you are doing in the code. This is your main problem. I have the feeling that you don't know what you want to do, and so just copied code from different soureces hoping that it'll work out. My feeling is that you don't know what the code you copied is doing as you left some parts out (which were vital for the code to work).

    After spending some time figuring out how to start the application (Yes you did not tell us how to start, even after I ask you to provide this info), I got to the selection page which shows a lov with lots of data. Problem, I don't know what to do next. Which element to select? what to do next. I tried to hit the selectwith... button and got an NPE! This is the part where you did not copy all code or follow the instructions from the blog you got the code from (I know hte code because I've written it myself!). I fixed the NPE.

    Next page it's getting even worse. Lov which should be dependent but are not working, lots of stuff which we (or at least I) don't know how to deal with. I don't like to spend time figuring all this out! took me an hour to get to this point and I'm not wasting more time to go any further.

    My advice to you is document each line of code and let a college then read it. If he understands what's going on and why, you are on the right way.
    A sample which is not working, where the code is totally without comment and no detailed instruction on how to get to the real problem is just wasting time.

  • 8. not able to insert row programticaly
    adf009 Explorer
    Currently Being Moderated
    the instruction,on how to use the application is value/organisationname in lov the button to navigate to next page
    3.display value based on lov selection
    4.navigate to panneltabbed
    5.go to second tab
    6.go to search query the search query
    8.display all users the add new button from the table->this is where the error occurs when you click the add button it suppose to add value to second table

    i have use the class beantest which is under Application Sources in package worklis.view.beantest

    i have used the method called public void addnew(ActionEvent actionEvent) to create new row progaramticaly

    i only what you o check this method,why is not able to add new or create row in another view= public void addnew(ActionEvent actionEvent)

    don't worry about the lov am able to do that in my application its working fine,i just what to be able to add/create row to another table ,the problem i like you to help me with is in second tab of <af:panelTabbed id="pt1">

    i have fix the lov error,and you can also navigate based on lov selection,i just what to be able to add/create row in another view based on the selection of first view,if you navigate to next page and the address details is empty,i what the that to be able to be in insert mode

    i have uploaded the file in this hostfile

    i have no one to help me,the forum is the only place i can get help

    the lov are working fine now only the second tab not working to add new values to another table is not working

    Edited by: adf009 on 2013/02/20 2:10 PM


  • Correct Answers - 10 points
  • Helpful Answers - 5 points