Problem exposing Accessor Methods on View object (ViewRowImpl.java)

JDeveloper 9.03
I have a view link, ViewLinkSourceDest, that links two view objects Source and Destination. Each view object has its respective ViewRowImpl.java file created.
I have selected "Generate Accessor in View Object" in View link Properties of the View Link Wizard for both source and destination view objects.
The correct Accessor methods are available in both the source and destination ViewRowImpl files.
When I access the Source accessor method from the DestinationViewRowImpl object I receive the following error:
          ORA-00904: invalid column name
          It is also is displaying the Source view object's SQL statement with the (:1 = Destination.ID) where clause.
The error is occurring when trying to retrieve the view object using this type of method call:
          Row r = this.getSourceView();
After further investigation I have found an example set of view objects in which the error does not occur. The difference was in the ViewLink.xml file.
The ViewLink.xml file that accesses the Accessor with the error begins like this:
          <ViewLink     
               Name="ViewLink"
               Where=":1 = Destination._ID" >
The ViewLink.xml file that accesses the Accessor with no error begins like this:
          <ViewLink     
               Name="ViewLink"
               EntityAssociation ="SourceDestAssociation" >
suggesting that the use of an association would resolve this problem.
I was not able to create a View link based on an association that would generate a ViewLink.xml file that ressemble the successful file above. I could however manually add the correct entry to the xml file that caused the error and sucessfully access the Accessor method in the source object. This is not the final answer because the IDE will regenerate the ViewLink.xml file to its original state even if created with the appropriate Association.
Is this a bug?
Is the way the ViewLink.xml file created different in JDev 9.03 than in 9.02
Is there something I am missing that is causing the ViewLink.xml file to generate incorrectly?
Any suggestions would be helpful.
Rob

Steps to recreate:
1 Create SomeSuperEntityImpl.java extended by SourceEntityImpl.java and DestinationEntityImpl.java entity objects.
2 Create SourceView and DestinationView objects
3 Create SourceDestinationAssociation linking the entity object Source PK to Destination FK
4 Create SourceDestinationView linking Source and Destination view using the SourceDestinationAssociation
View the SourceDestinationView.xml file and you will see that the viewlink has Where=":1 = source.src_id"
This is the scenario that causes the initial problem with the Accessor Methods.
If the SomeSuperEntityImpl.java is removed as the super class and the same procedure is followed you will get the desired 'EntityAssociation = "package.SourceDestinationAssociation"' in the SourceDestinationView.xml file .
Hope this is a little clearer.
Rob

Similar Messages

  • ExecuteQuery method of view object taking much time to execute

    Hi All,
    I am using a view object and execute the VO query using executeQuery method in VOImpl java.
    But, problem is, it is taking long time to bring the results after executing the query after setting the parameters. Same query in TOAD gives 4 seconds. While executing using executeQuery method, it is taking 5 mins.
    It is urgent issue. Please help me. Thanks.
    Regards, Soorya

    Hi Kali,
    Thanks for your prompt response.
    Yes. It has bind parameters. I have printed the statement before and after the executeQuery method
    ++VOImpl Code snippet++
    setWhereClauseParams(params);
    System.out.println("before executing query:Time:"+System.currentTimeMillis());
    executeQuery();
    System.out.println( "after executing query:Time:"+System.currentTimeMillis());
    +++
    I have removed some conditions in the query as it is business confidential. Please find the jdev log.
    ++++++++
    before executing query:Time:1322071711046
    [724] Column count: 41
    [725] ViewObject close prepared statements...
    [726] ViewObject : Created new QUERY statement
    [727] ViewObject: VO1
    [728] UserDefined Query: SELECT DISTINCT
    ai.invoice_num invoice_num
    FROM ap_invoices_all ai
    , ap_checks_all ac
    WHERE ...
    ai.org_id = :p_orgid
    AND ac.id = :p_id
    [729] Binding param 1: ,468,
    [730] Binding param 2: 247
    [731] The resource pool monitor thread invoked cleanup on the application module pool, AM, at 2011-11-23 23:41:32.781
    after executing query:Time:1322072052875
    +++++++
    Regards,
    Soorya

  • Problem with saving Parent - Child  View Objects in ADF 11g.

    Hi Every one,
    I have a requirment, something like I will be displaying some data on my jsff screen based on one Transient View Object. Whenever user clicks on Save button, I have to do following steps in my AMImpl.
    -> Preapre dynamically Parent View Object Rows based on some logic
    -> Prepare dynamically Child View object Rows and invoke insertRow method on respective child view object.
    When I say commit() First Parent ViewObject data need to be saved and then Child View object data has to be saved. I am having Parent - Child Key relation ship btw these two ViewObjects. Some how I am populating the Parent Primary key in the Child View Object. Please suggest me If there is any other alternative to this.
    Thanks

    I got the solution, Enabling the check box option for Master - Detail Entity association (CompositionAssociation -> Cascade Update Key Attributes) resolved the issue.
    Thanks

  • Which is better creating view accessor based on view object or view instanc

    When creating view accessors whether in the entity object or in the view object, we have two options:
    1- create the view accessor based on a view object.
    2- create the view accessor based on a view instance.
    what are the differences between these two options?
    what are the cases where I should only use option 1 or option 2?
    which one is better?

    Hello Timo,
    I will try to explain my question better.
    when we create view accessor, after click on create new view accessor icon, the create view accessor window is opened, at the header of this window there is a statement says:
    Select a view object or shared view instance and shuttle it to the selected list to create a view accessor.
    and here is my concern, which one to use
    1- select a view object from one of the available view object and shuttle it to the selected list.
    2- select a view instance from the application module and shuttle it to selected area.
    If you have FOD sample (and I am sure you have it :) ), I see that oracle team has used both of them in different places, for examples
    1- in oracle.fodemo.storefront.entities.PersonEO all view accessors are created from view instance in SharedLookupService application module.
    <ViewAccessor
        Name="PersonTypesVA"
        ViewObjectName="oracle.fodemo.storefront.lookups.LookupsBaseVO"
        AMUsageName="SharedLookupService"
        ViewInstanceName="PersonTypes"/>is it because they are used to create LOV?
    2- in oracle.fodemo.storefront.entities.OrderEO the view accessor is created from a view object, not from instance inside application module.
        <ViewAccessor
        Name="OrdersVO"
        ViewObjectName="oracle.fodemo.storefront.store.queries.OrdersVO"/>I couldn't find the usage of this accessor?
    Hope it is clear now.

  • Problem during Add row in View Object : View Row of Key Not found

    Hello,
    I'm facing this problem during insert of new row in the view object. I'm having 2 entities that belong to the same DB table (I need this because one is required with the composition assoc and the other one without it).
    I have three tables, COMPANY, USERS and PRIVILEGES.
    Company (1) to USERS (N)
    USERS (1) to PRIVILGES (N)
    While adding users for a specific company , i get this error msg.
    P.S: I'm not getting this error, if i add company, then user. Only if i directly add users i'm getting this error.
    04/11/27 19:31:46 [12511] DCUtil.RETURNING oracle.jbo.uicli.binding.JUFormBinding
    04/11/27 19:31:46 [12512] **** refreshControl() for BindingContainer :new_cuserUIModel
    04/11/27 19:31:46 [12513] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    04/11/27 19:31:46 [12514] Decompressed BC state:BCST:Reousers1View1Iterator=0001000000042D323535,UsertypeView1Iterator=0001000000124141414B6639414142414141537653414141,StatesView1Iterator=0001000000124141414B5A77414142414141536643414141,
    04/11/27 19:31:46 [12515] **** refreshControl() for BindingContainer :new_cuserUIModel
    04/11/27 19:31:46 [12516] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    04/11/27 19:31:46 [12517] Column count: 21
    04/11/27 19:31:46 [12518] ViewObject: Reousers1View_254_findByKey_ close prepared statements...
    04/11/27 19:31:46 [12519] ViewObject: Reousers1View_254_findByKey_ Created new QUERY statement
    04/11/27 19:31:46 [12520] SELECT Reousers1.USERID, Reousers1.CID, Reousers1.UTYPE, Reousers1.DESIGNATION, Reousers1.NAME, Reousers1.ADDRESS, Reousers1.CITY, Reousers1.STATE, Reousers1.ZIP, Reousers1.EMAIL, Reousers1.TEL, Reousers1.FAX, Reousers1.WEBSITE, Reousers1.ENTRY FROM REOUSERS Reousers1 WHERE (Reousers1.USERID = :1)
    04/11/27 19:31:46 [12521] Bind params for ViewObject: Reousers1View_254_findByKey_
    04/11/27 19:31:46 [12522] Binding param 1: -255
    04/11/27 19:31:46 [12523] OracleSQLBuilder Executing Select on: REOUSERS (false)
    04/11/27 19:31:46 [12524] Built select: 'SELECT USERID, CID, UTYPE, DESIGNATION, NAME, ADDRESS, CITY, STATE, ZIP, EMAIL, TEL, FAX, WEBSITE, ENTRY FROM REOUSERS Reousers1'
    04/11/27 19:31:46 [12525] Executing FAULT-IN...SELECT USERID, CID, UTYPE, DESIGNATION, NAME, ADDRESS, CITY, STATE, ZIP, EMAIL, TEL, FAX, WEBSITE, ENTRY FROM REOUSERS Reousers1 WHERE USERID=:1
    oracle.jbo.RowNotFoundException: JBO-25020: View row of key oracle.jbo.Key[-255 ] not found in Reousers1View1.

    Hi Timo,
    once again thanks for ur reply.
    as my vo are based on procedure, i know that i can't update the table using them.
    i only wanted to insert the rows in the vo and show it to user (only for selection purpose).
    Now my problem is sorted as i have changed the code like this-
    Row new_row=vo1.createRow();
    new_row.setAttribute(index,vo2.getAttribute(index)) ;
    vo1.insertRow(new_row);
    Earlier i was only inserting a new row, without creating any row.
    Thanks a lot.

  • Problem using View Object in Java

    I am creating a simple Java class to use a view object (companiesView)that I created and tested in JSP with the following code:
    String where="EID = " + eid;
    companyAppModuleImpl cam=new companyAppModuleImpl();
    CompaniesViewImpl cv=cam.getCompaniesView1();
    cv.setWhereClause(where);
    cv.executeQuery();
    RowSet rs= cv.getRowSet();
    return rs.first().getAttribute("Name").toString();
    I got
    java.lang.NullPointerException
    at setWhereClause
    What step(s) did I miss?
    If you know where I can find such samples, please let me know.
    Thank you.

    Hi,
    You cannot instantiate an application module using the new operator. You have to use the Configuration class. I quote this from the JDeveloper help.
    <quote>
    Use the method oracle.jbo.client.Configuration.createRootApplicationModule().
    Pass this method the package-qualified name of your application module and the name of the configuration you want to use. For example, to instantiate OnlineOrders.OnlineOrdersModule in local mode, you would use: ApplicationModule myAM = Configuration.createRootApplicationModule("OnlineOrders.OnlineOrdersModule", "OnlineOrdersModuleLocal");
    </quote>
    Hope that helps.

  • View link accessor for master view object with bind variables

    Is there a way to set bind variables for a view object to which a view link accessor is used to retrieve a view row from a detail view row in a master-detail relationship ?
    I understand that RowSet (or Row) returned by a view link accessor originates from an "internally created" view object instance.
    I am using 10.1.3.0.4 JDeveloper.

    Thanks! that's right the bind variables when i use it on where clause must be required, so i change my sql to:
    Select /*+ use_nl(p p2) */
    'F' tipo_persona,
    p.ID_PERSONA, p.TDOC, p.NDOC, p.DENO
    From SINT_PERSONA p,
    ( Select /*+ index(a SINT_PERSONA_IX2) */
    a.ID_PERSONA
    From SINT_PERSONA_DOCUMENTO a
    where ( NDOC = :p_cuit
    and :p_cuit <> 0 )
    ) p2
    Where p.id_persona = p2.id_persona
    AND (deno = decode(:p_deno,'null',null,upper(:p_deno)) or
    :p_deno = 'null')
    AND (NDOC = decode(:p_ndoc,0,null,:p_ndoc) or
    :p_ndoc = 0)
    and grado_confiab > 0
    and my bind variables:
    p_ndoc required default value 0
    p_cuit required default value 0
    p_deno required default value null
    and works ok!
    thanks a lot !!!!

  • Problem facing with Transient in View Object

    Hi Friends,
    I had created a new table in the database and create an Entity Object for that table,
    i had add this entity object in one of the View Object and when i was trying to add attributes from Available List to the Selected List.
    The Attributes are changing to Transient and that particular attribute Mapped to column got unchecked, even tho i check it manually it is turning unchecked automatically when i click on Apply Button.
    * In Entity Object Attributes are checked with >Persistent and Queryable and Type is NUMBER Updatable checked to Always.
    Can you please suggest me where am i going wrong, i had done me best to solve this problem.
    Please help me out from this problem.
    Thanks in advance,
    Rahul

    Rahul,
    Your question is related to ADF Business Components, not to JHeadstart.
    Please use the JDeveloper forum for this question.
    Thank you,
    Steven Davelaar,
    JHeadstart team.

  • How do I programmatically get the display name for a view object in Java?

    When you define a view object, there is a display name that is configured. I would like to retrieve that in Java. Can someone tell me how?
    Thanks, -Klaus

    Klaus,
    you can use the attribute definitions which you get using
    getAttributeDefs
    AttributeDef[] getAttributeDefs()This method is accessible via the vo.
    If you need this information in a bean, you can use EL like you see if you drop a vo on a page.
    Timo

  • JDev 10.1.3 EA Studio Edition - View Object Editor java glitch

    Just thought I'd mention what appears to be a glitch - under the "java" section of the View Object editor, the checkbox for generate "Custom Java DataSource Methods" does not appear to function. Selecting it does not add the custom datasource methods in the View Object class.

    Just thought I'd mention what appears to be a glitch - under the "java" section of the View Object editor, the checkbox for generate "Custom Java DataSource Methods" does not appear to function. Selecting it does not add the custom datasource methods in the View Object class.

  • Problem: Blättern im Acrobat Viewer für Java

    Hallo,
    ich benutze den Pdf-Viewer mit der Java-Version 1.3.1 . Mein Problem ist, dass ich beim Seitenwechsel über eigene JButton's [fac.viewer.execMenuItem(ViewerCommand.NextPage_K)] immer eine ClassCastException erhalte, obwohl das Blättern über die mitgelieferte Menüleiste funktioniert.
    java.lang.ClassCastException: com.adobe.acrobat.BeanClientTransactionExecutionContext
    at com.adobe.acrobat.gui.PVNavigationVerb.invoke(PVNavigation.java:257)
    at com.adobe.acrobat.gui.CommandRegistry.executeCommand(CommandRegistry.java:77)
    at com.adobe.acrobat.Viewer.execMenuItem(Viewer.java:754)
    at fsdb.AdobePanel.cmdNext_actionPerformed(AdobePanel.java:322)
    at fsdb.AdobePanel$2.actionPerformed(AdobePanel.java:439)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1450)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1504)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:378)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:216)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
    at java.awt.Component.processMouseEvent(Component.java:3715)
    Würde mich freuen wenn Ihr mir weiterhelfen könnt.
    Danke Björn

    Hallo Björn,
    habe auch das Anliegen PDF-Dateien im Applet oder JavaApp anzuzeigen.
    Vielleicht gibst Du mir ein paar Tips. Kann Dir bei Deinem Problem leider noch nicht helfen.
    -Woher hast Du die Klassen (JAR-File) von Adobe und wie aktuell sind diese?
    -Gibt es vielleicht direkt Beans für Java?
    -Wie sieht die Performance aus beim Aufruf von PDF-Files.
    Danke Frank

  • No able to expose my method in view client interface}

    hi i have this method in my AGRRowImpl class but when i click java client interface of my view am not able to view it
    public class AGRRowImpl extends ViewRowImpl implements AGRRow {
        public Integer getId() {
            return (Integer) getAttributeInternal(ID);
         * Sets <code>value</code> as the attribute value for the calculated attribute Id.
         * @param value value to set the  Id
        public void setId(Integer value) {
            setAttributeInternal(ID, value);
    public void PerformDeleteAgr(Integer agrid) {
                agrid = this.getId();
                callPerformSdmsLogon("SMS_FORM_TO_ADf.delete_agr(?)", new Object[] { agrid });
    }Edited by: Tshifhiwa on 2012/06/30 12:55 PM

    ok i can see the method now but when i test it in oracle adf model tester am geting this error (oracle.jbo.DeadViewRowAccessException) JBO-27102: Attempt to access dead view row of persistent id 0
    public class AGRRowImpl extends ViewRowImpl implements AGRRow{
        public Integer getId() {
            return (Integer) getAttributeInternal(ID);
        public void setId(Integer value) {
            setAttributeInternal(ID, value);
        public void PerformAgr(Integer agrid) {
               // AGRRowImpl result = new AGRRowImpl();
                agrid = this.getId();
                //agrid = this.getId();
                callPerformSdmsLogon("SMS_FORM_TO_ADf.delete_agr(?)", new Object[] { agrid });
    }

  • 3 Levels Master Detail View Object with Java class interface

    Hi Developers,
    I've created 3 tables with one to many relations as below
    BOARD ------<- APPLICANT ------<- QUALIFICATION
    a board includes many applicants and an applicant includes many qualifications.
    When I add these tables to a Fusion Project, JDeveloper 11g helps me to add the Entity Links and View Associations automatically.
    Then, I defined these relations in an ApplicantModule's Data Model as below.
    [+] BoardVO1
          |
          |--[+] ApplicantVO1
                   |
                   |--[+] QualificationVO1The problem is: I cannot write any function in QualificationVO and publish it by client interface.
    I created a simple function with a single line (System.out.println(...) ) in QualificationVOImpl.java. and selected it in Client Interface. But when I execute it from the ApplicantionModel for testing, an oracle.jbo.NoObjException JBO-25003 is raised. with message: Object ... ApplicantVO1 of type ApplicationModule not found.
    Has anyone tried to implement some coding in the third level of a master details view structure as my example? How do you make it works?
    I'm using JDeveloper 11.1.1.3 with ADF BC.
    Regards,
    Samson Fu

    Samson,
    Looks like a bug (probably with the application module tester). I created your tables:
    create table board(board_id number primary key not null);
    create table applicant(applicant_id number primary key not null, board_id number not null);
    create table qualification(qualification_id number primary key not null, aplicant_id number not null);
    alter table applicant add a_fk foreign key(board_id) references board;
    alter table qualification add q_fk foreign key(aplicant_id) references applicant;I created a JDev project and got the same results. I've e-mailed a test case off to Frank.
    Frank - the method is indeed exposed on the VO instance, and I tried testing that way, but the AM tester gives the error as if it is looking for an AM instance with the VO's name.
    John

  • View object programmatic Java update issue!

    hi all,
    i have a problem with my code this code use to work like a month or 2 ago but now there is something wrong if someone can clear it out for me or just give me someinsight on some possible solutions I would be really happy.
    here is the part of the code that does not function:
    String amDef = "database_view.AppModule";
    String config = "AppModuleLocal";
    ApplicationModule am = Configuration.createRootApplicationModule(amDef, config);
    ViewObject peopleView = am.findViewObject("MANUAL_People_Query1");
    Key personKey = new Key(new Object[] { personid });
    Row[] personFound = peopleView.findByKey(personKey, 1);
    //HERE IS THE PROBLEM the personid is an int and the record number exist but it does not find. why it never goes inside the if statement???
    if (personFound != null && personFound.length > 0)
    System.out.println("inside");
    Row person = personFound[0];
    person.setAttribute(1, testname);
    //commit and connection close
    am.getTransaction().commit();
    Configuration.releaseRootApplicationModule(am, true);
    any help would be appreciate
    Best Regards,
    Carl
    null

    Hi,
    in ADF BC number is of type oracle.jbo.domain.Number , not int
    See: http://download-uk.oracle.com/docs/html/B25947_01/bcadvvo001.htm#sthref2579
    e.g. Key k = new Key(new Object[]{new Number(200), new Number(118)});
    Frank

  • Access to a method located in view object from JSP page?

    Hi,
    How can i access a public method which is loacted in view
    object "viewobjectImpl.java" from JSP page.

    Juan,
    Either via Data tags or/and Java embedded code.(<%...%>).
    This method, suppose to execute a stored procedure.
    Thanks

Maybe you are looking for