Filtering on Association Accessor

Hi ,
I have a DeptEO , Emp EO . and a 1 to many association DeptEOToEMpEO.
In DeptEOImpl , I need to retrieve a corresponding Emp row which has ROLE as mgr and do some processing on that row.
Currently , this is what i am doing in DeptEOImpl ..
//getEmp() is the association accessor
RowIterator ri = this.getEmp()
while(ri.hasNext){
EmpEOImpl empRow = (EmpEOImpl)ri.next();
if("mgr".equals(empRow.getRole())
{ //Do something
break;
Instead of iterating through the EO rows , is there any way of applying a filter directly on the association accessor . For VO accessors , we can use View Criteria etc. Is a similar approach available for association accessor or EO Rows?
Appreciate your help.
Thanks.

Hi,
see https://blogs.oracle.com/smuenchadf/resource/examples#113
Sample 113 should have the code you are looking for
Frank

Similar Messages

  • ADF BC: Exception when using an association accessor  in polymorphic EOs

    Hi,
    I have generated a classic Dept-Emp ADF BC project. Since I need inheritance for my business logic, I created a new EO Manager which extends Employee. Attribute Job is the discriminator with a default value 'MANAGER'. The Employee VO uses polymorphic EOs. When I try to get the department of an employee in a method like Employee.getSal() the ClassCastException is thrown.
      public Number getSal() {
        DepartmentImpl d = (DepartmentImpl) getDepartment(); // Exception!
        // process business logic
        return aValue;
    java.lang.ClassCastException: oracle.jbo.domain.Number
         at oracle.jbo.server.RowFilterKey.<init>(RowFilterKey.java:47)
         at oracle.jbo.server.ViewObjectImpl.buildRowFilter(ViewObjectImpl.java:4527)
         at oracle.jbo.server.ViewRowSetImpl.getRowFilter(ViewRowSetImpl.java:419)
         at oracle.jbo.server.ViewRowSetImpl.getRowFilter(ViewRowSetImpl.java:370)
         at oracle.jbo.server.ViewRowSetImpl.ensureStorage(ViewRowSetImpl.java:4632)
         at oracle.jbo.server.EntityRowSetImpl.<init>(EntityRowSetImpl.java:80)
         at oracle.jbo.server.EntityImpl.createAssociationAccessorRS(EntityImpl.java:7610)
         at oracle.jbo.server.AssociationDefImpl.get(AssociationDefImpl.java:329)
         at oracle.jbo.server.AssociationDefImpl.get(AssociationDefImpl.java:274)
         at oracle.jbo.server.EntityImpl.getAttributeInternal(EntityImpl.java:2144)
         at com.trivadis.adf.inheritance.model.eo.EmployeeImpl.getDepartment(EmployeeImpl.java:186)
         at com.trivadis.adf.inheritance.model.eo.EmployeeImpl.getSal(EmployeeImpl.java:103)
         at com.trivadis.adf.inheritance.model.eo.EmployeeImpl.getAttrInvokeAccessor(EmployeeImpl.java:141)
         at com.trivadis.adf.inheritance.model.eo.ManagerImpl.getAttrInvokeAccessor(ManagerImpl.java:76)
         at oracle.jbo.server.EntityImpl.getAttribute(EntityImpl.java:784)Is it a known bug? or not allowed to use associations with EO Inheritance? Something else?
    Any hints are welcome!
    Thanks,
    Markus

    I have the same problem.
    I'm using the RowIterator of an association to create a new Entity.
    The exception is thrown when fetching the RowIterator before the createRow method is used.
    java.lang.ClassCastException: oracle.jbo.domain.Number
         at oracle.jbo.server.RowFilterKey.<init>(RowFilterKey.java:47)
         at oracle.jbo.server.ViewObjectImpl.buildRowFilter(ViewObjectImpl.java:4527)
         at oracle.jbo.server.ViewRowSetImpl.getRowFilter(ViewRowSetImpl.java:419)
         at oracle.jbo.server.ViewRowSetImpl.getRowFilter(ViewRowSetImpl.java:370)
         at oracle.jbo.server.ViewRowSetImpl.ensureStorage(ViewRowSetImpl.java:4632)
         at oracle.jbo.server.EntityRowSetImpl.<init>(EntityRowSetImpl.java:80)
         at oracle.jbo.server.EntityImpl.createAssociationAccessorRS(EntityImpl.java:7610)
         at oracle.jbo.server.AssociationDefImpl.get(AssociationDefImpl.java:329)
         at oracle.jbo.server.AssociationDefImpl.get(AssociationDefImpl.java:274)
         at oracle.jbo.server.EntityImpl.getAttributeInternal(EntityImpl.java:2144)
         at com.photoswing.model.web.AccountImpl.getAccountExcludedPhotoAccount(AccountImpl.java:2283)
         at com.photoswing.model.web.WeventEditVORowImpl.registerNewEventFile(WeventEditVORowImpl.java:480)Thanks
    Fred

  • Problems with Associations between entities (jdev903production)

    Hi,
    every now and then, I feel a strong urge to pick up my pc and throw it out the window, when I'm working in jdeveloper.
    But usually just in time I realise the power that bc4j still has, and the fact that people walking under my window might not be too pleased with my pc landing on their head convinces me to just count to 10, and just retry what I was trying to do.
    I will explain the problems below:
    1. Wrongly numbered and magically renumbered members
    I have an entity with about 13 attributes. The underlying schema object is a view (simple view
    on a table, nothing fancy).
    I have a few associations between this entity and several other entities, one of which is an association with itself (parent/child relation). Some of these associations have accessors, and the parent/child association has accessors both ways (getParent() and getChildren()).
    When I compile, I get an error like this:
    Error(399,12): duplicate case label.
    This problem occurs because near the top of the file, the attributes have been defined as follows:
    protected static final int ASSET = 0;
    protected static final int PARENT = 1;
    protected static final int PRICELINES = 2;
    protected static final int CHILDREN = 3;
    protected static final int ID = 0;
    protected static final int CODE = 1;
    protected static final int ENDDATE = 2;
    protected static final int STARTDATE = 3;
    protected static final int TYPE = 4;
    The first 4 are from the association accessors, the rest (starting with ID) are attributes. Why do these get the same numbers?
    I edited the first 4 lines and gave them increasing numbers that didn't conflict with any of the attributes. But each time I edit one of the associations, all of these lines get renumbered again and start counting at 0! (even if I move the lines down so they are in the correct order).
    So even if I just edit the parent/child association, even the PRICELINES (which is an accessor NOT from the association I'm editing) thing gets renumbered wrongly.
    Why?!
    2. Internal XML parser error
    Every now and then, after playing around with associations and viewlinks, I suddenly get an error message like this:
    "Expected Name instead of '<'."
    from the XML parser, when I try to open a ViewObject from the navigator. The XML files look fine, but even a restart of jdeveloper doesn't help. In this case I usually delete my files, get the last known working versions from CVS and redo what I did before it went wrong. Because of the randomness (though quite frequent) of this problem, I can't provide you with good 'steps to reproduce' yet, but do you have any clue as to what might cause this? It's quite a nuisance.
    Greetings,
    Ivo

    [list]
    [*]Wrongly numbered and magically renumbered members
    We just found and fixed a problem for 9.0.4 yesterday where in some cases
    the constants for the accessors got inadvertently renumbered.
    I hope it's the same issue you're hitting, but I cannot
    be 100% sure unless you could send me a testcase project
    for me to try and reproduce with 9.0.3 and with the
    fixed 9.0.4 release.
    [*]Internal XML parser error
    An error like "Expected Name instead of '<'." can mean some kind of corruption in the XML file. When you say they "look" fine, are you able to verify by trying to parse them externally to make sure it's not some subtle error your eye is not seeing?
    If you can give me a testcase project and tell me what steps to try and repeat, I can have our QA team try and exercise your steps to hopefully reproduce the problem.
    [*]View Accessors are not being created
    You mentioned a source control system in the mix. Is there any possibility that the YourViewImpl.java file is read-only on the file system? This would cause BC4J to not be able to write the accessor into the file.
    [*]Magically disappearing ViewLink source/destination attributes
    Obviously, this is not intentional. I'll ask the developer to see if
    there's anything obvious that could be the cause of this
    "short-circuit" of correct functionality.
    [*]Dependencies not checked correctly when using entitylevel inheritance
    "(no inheritance is possible on the view level)"
    The above statement confused me. We do support View objects extending
    other view objects, however I was able to reproduce the problem
    and I filed Bug#2678090 to get it fixed.
    [*]EVERY question/problem on the forum needs to be analyzed by a team member with 1 exclusive question: [How] Could have better documentation / help file elimenated this problem?
    Excellent point. And we are doing this!
    [*]Don't get me wrong; if this weren't a super product; I would not be here.
    Neither would we. ;->
    Let's identify every remaining technical issue for you, ideally get a testcase to reproduce the problem, and then we'll fix it.
    [*]And truly; thank you for taking this time with us. Not every company affords so many resources with their customers; let alone free downloads.
    We believe it's a great 21st-century way to be in direct contact with our customers. The feedback we get here is awesome for the product!
    [*](Hey! I Want to pay. Help me finish and sell my app!)
    We want you help you finish faster, too. Keep the questions and issues coming and we're doing our best to address them.
    [list]

  • Fetch Mode for association RowIterators

    Hello all,
    In Jdev 3.2, I saw that a new "tuning" tab appeared in the view object wizard.
    In the corresponding help pages we can read the following "If As needed is specified and too many row sets are open (and left open because they are not navigated to the end), the user may run out of result sets and get a DMLException exception (You can set the jbo.max.cursors runtime parameter to a higher number, if needed.)"
    If I'm not mistaken, when 2 entities (e.g. dept, emp) are linked by a 1:n association, the entity on the 1 side of the 1:n association gets an accessor which returns a RowIterator.
    for instance, in DeptImpl, I'll have a getEmp() accessor which returns a RowIterator containing EmpImpl entities, right?
    So I'm just wondering what will be the fetch mode for this iterator.
    The part about "...left open because they are not navigated to the end..." worries me a bit.
    If these RowIterators use the "as needed mode",
    how can I be sure that they are properly closed when I'm finished using them?
    is there a RowIterator.close() method? (I haven't seen one)
    Should I just navigate till the end of the RowSet?
    I'm having quite a lot of Maximum open cursors exceeded exceptions on one of my programs, which makes extensive use of associations RowIterators, so I'm wondering if this could be the cause...
    Thanks in advance for any help.
    Remi

    Ravi,
    Great question. The iterators returned from association accessors use "Fetch as Needed" mode. So, if you are not exhausting the rows from an iterator (i.e. fetching all the rows) then the cursor will stay open.
    In the 3.2.3 maintenance release, there is a new close() method on oracle.jbo.RowIterator so that you can prematurely close the cursor if you want.
    In 3.2.2, unfortunately the only way to make sure the cursor gets closed is to fetch all the rows from the iterator.

  • View link accessor passes a ViewRowSetImpl

    9.0.5.1
    If I add a View link between a SQL only view object (A) and a View object (B) based on an entity object (cardinality 1 to 1) and request accessor methods are added to the view object (B) and the corresponding entity
    I get an accessor in view object (B)
    oracle.jbo.Row getXXXX - which seems okay
    I get in the entity object
    ViewRowImpl getXXXX - which also seems okay
    However when getXXXX is called in the entity object a ViewRowSetImpl object is being passed back and so the cast fails.
    I've checked the data and there is definitely only a one to one relationship between the data.
    Anyone have any ideas what could be wrong?

    I have the same problem with cardinality * to 0..1.
    The created view link accessor return a ViewRowImpl but at runtime it returns a ViewRowsetImpl and I get a ClassCastException
    I used following workaround:
    Define an association and read from the association accessor instead of the View Link accessor.
    ADF 10.1.2
    Thanks
    Frederic

  • Problem with viewLink accessor

    (ADF BC, JDeveloper 10.1.3 SU5)
    Hello,
    I have a master and a detail VO and a view link between them.
    Both VOs are entity based, master primary key is DBSequence.
    ViewLink cardinality is 1 to 0..1
    Let's say ViewLink accessor name is DetailLink.
    Master is inserted by ADF Faces table. Detail is inserted in code like below:
    Code in AppModuleImpl.java:
    ... get master row from master VO custom row set iterator ...
    detail = getDetail().createAndInitRow(master);
    ... init attributes ...
    getDetail().insertRow(detail)
    System.out.println("Master has detail: " + (getMaster().getDetailLink() != null));Even though the detail row has correctly set foreign key attribute, output of this code is not always "Master has detail: true". For example for newly started embedded OC4J it is "Master has detail: false".
    When I try to debug this code, getDetailLink() works correctly.
    What's wrong?
    Rado
    Message was edited by: RadoK
    (added omitted insertRow(detail))

    Strange is that getting detail entity from association accessor is successful.
    master.getMasterEntity().getDetailFromAssocAccessor() != null is true, but
    master.getDetailFromLinkAccessor() != null is false.
    The view link source and destination attributes are association from master detail association.
    Please help me find where the problem is.
    Rado

  • Insert master, then details

    I'm using JDeveloper 10.1.3.5. I've set up ADF BC EO's and VO's for a master table and a detail table. There is also a 1:* Association, and a 1:* View Link between the master and details and this has all been added to an Application Module. The primary key of the master table is a surrogate PK generated from a sequence in a trigger. So the PK attribute has been designated as a DBSequence and has Refresh after Insert turned on.
    I have a jspx page using ADF Faces. It has a Create Form based on the master table. That means that a Create action was added to the page definition, and an invokeAction set to make sure Create is done when the page is first displayed. I added an InputFile component set to an UploadedFile in a backing bean. The files that users will be uploading contain detail records to be associated with this master. So I added an Iterator, Create action named CreateDetail, and AttributeValues for each attribute in the detail table's VO to the page definition. There is also a Commit action in the page definition.
    In the backing bean, there is an ActionEvent method tied to a commandButton on the page. It takes the uploaded file and executes CreateDetail for each record in the uploaded file, parses the record and sets the attributes. Then it executes Commit.
    Here's the problem:
    If I execute Commit before I start creating the detail records from the uploaded file, then Commit again after creating details, this works fine. However, if there is an error when I process the details, the master has already been committed. I'd rather consider master and details as a single transaction to be committed or rolled back as a unit.
    If I don't commit before I start creating the detail records, the new primary key for the master record hasn't been retrieved yet. So the detail records don't have the foreign key that points to the master. So the commit fails - missing mandatory field.
    I tried changing the Create on the master record to a CreateInsert, hoping that the framework would do the Insert of the master and retrieve its PK before processing the details, but no dice - it still works only if I Commit before processing details.
    Any ideas?

    In 11g, I've had some issues with compositions automatically maintaining foreign-key relationships for a sequence-based PK correctly if both master and detail are new. Have you tried implementing the (Java) solution provided by the aforementioned section of the dev guide (even though you shouldn't need it for compositions)?
    If that doesn't work for you, I've found the "old" method to be successful:
    In master:
    public void postChanges(TransactionEvent e) {
    /* Only references if this is NEW */
    RowSet newDetailsBeforePost = null;
    if (getPostState() == STATUS_NEW) {
    // Store the rowset of details related
    // to this new image before calling super
    newDetailsBeforePost = (RowSet)getXXX(); // replace "getXXX" with your association accessor method
    super.postChanges(e);
    if (newDetailsBeforePost != null) {
    adjustDetails(newDetailsBeforePost);
    private void adjustDetails(RowSet details) {
    Number newFkValue = getYYY.getSequenceNumber(); // replace "getYYY" with the getter for your sequence-based PK attribute
    while (details.hasNext()) {
    DetailImpl detail= (DetailImpl) details.next(); // replace "DetailImpl" with your detail EO class
    detail.setZZZ(newFkValue); // replace "setZZZ" with the setter for the detail's FK attribute
    In detail:
    public void postChanges(TransactionEvent e) {
    MasterImpl master = getMaster(); // replace "MasterImpl" with master EO class, "getMaster" with assoc accessor method
    if (STATUS_NEW == master.getPostState()) {
    master.postChanges(e);
    super.postChanges(e);
    Even better is to create an EO framework class that just fixes this problem (in general) for you, but that's more complicated--<plug>see the forthcoming JDev11g handbook</plug>.
    Hope this helps,
    Avrom

  • Heirarchical Fetch using SQL or enchanced SQL

    The mapping of the tables is such that :
    Table A - Composite filter [Child Table - holds only the ids]
    Table B - Event Filter [Master Table - holds all details about the filter]
    Table C - Event Discount
    Table D -Tariff element Discount
    Table E - Product
    Table F - Tariff
    Table G - Product Family
    1 Composite filter can be associated to 1 or more composite filters. Event filters are associated to the event discount,Event Discounts are associated to product tariffs and Products and Tariffs are associated to product family.
    For a Given product family, we wish to fetch all the filters associated, but we are missing out few records where the composite filters are not directly associated to the discounts (i.e. the filters are associated to other filter)
    We tried the below query. But this is not giving the expected resultes.
    Can some one help me on this. Please write if u require more inputs on this.
    select evtfltr.filter_name,
    evtfltr.filter_type_id,
    evtfltr.filter_desc,
    evetyp.event_type_name,
    evtfltr.attribute_number,
    evtfltr.max_element_count,
    evtfltr.match_type
    from eventfilter evtfltr,eventtype evetyp
    where evtfltr.event_type_id=evetyp.event_type_id(+)
    and evtfltr.event_filter_id in (select event_filter_id
    from eventfilter
    where event_filter_id in (select distinct discounting_filter_id
    from eventdiscount
    where event_discount_id in (select event_discount_id
    from PVTARIFFELEMENTDISCOUNT2
    where product_id in (select product_family_id
    from productfamily
    where product_family_name = '21CN Services Generic')
    and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 ))
    and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 ))
    and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 )
    UNION
    select event_filter_id
    from compositefilter
    where composite_filter_id in (select event_filter_id
    from eventfilter
    where event_filter_id in (select distinct discounting_filter_id
    from eventdiscount
    where event_discount_id in (select event_discount_id
    from PVTARIFFELEMENTDISCOUNT2
    where product_id in (select product_id
    from product
    where product_family_id= (select product_family_id
    from productfamily
    where product_family_name = '21CN Services Generic'))
    and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 ))
    and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 ))
    and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 )
    and filter_type_id in (4,5)))
    and catalogue_change_id IN (Select catalogue_Change_id from cataloguechange where catalogue_status = 3 )

    I am been able to fetch the records which are directly associated with the discounts but not the ones which are indirectly associated to the discount.
    Table details :
    Event Filter ef
    Column Name     ID     Pk     Null?     Data Type     Default     Histogram
    EVENT_FILTER_ID     1     2     N     NUMBER (9)          Yes
    CATALOGUE_CHANGE_ID     2     1     N     NUMBER (9)          Yes
    FILTER_NAME     3          N     VARCHAR2 (40 Byte)          Yes
    FILTER_TYPE_ID     4          N     NUMBER (9)          Yes
    FILTER_DESC     5          Y     VARCHAR2 (255 Byte)          Yes
    EVENT_TYPE_ID     6          Y     NUMBER (9)          Yes
    ATTRIBUTE_NUMBER     7          Y     NUMBER (2)          Yes
    MAX_ELEMENT_COUNT     8          Y     NUMBER (9)          Yes
    MATCH_TYPE     9          Y     NUMBER (9)          Yes
    Compositefilter cf
    Column Name     ID     Pk     Null?     Data Type     Default     Histogram
    COMPOSITE_FILTER_ID     1     2     N     NUMBER (9)          Yes
    FILTER_NUMBER     2     3     N     NUMBER (9)          Yes
    CATALOGUE_CHANGE_ID     3     1     N     NUMBER (9)          Yes
    EVENT_FILTER_ID     4          N     NUMBER (9)          Yes
    ef.EVENT_FILTER_ID=cf.COMPOSITE_FILTER_ID
    cf.FILTER_NUMBER is sequence of filters associated to another filter. 1,2,3,4,5
    cf.EVENT_FILTER_ID is associated event filter.
    eg
    1) One filter name 'A'is associated with discount 'XYZ"
    2) filter is 'B','C','D' are associated with Filter 'A' (Composit filter holds this mapping)
    We are missing the records for 'B','C','D' .
    Will this help and need more clarity.

  • New Bug in 10.1.2: getAccessor in Entity returns Row instead of RowIterator

    Hi
    There seems to be a new serious Bug in JDeveloper 10.1.2. Please assume the following Situation:
    MaEntity - Master Entity
    DetEntity - Detail Entity
    MaView - A View for the Master Entity
    DetView - A View for the Detail Entity
    DetMaFkAssoc - Association between MaEntity and DetEntity
    DetMaVL - ViewLink between MaView and DetView.
    Accessor "DetView" is exposed in Entity MaEntity. Here is the generated code in MaEntity:
    public RowIterator getDetView()
      return (RowIterator)getAttributeInternal(DETVIEW);
    }This Accessor failes with a class cast exception
      java.lang.ClassCastException: my.package.DetViewRowImplUps, what is this??? The Accessor obviously returned a Row for the Detail View, where a RowIterator should have been returned!
    I'd appreciate if anyone from oracle could have a look at this!
    Thanks

    Some more info:
    A short look into MaEntity.xml reveals the following code snippet  
       <AccessorAttribute
          Name="DetEntity"
          Association="my.package.DetMaFkAssoc"
          AssociationEnd="my.package.DetMaFkAssoc.DetEntity"
          AssociationOtherEnd="my.package.DetMaFkAssoc.MaEntity"
          Type="oracle.jbo.RowIterator"
          IsUpdateable="false" >
       </AccessorAttribute>
       <ViewLinkAccessor
          Name="DetView"
          ViewLink="my.package.DetMaVL"
          ViewLinkEnd="my.package.DetMaVL.DetView"
          ViewLinkOtherEnd="my.package.DetMaVL.MaView1"
          Type="oracle.jbo.server.ViewRowImpl"
          IsUpdateable="false" >
       </ViewLinkAccessor>Obviously the two Accessors point into different directions. The Association-Accessor is correct, whereas the ViewLinkAccessor returns a ViewRowImpl instead of a RowIterator.
    The codesample above was generated by a wizard in a new simple test project of JDeveloper 10.1.2. I realized, that JDeveloper 9.0.5.2 has also created wrong XML Code. But, for some reason it has worked in this Version.
    This is a serious bug, which will probably prevent me from upgrading to 10.1.2 as this will break my application. :-(
    Any hints are appreciated
    Thanks Frank Brandstetter

  • ValidateEntity getting called multiple times

    Hi,
    There is a parent EO and a child EO. There is a composite association between the parent and child.Association accessors are generated for both source and destination. In the ChildEO's doDML method , the following code is added.
    Long abc = getPArentEO().getAttr1();
    Long xyz = getPArentEO().getAttr2();
    setAttr3(abc);
    setAttr4(xyz);
    super.doDML();
    getParentEO() is the association accessor .
    After the addition of this code, all the method validators of the parent are getting fired more than once. The validateEntity of the parentEO is getting called more than once if I set some attribute of the childEO in childEO's doDML . Is this the expected behaviour?
    Thanks.

    Even on adding the setter in prepareForDML (either in parent or child) , the validateEntity is getting called multiple times. In fact ,validateEntity is getting called once before prepareForDML and again after. One of my method validators fail on the subsequent call giving an error ..Please help.

  • Upgraded Entity BindingStyle="Oracle" New Entity BindingStyle="OracleName"

    Thanks to Sacha see thread
    ADF BC: Exception when using an association accessor  in polymorphic EOs
    You'll notice that the read-only parameter BindingStyle is set to "OracleName" when creating a new entity with JDev 10.1.3.
    Upgraded Entity have following setup: BindingStyle="Oracle"
    There seems to be problem when using associations between entities with different BindingStyle.
    I got following exception on a call to get associated entity
    java.lang.ClassCastException: oracle.jbo.domain.Number
         at oracle.jbo.server.RowFilterKey.<init>(RowFilterKey.java:47)
         at oracle.jbo.server.ViewObjectImpl.buildRowFilter(ViewObjectImpl.java:4527)
         at oracle.jbo.server.ViewRowSetImpl.getRowFilter(ViewRowSetImpl.java:419)
         at oracle.jbo.server.ViewRowSetImpl.getRowFilter(ViewRowSetImpl.java:370)
         at oracle.jbo.server.ViewRowSetImpl.ensureStorage(ViewRowSetImpl.java:4632)
         at oracle.jbo.server.EntityRowSetImpl.<init>(EntityRowSetImpl.java:80)
         at oracle.jbo.server.EntityImpl.createAssociationAccessorRS(EntityImpl.java:7610)
         at oracle.jbo.server.AssociationDefImpl.get(AssociationDefImpl.java:329)
         at oracle.jbo.server.AssociationDefImpl.get(AssociationDefImpl.java:274)
         at oracle.jbo.server.EntityImpl.getAttributeInternal(EntityImpl.java:2144)
         at com.trivadis.adf.inheritance.model.eo.EmployeeImpl.getDepartment(EmployeeImpl.java:186)
         at com.trivadis.adf.inheritance.model.eo.EmployeeImpl.getSal(EmployeeImpl.java:103)
         at com.trivadis.adf.inheritance.model.eo.EmployeeImpl.getAttrInvokeAccessor(EmployeeImpl.java:141)
         at com.trivadis.adf.inheritance.model.eo.ManagerImpl.getAttrInvokeAccessor(ManagerImpl.java:76)
         at oracle.jbo.server.EntityImpl.getAttribute(EntityImpl.java:784)Can I change that parameter outside JDev to check if that solves my problem?
    Thanks
    Fred

    The development team has fixed the bug in the JDeveloper 11g code line. The bug was incorrectly marked as being related to a non-production version of JDeveloper so it was not visible before through Metalink -- where only bugs on production products are relevant to external customers. It should be visible within 24 hours on metalink.
    You can request a 10.1.3.1 backport of the bug by opening a service request on metalink, citing that bug number.
    As a 24-hour-early preview, the bug mentions the workaround is manually modifying the XML Files to insure that the two entities on either side of an association have the same binding style.

  • JDev11g : Rollback problem

    I have a table with LOV which is filtered by view accessor ( id is binded into viewCriteria of second VO (filtered one) )
    Looks like this:
    VO1(in adf table with LOV) ----conected by view accessor (variable id is binded to VO2 vievCriteria)---&gt; VO2
    I get a problem when i create new insert put inside row some values and click on another row and then rollback.
    The LOV becomes empty and i get error that query on sevond (VO2) cannot be executed (I think that is because the bind variable is unset during rollback).
    Error is:
    VCs converted to RowMatch:  ( (WorkOrderId = :WOid_bind ) )
    VO2&gt;#q computed SQLStmtBufLen: 173, actual=135, storing=165
    SELECT ID, NAME, ID_2 FROM Table1 WHERE ( ( (ID_2 = ? ) ) ) ORDER BY NAME
    Bind params for VO2
    Binding param 1: 148
    Binding param 2: 148
    ViewObject: VO2 close single-use prepared statements
    QueryCollection.executeQuery failed...
    java.sql.SQLException: Invalid column index
    Does anybody know how to solve this problem ?
    Thank you in advance, Rok Kogov&scaron;ek
    I find out where problem is happpening, while the thing is working is only one parameter binded (*Binding param 1: 148*
    ) but when i try scenario which crashes the application parameter is binded twice (*Binding param 1: 148* Binding param 2: 148
    Edited by: Rok Kogovšek on Nov 17, 2008 3:17 AM

    this link may help you
    Ora-01555, snapshot too old: rollback segment number 2 with name "_SYSSMU1
    Khurram                                                                                                                                                                                                                                           

  • Another controversy: Where to store common application parameters?

    For higher flexibility, application parameters are usually set. For intranet applications, I used to store these parameters with my Oracle database. Now I'm developing a web-based internet applications, would you please advise for the following questions:
    1) The place to store common application parameters (How to set and how to retrieve?)
    (Currently, I have put such application parameters into a class file. Although it should be faster than retrieval from database, it means that I need to re-compile in case of any changes are made for those parameters. Can I set up some global constant for my application with my JDeveloper? How to set and how to retrieve?).
    2) The place to store the application configuration and application package string
    (As you see, if you have many Jsp page, it's not convenient to change the <jbo:ApplicationModule ... Configuration="MyConfig"... /> all the time. It may be better if it could be generalized by a variable. I have found the configuration in the "web.xml" file, but i don't know how to retrieve the value from it. Currently, I have made use of my old approach mentioned in Question 1 - place the configuration string in a common class ... the drawback has already been mentioned as above ... any better solutions?)
    Thanks for replying!

    Curt,
    To create an AM using the definition in the cpx file:
       JUApplication app = JUMetaObjectManager.createApplicationObject("Project2.am");
       ApplicationModule am = app.getApplicationModule();.
    This is the same call used by JClient application.
    Here is the story with BC4J runtime params:
    jbo.default.language
    This parameter is used in localization.
    jbo.default.country
    This parameter is used in localization.
    DeployPlatform
    The platform on which the business components are deployed:
    LOCAL - The web module of Oracle 9iAS
    EJB_IAS - The EJB module or Oracle 9iAS
    VB - A VisiBroker CORBA server
    WLS - a WebLogic application server
    Connection Mode
    For business components deployed to VisiBroker, the connection
    mode used:
    1 - colocate mode
    2 - remote mode
    3 - IOR mode
    4 - bind mode
    For more information, see the VisiBroker documentation.
    HostName
    For all deployment platforms except LOCAL, the name of the
    application server hosting the business components.
    ConnectionPort
    For all deployment platforms except LOCAL, the port of the
    application server hosting the business components.
    ApplicationPath
    For all deployment platforms except LOCAL, the JNDI path to the
    business components.
    java.naming.security.principal
    For all deployment platforms except LOCAL, the username for the
    IIOP connection to the business components.
    jbo.use.pers.coll
    Setting this to true enables view row spillover. If you are working
    with large rowsets and memory is a problem, this property should be
    true. For more information, see the Oracle JDeveloper documentation.
    jbo.pers.max.rows.per.node
    The maximum size of a node for view row spillover.
    jbo.pers.max.active.nodes
    The maximum number of nodes that will be cached in memory for view
    row spillover.
    jbo.fetch.mode
    AS.NEEDED causes view objects to only fetch rows when they are
    requested. ALL causes them to fetch the entire results of their
    queries.
    MetaObjectContextFactory
    The default value uses the business components framework's
    MetaObjectContext Factory, which stores business components metadata
    in XML. If you want to use a different format for business components
    metadata, you can implement your own MetaObjectContext Factory.
    IsLazyLoadingTrue
    For all deployment platofrms except LOCAL, setting this property to
    true will cause business componetns metadata to be loaded into memory
    only as needed, whereas setting it to false will cause all metadata
    to be loaded into memory immediately. Lazy loading is mandatory in
    LOCAL mode.
    Factory-Substitution-List
    The list of business components to substitute out. See the Oracle
    JDeveloper documentation for more information on substituting
    business components.
    jbo.project
    The project containing business components to be substituted for old
    ones, if Factory-Substitution-List is not empty.
    jbo.max.cursors
    The maximum number of cursors the business components may have open.
    The framework will clean up free JDBC statements as the number of
    cursors approaches this number.
    do.failover
    This property is true if application module failover is enabled.
    Setting this property to false provides better performance at the
    expense of reliability.
    jbo.doconnectionpooling
    This property is true if application modules are allowed to share
    connections. For more information about connection pooling, see the
    Oracle JDeveloper documentation.
    jbo.recyclethreshold
    The recycle threshold for application module pooling. When the number
    of application modules in the pool reaches this level, the pool
    begins to recycle application modules in stateful mode. Monitoring
    the application module pool statistics may help you decide on a good
    value for this field.
    jbo.ampool.highwatermark
    The maximum number of application modules allowed in the pool. If
    this high-water mark is reached, clients must wait for the next
    available application module.
    jbo.ampool.resetnontransactionalstate
    If this property is false, application modules will preserve their
    non-transactional state (properties and dynamically added view
    object, view link, and nested application module members) even when
    they are checked in in stateless mode. If the property is true,
    non-transactional state will be reset.
    jbo.ampool.sessioncookiefactoryclass
    This class creates the session cookies that allow clients to retrieve
    application modules in stateful mode. Change this value only if you
    need to implement your own custom session cookie factory. See the
    Oracle JDeveloper documentation for more information.
    jbo.ampool.connectionstrategyclass
    This class manages the connection strategy for the application module
    pool. Change this value only if you need to implement your own custom
    connection strategy. See the Oracle JDeveloper documentation for
    more information.
    jbo.passivationstore
    When an application module is released in stateful mode, its state is
    saved when the application module is recycled (or immediately if
    failover is enabled). If this property is 'null' or 'database', the
    state is saved to the database. If the property is 'file', the state
    is saved to a local file.
    RELEASE_MODE
    The release mode--Stateless, Stateful, or Reserved--used by data web
    beans. Other clients specify their own release mode.
    jbo.maxpoolcookieage
    The maximum age of the browser cookies used to help clients retrieve
    stateful application modules. If these cookies do not time out, the
    value is -1.
    PoolClassName
    The class that implements the application module pool. Do not change
    this value unless you are using a custom application module pool
    implementation. For more information, see the Oracle JDeveloper
    documentation.
    jbo.maxpoolsize
    The maximum size of the JDBC connection pool. If this number is
    exceeded, an application module will have to wait for a connection if
    none is available.
    jbo.initpoolsize
    The number of JDBC connections automatically created in the
    connection pool, before any requests.
    jbo.poolrequesttimeout
    The amount of time, in milliseconds, an application module will wait
    for an available connection before failing.
    jbo.assoc.consistent
    If this property is true, the entity rowsets retrieved through
    association accessors will include rows that have been added, even if
    these changes have not been posted to the database. This property can
    reduce performance and so should be turned off if not needed.
    jbo.viewlink.consistent
    If this property is true, the view object rowsets retrieved through
    view link accessors will include rows that have been added, even if
    these changes have not been posted to the database. This property can
    reduce performance and so should be turned off if not needed.
    jbo.SQLBuilder
    The SQL flavor generated by view objects:
    Oracle - for the Oracle8i or Oracle9i database
    OLite - for the Oracle Lite database
    SQL92 - for any SQL92-compliant database
    DB2 - IBM DB2 Universal Database
    jbo.ConnectionPoolManager
    The class that manges the connection pool. Do not change this value
    unless you are using a custom application module pool manager
    implementation. For more information, see the Oracle JDeveloper
    documentation.
    jbo.TypeMapEntries
    The type mappings used by business components:
    Oracle - for the Oracle8i or Oracle9i database
    OLite - for the Oracle Lite database
    SQL92 - for any SQL92-compliant database
    oracle.jbo.defineColumnLength
    If this is false, business components will not by default define
    column length for CHAR and VARCHAR2 columns. In general, this should
    only be set to false for NLS applications.
    jbo.tmpdir
    You can use this parameter to specify a directory for temporary files.
    jbo.server.internal-connection
    Specifies a connection to use when application module state is saved
    to the database. By default, the application module pool will use the
    application module's JDBC connection.
    SessionClass
    The class which implements the oracle.jbo.Session interface, used to
    load and store session context throughout a client's lifetime. By
    default, the framework uses oracle.jbo.server.SessionImpl. Do not
    change this value unless you have implemented a custom session
    implementation class.
    TransactionFactory
    The class responsible for creating database transactions. By default,
    the framework uses oracle.jbo.server.DatabaseTransactionFactory. Do
    not change this value unless you have implemented a custom
    transaction factory class.
    jbo.debugoutput
    If this property is set to 'console', debug information is displayed
    on the console. If the property is set to 'silent', debug information
    is not displayed.
    jbo.logging.show.timing
    Whether to show the time elapsed between debug calls.
    jbo.logging.show.function
    Whether to show the name of the method that triggered a debugger
    call. Setting this property to true will degrade performance.
    jbo.logging.show.level
    Show the trace level of debugger messages. The lower the trace level,
    the more important the message.
    jbo.logging.show.linecount
    Number the lines of debugger output.
    jbo.logging.trace.threshold
    Lower this number to display only the most important debugger
    messages; raise it to display a larger portion of debugger messages.
    jbo.jdbc.driver.verbose
    If this property is true, the JDBC driver will run in verbose mode.
    For more information, see the JDBC documentation.
    jbo.ejb.txn.timeout
    For EJB deployment configurations, the number of seconds after the
    last database access before the EJB transaction expires.
    jbo.ejb.txntype
    For EJB deployment configurations, the transaction type:
    global - use the JTA UserTransaction interface
    local - use straight JDBC
    jbo.xml.validation
    If true, the XML parser uses strict XML validation.
    Charles.

  • MAC-Based Authentication

    I am sorry if this has been asked before or it is the wrong place to ask this.
    I just want to know how secure is MAC-Based Authentication on an AP340 access-point (not bridge) with version 11.07.
    I've done this by adding 'Dest MAC Address' in 'Address Filters' under 'Association' in 'Setup'.
    Also selected 'Disallowed' for 'Default Unicast Address Filter' for all the relevant authentication types in 'Advanced' for 'AP Radio' of the 'Network Ports' in 'Setup'.
    Thanks for any suggestions.

    If an attacker has a network analizer, they can see the MAC address in use (even if WEP is being used as the MAC must not be encrypted)
    Some 802.11 NICs allow the user to configure a MAC address into the NIC.
    So the attacker *could*:
    1. observe a valid NIC in use
    2. program that MAC into their NIC
    3. Wait till the valid user has gone home
    4. Use the NIC they have programmed to access your network from the safty of the parking lot.
    LEAP or VPNs provide a much more secure solution

  • Real app business logic, access serialization

    Hi,
    in our real application we have some business logic.
    The bc4j examples show for example how to limit the value
    of a colum between two values.
    But our business logic is not limited to a so
    simple case.
    For us is very common that business logic involves
    more (aggregate) tables.
    For example consider a invoice and
    the line of the invoice. These are two tables but
    a business rule say that the sum of the line should
    be the total column of the invoice. Moreover the
    total of the invoice can't be zero. The need the
    existence of the total column in invoice is required
    because speed up queries and for the constraints and
    we can't make it only a display value of a
    query.
    To avoid data corruption we have noted that access
    should serialized for a invoice. Otherwise two user
    can change the lines and the total can be correct in the
    session but may not be correct at the end of the
    two commit.
    How can we obtain this in bc4j? Where should we place
    the code? How to make access of the invoice serialized?
    There is some documentation or code example of this?
    Very thanks in advance!

    By marking the lines entity to be composed with the invoice entity, and marking the "lock top-level entity" you can automatically achieve the serialization you're looking for using BC4J.
    If anything in the invoice, or any composed children are modified, it will lock the top-level parent (invoice) before allowing the edit to proceed.
    To express a rule that asserts a rule about the sum of the detail lines, write a entity-level validation rule in the invoice (parent) entity which uses the association accessor to iterate the lines and calculate the sum.

Maybe you are looking for

  • Help with Skillbuilders Modal Page plug-in

    Hi, I'm an APEX 4.1 user and a novice. I'm trying to use the Skillbuilders Modal Page plug-in. I have a report with an item (Order Number) that I use to drilldown. When the user clicks on the order number link to drilldown, it goes to another page/re

  • Issue with HTML tags visible in Outlook emails

    Hi everyone, I'm having an issue with a website I'm working on. On our site, we have a page that generates emails after certain events occur. These are sent to a forwarding address on our mail server, which is then sent to several users on our mail s

  • Is there a script available for 'live' endnotes in Indesign 5.5?

    I want to export books to epub with live endnotes (1,2,3,4,) displayed chapter by chapter at the end of the ebook. There are usually around 10 chapters and 700 notes. How can this be done? I have ongoing books to do like this, so I need an automated

  • Accordion with spry data on IE8

    Hi, I have an accordion with spry data and everything works fine on IE8 and FF, but on IE8 when i click on a accordion tab it doesnt focus on that open panel. It takes me at the very top of where my accordion begins. I notice the same thing happens t

  • What is the use of targetNamespace in the WSDL file and what goes into it

    I am not sure how is targetNamespace useful in WSDL definition. Are there any rules for putting value into that attribute. My code generator works for any value. For example, Both the following code snippets work. <xsd:schema xmlns:xsd="http://www.w3