JSF- view with no key-attributes cannot be activated

Hi,
i have a view Called Globals with 2 transient varibales , when i open many sessions at the same time and work with them , i got error
JBO-30003: The application pool (model.PlacingModuleLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-25052: ViewObject Globals with no key-attributes cannot be activated!
each attribute of the view have
Updateable = Always
Queyable is Checked
Passivative is checked
in the view properties, tab Tuning => No Rows
and "Fill Last Page " and "Passivate State " and "Including All Transient Variables"
all the 3 are checked
the view is NOT based on Entity Object
i use this view for holding data from SelectOneListBox
should i modify the view by any way ?
By The Way this view is exactly the same in SRDemo
Any Suggestions?
thanks....

hi,
answer is here
http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.bc4jjavadoc%7Crt%7Coracle%7Cjbo%7CCSMessageBundle~html/
and it says
JBO-25052: JboException
Cause: A ViewObject with no key attributes has transient passivatable attributes. This type of ViewObject cannot participate in passivation/activation.
Action: Set one or more attributes as key attributes for this ViewObject
that means that SRDemo may have a little bug which is any attribute should be key attr in Globals view

Similar Messages

  • Detail entity Location with row key null cannot find or invalidate its owni

    I have a simple parent child relationship generated in ADF BC. It's 1 to many...a Work Request can have one or more Locations. If I turn on Composition Association in my assoc definition, I get "oracle.jbo.InvalidOwnerException: JBO-25030: Detail entity Location with row key null cannot find or invalidate its owning entity." The error occurs on the CreateInsert for the Location entity. I've spent hours looking at other solutions and posts about this issue to no avail, including attempting both methods at the below post.
    http://radio.weblogs.com/0118231/stories/2003/01/17/whyDoIGetTheInvalidownerexception.html
    When I turn off Composition Association and I only add one Location to the Work Request, both the CreateInsert and the Commit work properly. However, if I add a second Location, I get a database constraint violation because ADF BC tries to commit the Location before the Work Request. I have verified that the Work Request Id is populated properly on the Location object, so I'm at a loss at this point. I'm on 11.1.1.3.

    Here's the answer in case someone else burns a day on this like I did. Turns out it's a bug (SR submitted), and one that's easy to recreate. The problem is that the parent object isn't "initialized" until after one of it's setters are called. So, what was happening was that I was invoking CreateInsert on the parent, then CreateInsert on the child, then setting properties on the child. So, since I invoked setters on the child first, the child is initialized first, and is thus ADF BC atttempts to insert it first upon commit. The strange thing is that the child had the correct ID for it's associated parent in the logs. Anyways, here are the steps to easily recreate:
    1. Model a simple parent child relationship (1 to many, not sure if that matters).
    2. Generate the ADF BC components (entity, assoc, vo's, and view links).
    3. Ensure that Composition Association is checked in the Assoc object.
    4. Add the parent to the app module, then add the child nested below it.
    5. Create a new task flow and drop CreateInsert for the parent object onto the flow. Make this the default activity
    6. Drop the CreateInsert from the child object onto the task flow, and link it as the outcome of the parent's CreateInsert
    7. Drop a page fragment onto the task flow that is bound to the parent object, and make it the third step in the task flow.
    8. Drop a commit onto the task flow as the forth step, and place the button on the page that invokes the action corresponding to the commit.
    Run it. As soon as the CreateInsert is hit for the child, the error is thrown.
    Another associated bug is that (appears to have the same culprit) the child will not be inserted unless one of it's attributes is set (note that you have to turn off Composition Association to get the above error to disappear). However, the child will not be inserted into the database unless one of its setters are invoked.
    **The workaround is to use CreateWithParams instead of CreateInsert in order to create the parent object, and pass in at least one parameter to set an attribute on the parent (even to blank). The same must be done on the child unless one of it's setters are invoked.
    Note that we're using SQL Server 2008 R2. This appears to be a problem with ADF BC and not with the target DB platform, but I have not tested with Oracle.

  • Detail entity with row key null cannot find or invalidate it

    hi am trying to insert parent table values and child table values same time in same view,am in jdeveloper 11.1.1.6.0 am geting this error
    the error happen when i click createinsert ,am doing this in testmodel
    93] executeQueryForCollection ViewObject:_LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1, RowSet:_LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1_0
    [94] _LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1>#q computed SQLStmtBufLen: 137, actual=110, storing=140
    [95] SELECT LutProfcategory.PROFCATCODE,         LutProfcategory.PROFCATEGORY FROM LUT_PROFCATEGORY LutProfcategory
    [96] ViewObject: [model.view.LutProfcategoryView]IntUsrAppModule._LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1 Created new QUERY statement
    [97] Bind params for ViewObject: [model.view.LutProfcategoryView]IntUsrAppModule._LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1
    [98] For RowSet : _LOCAL_VIEW_USAGE_InternalUsr_IntUsr_LutProfcategoryView1_0
    [99] Passing to detail entity.create: CadaccUserFkAssoc.UamCadastreaccounts = oracle.jbo.Key[11309 ]
    [100] OracleSQLBuilder Executing doEntitySelect on: LUT_COUNTRY (false)
    [101] Built select: 'SELECT COUNTRYCODE, COUNTRYNAME FROM LUT_COUNTRY LutCountry'
    [102] Executing FAULT-IN...SELECT COUNTRYCODE, COUNTRYNAME FROM LUT_COUNTRY LutCountry WHERE COUNTRYCODE=:1
    Exception in thread "AWT-EventQueue-0" oracle.jbo.InvalidOwnerException: JBO-25030: Detail entity UamUserdetails with row key null cannot find or invalidate its owning entity.
         at oracle.jbo.server.EntityImpl.internalCreate(EntityImpl.java:1341)
         at oracle.jbo.server.EntityImpl.create(EntityImpl.java:1020)
         at model.Entity.UamUserdetailsImpl.create(UamUserdetailsImpl.java:913)
         at oracle.jbo.server.EntityImpl.callCreate(EntityImpl.java:1197)
         at oracle.jbo.server.ViewRowStorage.create(ViewRowStorage.java:1152)
         at oracle.jbo.server.ViewRowImpl.create(ViewRowImpl.java:498)
         at oracle.jbo.server.ViewRowImpl.callCreate(ViewRowImpl.java:515)
         at oracle.jbo.server.ViewObjectImpl.createInstance(ViewObjectImpl.java:5714)
         at oracle.jbo.server.QueryCollection.createRowWithEntities(QueryCollection.java:1993)
         at oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(ViewRowSetImpl.java:2492)
         at oracle.jbo.server.ViewRowSetImpl.doCreateAndInitRow(ViewRowSetImpl.java:2533)
         at oracle.jbo.server.ViewRowSetImpl.createAndInitRow(ViewRowSetImpl.java:2498)
         at oracle.jbo.server.ViewObjectImpl.createAndInitRow(ViewObjectImpl.java:11042)
         at oracle.jbo.jbotester.NavigationBar.doInsertAction(NavigationBar.java:136)
         at oracle.jbo.jbotester.NavigationBar.doAction(NavigationBar.java:109)
         at oracle.jbo.uicli.controls.JUNavigationBar$NavButton.actionPerformed(JUNavigationBar.java:118)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
         at java.awt.Component.processMouseEvent(Component.java:6289)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
         at java.awt.Component.processEvent(Component.java:6054)
         at java.awt.Container.processEvent(Container.java:2041)
         at java.awt.Component.dispatchEventImpl(Component.java:4652)
         at java.awt.Container.dispatchEventImpl(Container.java:2099)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
         at java.awt.Container.dispatchEventImpl(Container.java:2085)
         at java.awt.Window.dispatchEventImpl(Window.java:2478)
         at java.awt.Component.dispatchEvent(Component.java:4482)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:644)
         at java.awt.EventQueue.access$000(EventQueue.java:85)
         at java.awt.EventQueue$1.run(EventQueue.java:603)
         at java.awt.EventQueue$1.run(EventQueue.java:601)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
         at java.awt.EventQueue$2.run(EventQueue.java:617)
         at java.awt.EventQueue$2.run(EventQueue.java:615)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:614)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)Edited by: adf009 on 2013/04/19 1:23 PM
    Edited by: adf009 on 2013/04/19 1:24 PM

    Hi,
    I assume this is a child entity in a composition association. So when you create the rows for the child entity do you populate the parent's reference key ?
    You can use NameValuePairs
    NameValuePairs nvps=new NameValuePairs();
    nvps.setAttribute("ForeignKeyReference", value);
    createAndInitRow(nvps);
    Regards,
    Ramandeep

  • Help with Detail entity Insert with row key null cannot find or invalidate

    Hi,
    My Problem:
    I have created a form in JDeveloper ADF. This form is based on the Table Name IT_HARDWARE. The IT_HARDWARE keep track of all the hardware and it is in the relationship with the IT_SYSTEM table, IT_LOCATION, EMPOYEES. So the IT_HARDWARE has a FOREIGN KEY from IT_SYSTEM (SYS_ID), IT_LOCATION (LOC#), EMPLOYEE (EIP#).
    When I create a form to insert data into this form, I receive message "Detail entity ItHardwareInsert with row key null cannot find or invalidate its owning entity."
    I tried all possible to understand what is causing this and I can't find it. Can someone help me?

    Than you for the link, I appreciate it. I kind understand the root of the problem, but since I am new to JDeveloper, I am getting trouble to solve the problem. I am going to read and understand what is going on. Thank you for the link.

  • View with Primary Key

    Why view with PK ? That's need to row in view be referenced from other foreing key into other table. But can't enable PK from view onky RELY and NORELY attribute can be changed on this PK, if PK is not enable then it can't be reference by FK.
    The questión is WHY Oracle allow create PK (not enabled and not validate) into VIEW when thist's redundant on PK from original table. ????
    My proposs is make relation only with record with any condition (The VIEW) Only thist record are relation with another table. If this limitation aren true the view is not option to build this subset relation. The first option to solve this situation is make another table intermediate content rows with only one column (the PK field on original table).
    Plz. ... another sugestion .. !!!!!
    Thank in advanced !!!!

    Any one plsssssss

  • Has anyone successfully implemented the JSF Viewer with Facelets?

    We have recently started integrating Crystal into one of our web apps that is using JSF + Facelets + Seam.
    I've built a taglib for the jsf viewer and configured it in web.xml and faces-config. I'm pulling an IReportSource from a backing bean using com.crystaldecisions.reports.sdk.ReportClientDocument  and that is using a .rpt file stored on a directory. This all seems to be working, as I can step through the code and see the IReportSource being generated.
    However, when the page loads, I am seeing the crystal javascript being converted in the page source, but nothing is loading on the page. 
    Has anyone seen an issue similar to this tied to Facelets? I've seen numerous documentation on Crystal and JSP, but very little on JSF  or Facelets.
    Has anyone been able to get a setup like this or similar to work properly?
    I've also noticed an error when adding the viewer:
    java.io.IOException: Recover report client document state failed.
    at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.readExternal(SourceFile:1492)
    at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.readExternal(SourceFile:131)
    at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
    I believe this to be related to me switching over to the serializable ReportClientDocument: com.crystaldecisions.sdk.occa.report.application.ReportClientDocument  versus using the nonserializable version.
    When using the non-serializable version, I am seeing a constructor issue with the JPEReportSource
    Exception: java.io.InvalidClassException: com.crystaldecisions.reports.reportengineinterface.JPEReportSource; no valid constructor
    Has anyone seen this issue before or able to offer any suggestions?

    Well, according to the tutorials I have seen on the internet, I believe CrystalReport was successfully implemented and tested with jsp, to have it working with Facelets, we need to do a little bit of work around. We need to make a new JSF custom component and assign it to an external renderer. then we can use it to view the report
    please follow these and it should work after then,
    1- bring the following jars into your libs
    commons-configuration-1.2.jar
    Concurrent.jar
    CrystalCommon.jar
    CrystalContentModels.jar
    CrystalDatabaseConnectors.jar
    CrystalFormulas.jar
    CrystalQueryEngine.jar
    CrystalReportEngine.jar
    CrystalReportingCommon.jar
    icu4j.jar
    jrcadapter.jar
    jrcerom.jar
    keycodeDecoder.jar
    MetafileRenderer.jar
    rasapp.jar
    rascore.jar
    rpoifs.jar
    serialization.jar
    URIUtil.jar
    webreporting.jar
    webreporting-jsf.jar
    xercesImpl.jar
    xml-apis.jar
    2- bring the folder "crystalreportviewers115" right under the "WebContent".
    3- implement the custom FacesComponent and make it extend the "UIReportPageViewer" as follows;
    import packagename.CustomReportRenderer;
    @FacesComponent ("packagename.newReportViewer")
    public class UIReportViewer extends com.crystaldecisions.report.web.jsf.UIReportPageViewer implements Serializable{
        public UIReportViewer () {
            this.setRendererType("packagename.CustomReportRenderer");
    4- implement the renderer and make it extend the "ViewerHtmlRenderer" as follows;
    @FacesRenderer(componentFamily="CrystalReports.DHTMLViewer", rendererType="packagename.CustomReportRenderer")
    public class CustomReportRenderer extends com.crystaldecisions.report.web.jsf.ViewerHtmlRenderer implements Serializable {
    5- make a new tag library xml file next to the web.xml so the application can find the tag configurations. name it "taglib.xml" and add the following inside it;
    <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee"
        version="2.0">
        <namespace>http://new-jsf-custom-components/</namespace>
        <tag>
            <tag-name>ReportViewer</tag-name>
            <component>
                <component-type>packagename.newReportViewer</component-type>
                <renderer-type>packagename.CustomReportRenderer</renderer-type>
            </component>
        </tag>
    </facelet-taglib>
    6- configure the web.xml with the following
      <context-param>
            <description>
            State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
        <context-param>
              <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
            <param-value>/WEB-INF/taglib.xml</param-value>
        </context-param>
        <context-param>
            <param-name>crystal_image_uri</param-name>
            <param-value>../../crystalreportviewers115</param-value>
        </context-param>
    7- implement the reportViewer.xhtml and make sure you have the following;
    - in the tag libraries add the namespace schema xmlns:crystalnmcps="http://new-jsf-custom-components/"
    - add the new reportViewer component
    <crystalnmcps:ReportViewer reportSource="#{youController.reportSource}"  displayToolbarLogo="false" parameterFields="#{youController.parameterFields}"  allowParameterPrompting="false" />
    Now run your app.
    I hope this helps. good luck

  • Attribute View no 'Add Key Attribute'

    Hi,
    I don't know if this is just a beginner problem, but I tried to run some of the training data and fail to compile an Attribute View simply cause the Key Attribute is missing. I click on a field and I get entries like Add To Output, but that's it.
    But to my understanding I would need this, or am I wrong?
    roland
    P.S.: Hana Studio 1.80.3

    Hi,
    You can mark a column as key attribute in two ways.
    1. Click on the column which you wanto mark it as key attribute after you add it to output, in properties of that column there is a key attribute property. Edit it as true.
    2. Add the columns to output, go to semantics node. Here in the list of columns select the column which you wanto mark as key attribute. Now either you can click on drop down of that rows first column and select Key Attribute or you can click on key attribute button in columns pane.
    Regards,
    Rashmi

  • Is there an and in original box with cables. Item cannot be activated because of cloud lock. Preof cloud lockvious user login is UNKNOWN. Unit is sold as is for parts or use by someone who knows how to fix this issue

    Amazon has a refurbed I pad Air with this remark. Item cannot be activated because of cloud lock previous user login unknown. Is there a work around or is it best to forget this one and move on?

    You are welcome, at least the seller was honest enough to let potential buyers know that the device is useless to anyone who would try to buy it.

  • Problem with object view with primary-key based object identifier

    Hello!
    I met such problem.
    t1 is persinstent-capable class:
    class t1 : public PObject { .... };
    T1OV is object view, based on object table T1OT
    I1 is primary key of the table T1OT.
    Next code:
    t1* t = new (conn, "T1OV") t1(...);
    conn->commit();
    try
    t->markDelete();
    conn->commit(); // exception throws here
    Works fine if T1OV defined as:
    create view t1ov of t1 with object identifier default
    as select * from t1ot;
    And throws an exception
    "ORA-22883: object deletion failed"
    if:
    create view t1ov of t1 with object identifier (I1)
    as select * from t1ot;
    Such problem also occurs when object view is based on relational table/view (OID is primary-key based).
    Also it occurs when
    t->markModified() used insted of t->markDelete()
    I am using Oracle 9i second release for windows and
    MS VC++
    Thank You

    http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_85a.htm#2065512
    You can specify constraints on views and object views. You define the constraint at the view level using the out_of_line_constraint clause. You define the constraint as part of column or attribute specification using the inline_constraint clause after the appropriate alias.
    Oracle does not enforce view constraints. However, operations on views are subject to the integrity constraints defined on the underlying base tables. This means that you can enforce constraints on views through constraints on base tables.
    Restrictions on View Constraints
    View constraints are a subset of table constraints and are subject to the following restrictions:
    You can specify only unique, primary key, and foreign key constraints on views. However, you can define the view using the WITH CHECK OPTION clause, which is equivalent to specifying a check constraint for the view.
    Because view constraints are not enforced directly, you cannot specify INITIALLY DEFERRED or DEFERRABLE.
    View constraints are supported only in DISABLE NOVALIDATE mode. You must specify the keywords DISABLE NOVALIDATE when you declare the view constraint, and you cannot specify any other mode.
    You cannot specify the using_index_clause, the exceptions_clause clause, or the ON DELETE clause of the references_clause.
    You cannot define view constraints on attributes of an object column.
    Rgds.

  • Getting Not inside a container with tree (key attributes defined)

    Hello,
    I'm building an ADF tree with a recursive entity based query:SELECT ProjectIndicators.ID_COMPONENT AS ID_COMPONENT_KEY,
           ProjectIndicators.ID_PROJECT AS ID_PROJECT_KEY,
           ProjectIndicators.THE_VALUE,
           , res.ID_COMPONENT
           , res.ID_PROJECT
           , res.ID_MAIN_COMPONENT
    from PROJECT_INDICATORS_BA ProjectIndicators
    SELECT Project.Id_Project
           , Component.Id_Component
           , Component.Id_MAIN_COMPONENT
    FROM ...
    WHERE ... and Project.Id_Project = :Bind_IdProject
    ) res
    WHERE ProjectIndicators.Id_Project (+) = res.ID_PROJECT
          AND ProjectIndicators.Id_Component (+) = res.ID_COMPONENTNote there's a *:Bind_IdProject* peremeter inside a subquery.
    Queried data is:ID_COMPONENT_KEY     ID_PROJECT_KEY     THE_VALUE     ID_COMPONENT     ID_PROJECT     ID_MAIN_COMPONENT
                                                   1064             1003     
                                                   1065             1003             1064
                                                   1353             1003             1066
    1646                     1003                             1646             1003             1065
                                                   1586             1003             1066
                                                   1587             1003             1066
    1605                       1003              11             1605              1003             1065
    1625                       1003                          1625             1003             1065
                                                   1845             1003             1065
                                                   1846             1003             1845 ID_COMPONENT_KEY and ID_PROJECT_KEY are primary keys of PROJECT_INDICATORS_BA. THE_VALUE is a filed I need to edit (in case a row is null, a new row would be created on runtime).
    ID_COMPONENT and ID_MAIN_COMPONENT is a recursive relationship. ID_PROJECT is a foreign key.
    The recursive view link is
    Source            Destination
    IdComponent   IdMainComponent
    IdProject         IdProject
    Query
    (:Bind_IdComponent = ID_MAIN_COMPONENT) AND (:Bind_IdProject = ID_PROJECT)So I build a treetable on my page and the first (root) level looks fine. I can disclose a row and see the second level.
    But when I try to disclose any second level row I get java.lang.IllegalStateException: ADFv: not inside a container.
    Funny is that I can do "right click - disclose all" on any row, and I will see an entire tree without any errors.
    Seems, this messae should signal that there is no PK defined in the View Object, but here is prmary key definition:  <AttrArray Name="KeyAttributes">
        <Item Value="IdComponentKey"/>
        <Item Value="IdProjectKey"/>
      </AttrArray>Tricky is that the tree must show some records where primary keys are null. But still "disclose all" button works fine.
    I also tried a key like:  <AttrArray Name="KeyAttributes">
        <Item Value="IdComponentKey"/>
        <Item Value="IdProjectKey"/>
        <Item Value="IdComponent"/>
        <Item Value="IdProject"/>
      </AttrArray>But that only shows me a root level, no child records.
    Any help wpuld be appreciated.
    Thanks.
    ADF 11.1.2.1
    Found kinda workaround adding NVL to keys:
    SELECT nvl(ProjectIndicators.ID_COMPONENT, 0) AS ID_COMPONENT_KEY,
           nvl(ProjectIndicators.ID_PROJECT, 0) AS ID_PROJECT_KEY, And yet it works... but that seem to deliver me some DML troubles.
    Edited by: ILya Cyclone on Apr 25, 2012 4:54 PM

    Hello,
    I'm building an ADF tree with a recursive entity based query:SELECT ProjectIndicators.ID_COMPONENT AS ID_COMPONENT_KEY,
           ProjectIndicators.ID_PROJECT AS ID_PROJECT_KEY,
           ProjectIndicators.THE_VALUE,
           , res.ID_COMPONENT
           , res.ID_PROJECT
           , res.ID_MAIN_COMPONENT
    from PROJECT_INDICATORS_BA ProjectIndicators
    SELECT Project.Id_Project
           , Component.Id_Component
           , Component.Id_MAIN_COMPONENT
    FROM ...
    WHERE ... and Project.Id_Project = :Bind_IdProject
    ) res
    WHERE ProjectIndicators.Id_Project (+) = res.ID_PROJECT
          AND ProjectIndicators.Id_Component (+) = res.ID_COMPONENTNote there's a *:Bind_IdProject* peremeter inside a subquery.
    Queried data is:ID_COMPONENT_KEY     ID_PROJECT_KEY     THE_VALUE     ID_COMPONENT     ID_PROJECT     ID_MAIN_COMPONENT
                                                   1064             1003     
                                                   1065             1003             1064
                                                   1353             1003             1066
    1646                     1003                             1646             1003             1065
                                                   1586             1003             1066
                                                   1587             1003             1066
    1605                       1003              11             1605              1003             1065
    1625                       1003                          1625             1003             1065
                                                   1845             1003             1065
                                                   1846             1003             1845 ID_COMPONENT_KEY and ID_PROJECT_KEY are primary keys of PROJECT_INDICATORS_BA. THE_VALUE is a filed I need to edit (in case a row is null, a new row would be created on runtime).
    ID_COMPONENT and ID_MAIN_COMPONENT is a recursive relationship. ID_PROJECT is a foreign key.
    The recursive view link is
    Source            Destination
    IdComponent   IdMainComponent
    IdProject         IdProject
    Query
    (:Bind_IdComponent = ID_MAIN_COMPONENT) AND (:Bind_IdProject = ID_PROJECT)So I build a treetable on my page and the first (root) level looks fine. I can disclose a row and see the second level.
    But when I try to disclose any second level row I get java.lang.IllegalStateException: ADFv: not inside a container.
    Funny is that I can do "right click - disclose all" on any row, and I will see an entire tree without any errors.
    Seems, this messae should signal that there is no PK defined in the View Object, but here is prmary key definition:  <AttrArray Name="KeyAttributes">
        <Item Value="IdComponentKey"/>
        <Item Value="IdProjectKey"/>
      </AttrArray>Tricky is that the tree must show some records where primary keys are null. But still "disclose all" button works fine.
    I also tried a key like:  <AttrArray Name="KeyAttributes">
        <Item Value="IdComponentKey"/>
        <Item Value="IdProjectKey"/>
        <Item Value="IdComponent"/>
        <Item Value="IdProject"/>
      </AttrArray>But that only shows me a root level, no child records.
    Any help wpuld be appreciated.
    Thanks.
    ADF 11.1.2.1
    Found kinda workaround adding NVL to keys:
    SELECT nvl(ProjectIndicators.ID_COMPONENT, 0) AS ID_COMPONENT_KEY,
           nvl(ProjectIndicators.ID_PROJECT, 0) AS ID_PROJECT_KEY, And yet it works... but that seem to deliver me some DML troubles.
    Edited by: ILya Cyclone on Apr 25, 2012 4:54 PM

  • Class with composite Key,  attribute and relation

    Hello
    I am implementing the jpa part of my project however I have a quite common relation to set up between 2 tables and I think I am in the wrong way
    I have 3 entities : question - answer and project
    The code below should allow you to understand easierly :
    ----- project
    public class Project implements Serializable{
         private static final long serialVersionUID = 6478117913922953539L;
         @Id @GeneratedValue(strategy=GenerationType.IDENTITY)
         private Long ProjId;
         @Column(nullable = false)
         private String Name;
         @OneToMany(mappedBy="project",targetEntity=AnswerPK.class)
         private List<Answer> Answers;
    ------- question
    public class Question implements Serializable{
         private static final long serialVersionUID = -1231353969246302525L;
         @Id @GeneratedValue
         private Long QuestId;
         @Column(nullable = false)
         private String Label;
         @Column(nullable = false)
         private String Type;
    -------- Answer
    public class Answer implements Serializable{
         private static final long serialVersionUID = -690621748466361598L;
         @EmbeddedId
         private AnswerPK key;
         private String result;
    ----------- AnswerPK
    public class AnswerPK implements Serializable { 
         private static final long serialVersionUID = 9172011321649468776L;
         @ManyToOne(optional=false)
         @JoinColumn(name = "ProjId",nullable = false)
         private Project project;
         @OneToOne(optional=false)
         @JoinColumn(name = "QuestId",nullable = false)
         private Question question;
    however I got this error
    Caused by: org.hibernate.AnnotationException: Use of @OneToMany or @ManyToMany targeting an unmapped class: com.unmod.Domain.Project.Answers[com.unmod.Domain.AnswerPK]
    so I start thinking that's not the way to do that

    Numerous other things started going odd so I cleared out and re-installed jdev.
    The entities are generated correctly now.
    blew 4 hours on it though

  • View Objects with Union Queries--trouble with primary keys

    Hi,
    I'm working with JDev 11.1.1.3 and am trying to do a couple of things (without success--yet). I am trying to create a master-detail relationship that displays the existing data in a set of 3 tables and later I will be creating forms for inserting and updating.
    The table structure is like this:
    Table: Member
    Field: MemberIdx (PK)
    Field: Data
    Table: CfgPartner
    Field: MemberIdx (PK)
    Field: DocType (PK)
    Field: DocRevision (PK)
    Field: OtherData
    Table: CfgB2BPartner
    Field: MemberIdx (PK)
    Field: DocType (PK)
    Field: DocRevision (PK)
    Field: B2BData
    I have a View Object for the master table (Member). And I have created a 2nd View Object that is a union of the other two tables. There is some data in CfgPartner that doesn't have a matching record in CfgB2BPartner and vice versa. My thinking is that the two tables are related and I would like them to display within the same table on the ADF page.
    My 2nd View Object has this query:
    SELECT CfgPartner.MEMBERIDX,
    CfgPartner.DOCTYPE,
    CfgPartner.DOCREVISION,
    CfgPartner.OTHERDATA,
    CfgB2bpartner.B2BDATA
    FROM CFG_PARTNER CfgPartner, CFG_B2BPARTNER CfgB2bpartner
    WHERE CfgPartner.MEMBERIDX=CfgB2bpartner.MEMBERIDX(+)
    and CfgPartner.DOCTYPE=CfgB2bpartner.DOCTYPE(+)
    and CfgPartner.DOCREVISION=CfgB2bpartner.DOCREVISION(+)
    UNION
    SELECT CfgB2bpartner.MEMBERIDX AS MEMBERIDX1,
    CfgB2bpartner.DOCTYPE AS DOCTYPE1,
    CfgB2bpartner.DOCREVISION AS DOCREVISION1,
    CfgPartner.OTHERDATA,
    CfgB2bpartner.B2BDATA
    FROM CFG_PARTNER CfgPartner, CFG_B2BPARTNER CfgB2bpartner
    WHERE CfgB2bpartner.MEMBERIDX=CfgPartner.MEMBERIDX(+)
    and CfgB2bpartner.DOCTYPE=CfgPartner.DOCTYPE(+)
    and CfgB2bpartner.DOCREVISION=CfgPartner.DOCREVISION(+)
    ORDER BY MEMBERIDX,DOCTYPE,DOCREVISION
    The query is valid and runs fine in the database. However, the error I'm getting in the app module makes it sound like I don't have my primary keys set up correctly. Here is the error: (oracle.jbo.PersistenceException) JBO-26028: View object testCfgPtnrCfgB2BPtnr does not include a primary key attribute Memberidx of entity base CfgB2bpartner.
    In the View Object it shows the attributes Memberidx, Doctype, Docrevision, Memberidx1, Doctype1, and Docrevision1 all as key attributes. The only strange thing I see is the Entity Usage for Memberidx1, Doctype1, and Docrevision1 are all empty and the info column says "Transient".
    Any help would be appreciated.
    -Steve

    Hi,
    I think that to achieve this you need to suround it with another "select from" statement and create alias for the columns
    I created a test with the departments table (assuming that they are two different tables with different attributes) just to see that it works.
    SELECT DEPID1,DEPID2,DEPNAME1,DEPNAME2
    FROM(
    SELECT Departments1.DEPARTMENT_ID AS DEPID1,
               NULL as DEPID2,
           Departments1.DEPARTMENT_NAME AS DEPNAME1,
              NULL as DEPNAME2
    FROM DEPARTMENTS Departments1
    UNION
    SELECT Departments2.DEPARTMENT_ID AS DEPID2,
              NULL as DEPID1,
           Departments2.DEPARTMENT_NAME AS DEPNAME2,
             NULL as DEPNAME1
    FROM DEPARTMENTS Departments2)The resulting VO will have 4 attributes and you can set the primary key to be (DEPID1,DEPID2)
    If your 2 tables have common columns then these columns can have the same alias
    If you have any problems let me know :)
    Gabriel.

  • ORA-01445: cannot select ROWID from, or sample, a join view without a key-p

    Hi All,
    I am facing issue with one sql query. It is giving me error:
    ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table
    I am not getting any clue to solve this. On internet, i didn't find proper reason for this error and troubleshooting way and solution for this error. Everywhere i saw one sentence, "Key preserved means the row from the base table will appear AT MOST ONCE in the output view on that table" but it didn't solve my problem.
    I have 1099 columns in one select query. so avoiding the actual column list in select clause. Instead I am trying to select ROWIDs from all tables in join. My understanding is ROWID is a unique identifier in table not in database. But though I remove ROWIDs, I get same error. So please don't bother about these ROWIDs.
    SELECT
    TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD')
    ,FACT.ROWID AS ABC1
    ,FACT_ADJ.ROWID AS ABC2
    ,DIM_SEC.ROWID AS ABC3
    ,DIM_SEC_ADJ.ROWID AS ABC4
    ,DIS_CAT.ROWID AS ABC5
    ,CTRY.ROWID AS ABC6
    ,BCP.ROWID AS ABC7
    ,STAGE.ROWID AS ABC8
    FROM FACT_POSITION FACT
    LEFT JOIN FACT_POSITION_ADJ FACT_ADJ ON FACT.POSITION_PKID = FACT_ADJ.POSITION_FKID
    LEFT JOIN DIM_SOURCE_SYSTEM SOURCE ON FACT.SOURCE_SYSTEM_FKID = SOURCE.SOURCE_SYSTEM_PKID
    LEFT JOIN DIM_SECURITY DIM_SEC ON FACT.SUBSYS_SECURITY_FKID = DIM_SEC.SECURITY_PKID
    LEFT JOIN DIM_SECURITY_ADJ DIM_SEC_ADJ ON FACT.SUBSYS_SECURITY_FKID = DIM_SEC_ADJ.SECURITY_PKID
    LEFT JOIN DIM_DISCLOSURE_CATEGORY DIS_CAT ON FACT.DISCLOSURE_CATEGORY_FKID = DIS_CAT.DISCLOSURE_CATEGORY_PKID
    LEFT JOIN COUNTRY_REFERENCE CTRY ON CTRY.DESCRIPTION = DIM_SEC.ISSUER_COUNTRY
    LEFT JOIN BUSINESS_CLOSE_PERIOD BCP
    ON BCP.BUSINESS_CLOSE_DATE = ADD_MONTHS(TRUNC(TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD'),'MM'), 1) -1
    AND BCP.IS_LOCKED='Y' AND BCP.IS_ACTIVE='Y'
    LEFT JOIN GUI_STAGING STAGE ON
    FACT.POSITION_PKID=STAGE.POSITION_PKID
    AND STAGE.IS_ACTIVE='Y'
    AND STAGE.STATUS_ID IN(12,8,1,2,3,4,5)
    WHERE FACT.POSITION_PKID=64524374;
    While trying to sort this error, I found interesting things that made me more confused.
    if I remove TO_DATE function from select clause, same join query works.
    If I remove any table from join and keep TO_DATE function in select clause, query works.
    That tells, there is no problem in query.
    Then please anyone help me to sort out the error. FYI. I have googled a lot for this error. but didn't get solution/clue. That is why I am posting this problem to forum.
    Thanks in advance. waiting for reply ASAP.
    Pravin Pujari
    [email protected]

    I think i got the solution. The syntax i was using (ANSI syntax) doesn't work in the oracle database version i am using.
    When i updated my query with older oracle syntax, it worked.
    SELECT
    TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD')
    ,FACT.ROWID AS ABC1
    ,FACT_ADJ.ROWID AS ABC2
    ,SOURCE.ROWID AS ABC3
    ,DIM_SEC.ROWID AS ABC4
    ,DIM_SEC_ADJ.ROWID AS ABC5
    ,DIS_CAT.ROWID AS ABC6
    ,CTRY.ROWID AS ABC7
    ,BCP.ROWID AS ABC8
    ,STAGE.ROWID AS ABC8
    FROM [email protected] FACT
    ,[email protected] FACT_ADJ
    ,[email protected] SOURCE
    ,[email protected] DIM_SEC
    , [email protected] DIM_SEC_ADJ
    , [email protected] DIS_CAT
    , GUI.COUNTRY_REFERENCE CTRY
    , GUI.BUSINESS_CLOSE_PERIOD BCP
    , GUI.GUI_STAGING STAGE
    WHERE FACT.POSITION_PKID=64517140
    AND FACT_ADJ.POSITION_FKID(+) = FACT.POSITION_PKID
    AND SOURCE.SOURCE_SYSTEM_PKID=FACT.SOURCE_SYSTEM_FKID
    AND DIM_SEC.SECURITY_PKID=FACT.SUBSYS_SECURITY_FKID
    AND DIM_SEC_ADJ.SECURITY_PKID(+)=DIM_SEC.SECURITY_PKID
    AND FACT.DISCLOSURE_CATEGORY_FKID = DIS_CAT.DISCLOSURE_CATEGORY_PKID
    AND CTRY.DESCRIPTION = DIM_SEC.ISSUER_COUNTRY
    AND BCP.BUSINESS_CLOSE_DATE = ADD_MONTHS(TRUNC(TO_DATE(FACT.BUS_DATE_FKID,'YYYYMMDD'),'MM'), 1) -1
    AND BCP.IS_ACTIVE='Y'
    AND FACT.POSITION_PKID=STAGE.POSITION_PKID
    AND STAGE.IS_ACTIVE='Y'
    AND STAGE.STATUS_ID IN(12,8,1,2,3,4,5);

  • Cannot select ROWID from, or sample, a join view without a key-preserve

    I'm getting an error "cannot select ROWID from, or sample, a join view without a key-preserved table" when performing an INSERT. There is no error when performing an UPDATE.
    I created a "Form with Reports" page, where the Reports is based on a view multi table join. The primary key I chose during the form creation process is "From Trigger". The primary key "ACCESS_ID" has been defined in the base table. On the view, I have created an INSTEAD OF TRIGGER, for both Insert and Update. The update seems to work. I am using the automatic row processing for the update and insert.
    Additional information: My insert works standalone i.e. i write
    insert into jxjplntr_access_v (col1, ...)
    values (va1, val2...)
    and it works when i run it on SQL window.
    access_id has a constraint defined as not null and also PK.
    I have an insert "instead of" trigger defined on the jxjplntr_access_v view.
    However, when i "CREATE" a record after filling in the values, I get the above error. BTW, here is the view definition:
    CREATE OR REPLACE VIEW jxjplntr_access_v (
    access_id,
    person_id,
    person_name,
    badge_number,
    ntr_resp_type,
    primary_flag,
    start_date_active,
    end_date_active,
    created_by,
    created_by_uname,
    creation_date,
    last_updated_by,
    last_updated_by_uname,
    last_update_date,
    last_update_login )
    AS
    select
    access_id,
    ja.person_id,
    initcap(p.last_name||', '||p.first_name) person_name,
    p.employee_number badge_number,
    ntr_resp_type,
    primary_flag,
    ja.start_date_active,
    ja.end_date_active,
    ja.created_by,
    f1.user_name created_by_uname,
    ja.creation_date,
    ja.last_updated_by,
    f2.user_name last_updated_by_uname,
    ja.last_update_date,
    ja.last_update_login
    from jplntr.jplntr_access ja
    ,fnd_user f1
    ,fnd_user f2
    ,per_people_x p
    where f1.user_id(+) = ja.created_by
    and f2.user_id(+) = ja.last_updated_by
    and p.person_id(+) = ja.person_id
    Thanks in advance.
    K
    Edited by: kktong on Dec 12, 2011 5:39 PM
    Edited by: kktong on Dec 13, 2011 10:06 AM

    I've just been looking at exactly the same problem. From my initial investigations, this seems to be a bug with Apex and creating a tabular form, as described in this thread here:
    v4.0 - Tabular form ORA-01445: cannot select ROWID from, or sample,
    Very frustrating!
    I hope thats of use to you. If I find out anything else, I'll come back and let you know.
    Simon
    Edited by: Simon Holt on 26-Jul-2012 03:32

  • " ORA-01445: cannot select ROWID from, or sample, a join view without a key

    GREETINGS !
    CREATED TABULAR FORM WITH QUERY
    WHILE EXECUTE ON SQL COMMANDS ITS EXECUTES AND SHOWS RECORDS, PASTE SAME QUERY ON TABULAR FORM SOURCE . WHEN RUN PAGE IT GIVES ERROR
    " ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table".
    Edited by: Omzz on Oct 3, 2012 10:34 PM

    When setting the tabular form, only use the table that you are trying to update/modify.
    After that is working, modify the SQL source with the other tables.
    By just pasting an SQL query into the region source, it doesnt know what tables you are trying to update
    PS - Please turn off "Caps Lock" :-)

Maybe you are looking for

  • Why is my iCloud storage full when I bought a 32GB iPad mini?

    When my mum bought me my iPad mini at Christmas (7 months ago), she bought me a 32GB and recently I have had notifications saying that my iCloud storage is full. I have deleted many apps and many photos, also when I try to delete the data of certain

  • Adobe photoshop CC stopped working !

    Hi I have problem with crash that happend everytime i want use adobe photoshop cc 14.0.0.0 (64bit). Error : adobe photoshop cc stopped working log error : Faulting application name: Photoshop.exe, version: 14.0.0.0, time stamp: 0x5176451b Faulting mo

  • Add iTunes Library to Second Computer

    I'm sure this is a very simple thing to do, but have heard horror stories about people losing their entire library, so want to be safe. I have iTunes loaded on my PC and the library is also on my iPod. My wife just got a new PC. I want to add iTunes

  • nbsp html tag in xml

    Hi I am using xsl file that takes a xml file as input and outputs another xml file. I need to read content from my input xml file which has the following code: Input Xml file content: *<body>text1</nbsp>text2</nbsp>text3</body>* My output xml file in

  • JNDI Error  when calling ejb

    I've create a ear file include a war and jar when I call the servlet that call a ejb the following error prompt out: javax.naming.NameNotFoundException: Unable to resolve gendocnum. Resolved: '' Unresolved:'gendocnum' ; remaining name '' <<no stack t