BC4J FindByKey problem

I have a uiXML page where the user is entering data into a form, based on a entity object. A new row is created and the row key is set as a paeg property. In my java class (called from an event handler) I am trying to locate the newly created (and committed) row based on that key. The error I am receiving is :
oracle.jbo.DMLException: JBO-26080: Error while selecting entity for Screening
java.sql.SQLException: ORA-01410: invalid ROWID
The handler on my uiXML page looks like this
<event name="apply" >
<bc4j:chaining>
<bc4j:findRootAppModule name="ScreeningView1AppModule" >
    <bc4j:findViewObject name="ScreeningView1" >
        <bc4j:findRow name="CreateScreeningView1"  >
          <bc4j:setPageProperty name="key" >
            <bc4j:stringKey/>
          </bc4j:setPageProperty>
          <bc4j:setPageProperty name="screeningSite">
            <bc4j:parameter name="Site"/>
          </bc4j:setPageProperty>
          <bc4j:setAttribute name="Site"/>
          <bc4j:setAttribute name="Dob"/>
          <bc4j:setAttribute name="SjPositive"/>
          <bc4j:setAttribute name="SjSurvey"/>
          <bc4j:setAttribute name="Sj3Criteria"/>       
          <bc4j:setAttribute name="ConsentForm"/>       
          <bc4j:setAttribute name="ExcludedDiseases"/>               
          <bc4j:setAttribute name="ExcludedDisorders"/>               
          <bc4j:setAttribute name="SerumCreatinine"/>                       
          <bc4j:setAttribute name="HadCancer"/>                       
          <bc4j:setAttribute name="BirthControlOk"/>                       
          <bc4j:setAttribute name="OtherTrials"/>                       
          <bc4j:insertRow/>
          <bc4j:commit/>   
        </bc4j:findRow>
    </bc4j:findViewObject>
  </bc4j:findRootAppModule>
  <method class="jivrDemoPackage.Screening" method="createTxn"/>
  </bc4j:chaining>
</event>and my java code in Screening.createTxn is
    ViewObject vo = ServletBindingUtils.getViewObject(context); 
    String pageKey = page.getProperty("key");
    Msg.println("Key page property " + pageKey);
    Key key = new Key(pageKey, vo.getAttributeDefs());  
    Row[] viewRows = vo.findByKey(key,1);
    Row viewRow = viewRows[0];The value printed out for pageKey looks like this "0001000000063837353830380000000A000000F6D14CE6B9
" but straight after this, the error message given at the top of this posting is displayed. Any idea what I'm doing wrong ?
Thanks,
Brent

I have also tried using "usesCurrency=true" in the bc4j registry def and then using ViewObject.getCurrentRow() in my Java and was not working. I realised then that my method call was outisde the view object scope so once I moved it back in (just before the </bc4j:findViewObject> tag) it worked !. However I could still not get the findByKey to work - the same error message was displayed ??
Thanks
Brent

Similar Messages

  • BC4J.XCFG problem

    Who can help?
    When running a BC4J application the following error happens running on 9ias application server from a deployed ear-file, (Do I run on my local OC4J then things go allright):
    Er is een fout opgetreden JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-33001: Cannot find the configuration file pilot\common\bc4j.xcfg in the classpath "
    Do I look in the WEB_INF\classes directory then there is a pilot\common\bc4j.xcfg file in that directory.
    It happens when instantiating the application-module form BC4J in the foolwing code-snippet
    String applicationModule = "pilot.PilotModule"; // Full name of application module
    String configuration = "PilotModuleLocal"; // Name of configuration
    PilotModuleImpl am = (PilotModuleImpl)
    Configuration.createRootApplicationModule(applicationModule,configuration);
    Ik heb Business-components gedecompileerd om te kijken waar de fout optreedt:
    en dit gebeurt in de method loadFromClassPath(String s) in de configuration class
    nadat hij buildConfigurationFileNameFromClassPath de string " pilot\common\bc4j.xcfg "
    heeft opgebouwd. Hij kan de stream dus niet inlezen.
    public void loadFromClassPath(String s)
    throws JboException
    String s1 = "/" + s;
    s1 = s1.replace(File.separatorChar, '/');
    InputStream inputstream = JBOClass.getResourceAsStream(s1);
    if(inputstream == null)
    inputstream = JBOClass.getResourceAsStream(s1.substring(1));
    if(inputstream == null)
    throw new JboException(Class.forName("oracle.jbo.common.CommonMessageBundle"), "33001", new Object[] {
    s1
    try
    loadFromStream(inputstream);
    inputstream.close();
    inputstream = null;
    catch(Exception exception)
    JboException jboexception = new JboException(Class.forName("oracle.jbo.common.CommonMessageBundle"), "33001", new Object[] {
    s
    jboexception.addToDetails(exception);
    throw jboexception;

    Hi. Sorry, no solution but am trying to work towards one! I am encountering a similar problem. All I am doing is running a simple BC4J JSP Browse Form. I am doing this locally using JDeveloper 9.0.2.822, WinXP Pro SP1.
    The error I am getting is:
    "Error Message: JBO-33001: Cannot find the configuration file /MyApp/common/bc4j.xcfg in the classpath".
    I had 2 projects, with the Business Components Project separate to the BC4J JSP project, but have since included both in one project and the error is still the same. I have obviously included the correct path to the bc4j.xcfg file in both the WinXP classpath and the classpath in JDeveloper found under the relevant "Project Settings".
    I have tried the tricks mentioned in other posting such as combing the bc4j.xcfg file for any errors in the xml but it seems well formed.
    Any ideas?
    cheers
    D

  • JUTreeBinding - navigation by findByKey() problem

    It will not be easy to provide a test case, so I hope that the following questions will clear things up for me.
    We have two trees. Both trees have the same structure. Both trees should act as navigation tool.
    This is done by using a TreeSelectionListener which somewhat looks like the JUTreeDefaultMouseListener, except:
    It uses findByKey() and setCurrentRow() on the target RowSet so this RowSetIterator's currency is set and so that the ViewLink "chain" is activated.
    Two problems:
    - findByKey() does not return a row.
    - both trees are not completely separated.
    I did some research on the JUTreeBinding and in my test project, both problems didn't show up, so I am puzzled.
    So my questions are:
    1.)
    Both VOs (the VO the tree node is bound to and the target VO) are two instances of the same VO type.
    In the Javadocs, I read "We now use the key build a where-clause for an internal View Object. That where-clause is applied and qualifying rows are retrieved from it to find the requested number of rows." So it should always come up with at least one row, since both VOs are of the same type, right? Is there another thing that could keep findByKey() from finding a row? How does this where-clause look like?
    2.)
    If I have two trees with the same structure, then JClient creates an internal VO for every node type except the top-level VO. The problem seems to be: When I have two trees then there are two RowSets for each node type, but they are contained within the very same VO. One RowSet for tree A, one for tree B. So, under certain circumstances, if the user clicks a node in tree A (which then turns out to be a leaf) then the parent node of the corresponding node in tree B collapses (and vice versa). Initially both parent nodes collapsed, but I put in the workaround for the bug in JUTreeNodeBinding.updateValuesFromRows() Shailesh mentioned in an earlier posting. Now only the other tree collapses.
    It seems to me, that the event (one tree node turning out to be a leaf) is - in that case unnecessarily - forwarded to all RowSets within the VO. So when the user clicks a node in one tree, updateValuesFromRows() is executed in both trees. How can I turn this off?
    If this won't help, then I will try to come up with a test case.
    One other thing: While I read the source of JUTreeDefaultMouseListener, I found the method setRulesActions(). According to the Javadocs, one can pass a String[][]. According to the sources the method looks like this:
      public void setRulesActions(String [][] rulesactions)
         hm.clear();
      }Strange, isn't it. Can't figure out how this is supposed to work.
    Regards and thanks in advance,
    Sascha Herrmann

    The two trees closing out at random is due to 'different' binding-iterator instances used internally for the node-accessors. We'd be investigating this further!
    We would update this post once we have a workaround/bug.

  • BC4J Bind Problem

    Hello,
    I am working with BC4J view objects
    I created the view object using the query with the bind variables
    select deptno from emp where salary = :1 and empno>= :2 and someothercolumn = :1
    I set the bind variables like
    viewObject.setWhereClauseParam(0, 10000);
    viewObject.setWhereClauseParam(1, 10);
    viewObject.executeQuery();
    The view executed with out the problem and gave the result.
    Now if I create the view with the query
    select deptno from emp where salary = :1 and someothercolumn = :1 and empno>= :2
    ( The replaced the columns )
    I set the bind variables like
    viewObject.setWhereClauseParam(0, 10000);
    viewObject.setWhereClauseParam(1, 10);
    viewObject.executeQuery();
    When i execute the query, it throws an expection
    "java.sql.SQLException: ORA-01008: not all variables bound"
    Please let me know what should be done to correct the problem
    Thanks in Advance
    Senthil

    You're hitting an Oracle JDBC Driver bug regarding repeating the same bind variable name in the SQL statement.
    As a workaround, instead of:
    select deptno from emp where salary = :1 and someothercolumn = :1 and empno>= :2 do this instead:
    select deptno from emp where salary = :1 and someothercolumn = :2 and empno>= :3 and write code like this:
    viewObject.setWhereClauseParam(0, 10000);
    viewObject.setWhereClauseParam(0, 10000);
    viewObject.setWhereClauseParam(1, 10); That is, avoid repeating the same bind variable name in the SQL statement.

  • Master-Detail-Detail JSP/BC4J Sync Problem

    Hi everybody,
    im having a strange problem with my MDD schema in my custom BC4J/jsp page,
    I went through all other topics in the forum but couldnt find any analogue to my specific problem,
    Lets call schema as M->D1->D2
    What I need to do is to navigate my cursor on D1 using a rowkey, the problem is when i use <jbo:ROW ... action="find"> using the rowkey sent by DataEditComponent, it seeks the first row in my data source(in sync with Master) instead of seeking the actual row.
    FYI, the problem disappears when I omit the master ViewObject (normal master detail using D1->D2)
    Any comments appreciated (ofcourse ASAP ;))
    Here is the original code:
    <%@ page language="java" errorPage="errorpage.jsp" contentType="text/html;charset=utf-8" import = "oracle.jbo.html.*, oracle.jbo.JboException"%>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule id="SalesModule" definition="SalesWeb.SalesModule" releasemode="Stateful" />
    <jbo:DataSource id="dsContact" appid="SalesModule" viewobject="SContactView1" rangesize="10" itermode="LastPagePartial"/>
    <jbo:DataSource id="dsOrder" appid="SalesModule" viewobject="SOrderView2" rangesize="10" itermode="LastPagePartial" />
    <jbo:DataSource id="dsItemList" appid="SalesModule" viewobject="SOrderItemView3" rangesize="10" itermode="LastPagePartial"/>
    <%
    RequestParameters params = HtmlServices.getRequestParameters(pageContext);
    boolean doRedirect=false;
    String PageID=this.getClass().getName();
    String sessJboRowkey=(String)session.getAttribute(PageID+"_jboRowKey");
    String paramJboRowkey=(String)params.getParameter("jboRowKey");
    if(sessJboRowkey!=null && paramJboRowkey==null && (params.getParameter("jboEvent")==null || params.getParameter("jboEvent").toString().compareToIgnoreCase("create")!=0))
    paramJboRowkey=sessJboRowkey;
    else
    if(paramJboRowkey!=null)
    session.setAttribute(PageID+"_jboRowKey",paramJboRowkey);
    String masterRowKey=params.getParameter("masterRowKey");
    if(masterRowKey!=null)
    %>
    <jbo:Row id="currRow" datasource="dsContact" action="find" rowkey="<%=masterRowKey%>" ></jbo:Row>
    <%
    %>
    <jbo:OnEvent name="update" datasource="dsOrder" >
    <jbo:Row id="myrow" datasource="dsOrder" rowkey="<%=paramJboRowkey%>" action="Update" />
    <jbo:Commit appid="SalesModule" />
    </jbo:OnEvent>
    <jbo:OnEvent name="create">
    <% if(paramJboRowkey!=null)
    %>
    <jbo:Row id="newrow" datasource="dsOrder" action="createinrange" ><%
    try
    { %>
    <jbo:SetAttribute dataitem="*" /><%
    } catch (JboException ex)
    newrow.remove();
    throw ex;
    } %>
    </jbo:Row>
    <jbo:Commit appid="SalesModule" />
    <%
    } //end if %>
    </jbo:OnEvent>
    <jbo:OnEvent name="delete">
    <jbo:Row id="delrow" datasource="dsOrder" rowkey="<%=paramJboRowkey%>" action="Delete" />
    <jbo:Commit appid="SalesModule" />
    <%
    doRedirect=true;
    %>
    </jbo:OnEvent>
    <%
    if(doRedirect)
    %>
    <jbo:ReleasePageResources />
    <%
    response.sendRedirect((String)params.getParameter("originURL"));
    %>
    <html>
    <head>
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <LINK REL=STYLESHEET TYPE="text/css" HREF="bc4j.css">
    <TITLE>Edit Order</TITLE>
    </head>
    <body>
    <% if(paramJboRowkey==null)
    %>
    <h3>Edit Order</h3>
    <jbo:DataEdit datasource="dsOrder" enctype="application/x-www-form-urlencoded" targetURL="SOrderView2_Edit.jsp"/>
    Cancel
    <%
    else
    %>
    <h3>Order Details</h3>
    <jbo:Row id="rowCur" datasource="dsOrder" rowkey="<%=paramJboRowkey%>" action="active">
    <table class="clsViewCurrentRecord" cellspacing="2" cellpadding="3" border="0">
    <jbo:AttributeIterate id="def" datasource="dsOrder">
    <tr class="clsTableRow">
    <td title="<jbo:ShowHint hintname='TOOLTIP'></jbo:ShowHint>"> <jbo:ShowHint hintname="LABEL">##Column</jbo:ShowHint> </td>
    <td title="<jbo:ShowHint hintname='TOOLTIP'></jbo:ShowHint>"> <jbo:RenderValue datasource="dsOrder">##Cell</jbo:RenderValue> </td>
    </tr>
    </jbo:AttributeIterate>
    </table>
    </jbo:Row>
    <%
    %>
    <br>
    <% if(paramJboRowkey!=null)
    %>
    <center>
    <h3>Order Items</h3>
    <table border="0">
    <tr>
    <td ALIGN="right"><jbo:DataScroller datasource="dsItemList" /></td>
    </tr>
    <tr>
    <td><jbo:DataTable datasource="dsItemList" edittarget="SOrderItemView3_Edit.jsp" /></td>
    </tr>
    </table>
    </center>
    <%
    %>
    <jbo:ReleasePageResources />
    </body>
    </html>

    Hi,
    you can use the column- or alias-name of the first query like:
    <dataQuery>
    <sqlStatement name="Q_MASTER">
    <![CDATA[
    select field1,field2 from master_table
    where field3 = 'ABC'
    ]]>
    </sqlStatement>
    <sqlStatement name="Q_DETAIL">
    <![CDATA[
    select field4,field5 from detail_table
    where field6 = :field2 (where field2 is a column of Q_Master)
    ]]>
    </sqlStatement>
    Pay attention that the column-names (aliases) are distinct
    regards
    Rainer

  • Deployment of uiXML/BC4J app problems

    I am having difficulty in deploying an uiXML/BC4J application to a standalone OC4J server. I installed the BC4J libaries (used automatic script from jdev) and right clicked on the deploy file in my project and selected the standalone instance. I can then navigate to the front uix page but when I select one of the view pages (ie when has to query the database) I am returned with this error:
    java.lang.NoClassDefFoundError: oracle/jbo/uicli/mom/JUMetaObjectManager
    at oracle.jbo.http.HttpContainer.findSessionCookie(HttpContainer.java:541)
    at oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.getSessionCookie(Unknown Source)
    at oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(Unknown Source)
    at oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useRootAppModule(Unknown Source)
    at oracle.cabo.data.jbo.servlet.RootAppModuleRegistryImpl.useAll(Unknown Source)
    at oracle.cabo.data.jbo.xml.parse.JboParserExtensionImpl$JboPageDescription.renderStarted(Unknown Source)
    at oracle.cabo.servlet.ui.UINodePageRenderer.renderPage(Unknown Source)
    at oracle.cabo.servlet.AbstractPageBroker.renderPage(Unknown Source)
    at oracle.cabo.servlet.PageBrokerHandler.handleRequest(Unknown Source)
    at oracle.cabo.servlet.UIXServlet.doGet(Unknown Source)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:721)
    at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
    at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
    at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
    at com.evermind[Oracle9iAS (9.0.3.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
    at java.lang.Thread.run(Unknown Source)
    What does this mean ?? Are the BC4J libraries not installed correctly ?? Is it some connection to the database issue ?
    Thanks,
    Brent

    This post had the answer
    Re: BC4J Application deployed to OC4J
    Adding "<library path="../../../BC4J/jlib"/>" to the j2ee\home\config\application.xml file

  • Bc4j transaction problem

    In an application I have code that modifies a table.
    In a client I have code that displays the table.
    Periodically I get a Exception java.util.ConcurrentModificationException
    What am I doing wrong?
    If it is ok what should I do to recover??
    In an application that executes periodically I have the following code.
    void doError(ACUMesgMap mm) throws ACUException
    try{
    if ( errorVO == null )
    errorVO = am.findViewObject("ViewErrorsForInst1");
    // errorVO.setWhereClauseParam(0, new Integer((int)instance));
    errorVO.setWhereClauseParam(0,new Integer ((int)instance));
    errorVO.executeQuery();
    while (errorVO.hasNext())
    Row r = errorVO.next();
    r.remove();
    myTrans.commit();
    java.util.Vector v = mm.getErrors();
    Iterator e = v.iterator();
    while (e.hasNext())
    ACUMsgMapEntry me = (ACUMsgMapEntry)e.next();
    ViewErrorsForInstRow r = (ViewErrorsForInstRow)errorVO.createRow();
    r.setAcuinstanceRi(new Integer((int)instance));
    r.setErrorCount(new Integer(me.errorCount));
    String theException = me.e.toString();
    if ( theException.length() > 250 ) theException = theException.substring(0,250);
    r.setException(theException);
    r.setMid(me.msgID);
    r.setState(me.state);
    r.setThreadNumber(new Integer(me.threadNumber));
    long lt = me.time.getTime();
    java.sql.Timestamp t = new java.sql.Timestamp(lt);
    oracle.jbo.domain.Date date = new oracle.jbo.domain.Date(t);
    r.setTheTime(date);
    errorVO.insertRow(r);
    myTrans.commit();
    } catch (Exception e)
    System.out.println(e);
    ACUException ae = new ACUException(e);
    ae.errorCode = 204;
    ae.errorString = "Exception updating errors";
    throw ae;
    In client code I have the following that executes periodically.
    private void jButton1_actionPerformed(ActionEvent e)
    // Refresh Instance
    oracle.jbo.ApplicationModule am = panelBinding.getApplicationModule();
    oracle.jbo.ViewObject vo = am.findViewObject("ViewInstance1");
    vo.executeQuery();

    Sungim, sorry to contact you like this but i really need your help, i have seen that you have a big known about BCJ4 and OC4J...
    And i was searching your e-mail but i did not find it,
    My answer is:
    I got an aplication that runs in a OC4J, that aplication works fine while the session is alive, when a time pass and the session die (I Think), the aplication don let me exit from any way!! and i need to use the magic Ctrl+Alt+Del!!
    some part of my code:
    =================
    FILE ONE (ModuloHorarios):
    public ApplicationModule mApp;
    ApplicationModuleHome amHome = (ApplicationModuleHome)ctx.lookup(amDefName);
    mApp = amHome.create();
    FILE TWO:
    public ApplicationModule mApp;
    mMH = new ModuloHorarios(this,true);
    //guarda la instancia de la aplizacion en mApp
    setApp(mMH.getApp());
    setApp(mMH.getApp());
    The Source Code for the "EXIT" buttom:
    =============================
    if (mApp != null)
    mApp.getTransaction().disconnect();
    mApp.remove();
    Configuration.releaseRootApplicationModule(mApp,true);
    System.exit(0);
    Thanks for any help!!!

  • Bc4j.xcfg

    If anyone can help with this it would be great
    oracle.jbo.JboException: JBO-33001: Cannot find the configuration file /portaluniverse/eres/model/bo/diagrams/common/bc4j.xcfg in the classpath
         at oracle.jbo.client.Configuration.loadFromClassPath(Configuration.java:345)
         at oracle.jbo.common.ampool.PoolMgr.createPool(PoolMgr.java:272)
         at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:473)
         at oracle.jbo.common.ampool.ContextPoolManager.findPool(ContextPoolManager.java:165)
         at oracle.adf.model.bc4j.DataControlFactoryImpl.findOrCreateSessionCookie(DataControlFactoryImpl.java:135)
         at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:220)
         at oracle.adf.model.bc4j.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:97)
         at oracle.jbo.uicli.mom.JUMetaObjectManager.loadCpx(JUMetaObjectManager.java:612)
         at oracle.adf.model.servlet.ADFBindingFilter.initializeBindingContext(ADFBindingFilter.java:328)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:600)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    It seems as if Jdev 10g place this file anyware???

    Sounds like a problem some other people have had. Look at these threads:
    bc4j.xcfg
    BC4J.XCFG problem
    Re: BC4J.XCFG problem

  • Post Children Before Parent

    First, I just want to apologize if this isn't appropriate here. Feel free to lock/delete/move my post elsewhere :)
    I'm having a BC4J related problem in the OA Framework on JDeveloper 9.0.3.5 and Oracle EBS 11.5.10.
    I have two EOs that are linked by composition. My business requirement / process is as follows:
    1. Delete child record.
    2. Do any more child records exist?
    2.a. No, delete parent.
    2.b. Yes, update parent.
    However, I can't seem to get this to work because the parent's changes are always posting before the child's which means I'm getting an ORA-02292: integrity constraint <constraint name> violated - child record found constraint violation.
    What's the correct way to implement this requirement?

    Timo Hahn wrote:
    Check out the following links
    Re: ADF BC - unable to control posting order
    http://jobinesh.blogspot.com/2010/08/customizing-order-of-posting-changes-to.html
    TimoI tried the solution that was mentioned in the forum thread and I'm still getting the same error.
    The OA Framework Developer's Guide says that in a composition association the parent's always post before the children. Does this mean I can't use a composition association?
    I also wanted to add that I tried an association that was a non-composition and I still get the same error.
    Edited by: Centinul on Sep 14, 2011 7:39 AM

  • Problem  with BC4J in 10g: incorrect Date formatting

    I have PL/SQL procedure, which is called from bc4j-struts-application like this:
    CallableStatement cs = getDBTransaction().createCallableStatement(FIND_USER_RESP_STMT,0);
    cs.execute();
    It return an exeption with this message:
    ORA-01403: no data found
    ORA-06512: at "CRN.CRN_UTIL", line 115
    ORA-06512: at "CRN.CRN_UTIL", line 323
    ORA-06512: at "CRN.CRN_RESPONSIBILITY", line 85
    ORA-01843: not a valid month
    ORA-06512: at line 1
    I don't send any data parameter for this procedure. When I try to call it from JDeveloper connections debug, it runs succesfully. I try to create bc4j entity to query:
    select to_char(sysdate, 'DD-MON-YYYY') X,
    to_char(sysdate, 'DD-MM-YYYY') Y from dual
    and it retrieves:
    27-¿¿¿-2004
    27-09-2004
    Date constant is used in PL/SQL procedure with format 'DD-MON_YYYY', but I can't change it, because it used by many other applications.
    My local setting is english, USA, and I have the second language on my PC - russian.
    JDeveloper 9.0.5.2. This code runs succesfully in JDeveloper 9.0.3.3.
    How can I send bc4j date setting in normal format to solve this problem? And where can I find bc4j local settings, which are sended by bc4j to server?
    Regards, Nikolay

    Hello,
    The problem is still available. Could anybody help?
    Regard

  • JboException:JBO-33001 Problem with bc4j.xcfg file

    I am developing a JSP application that will be used to evaluate
    the JDeveloper 3.2 software for users to edit data in an Oracle
    8i database. The database is running on a Sun machine using
    solaris 2.8. The web server is Apache 1.13 and the servlet
    engine is Tomcat 3.2.
    I have read the other postings regarding this problem (Error:
    oracle.jbo.JboException: JBO-33001: Cannot find the
    configuration file /DataDummy/common/bc4j.xcfg in the classpath)
    and their does not appear to be a good description on how
    to correct this error.
    I have the path and file listed in my tomcat.sh file:
    (bc4j.xcfg at end of list)
    CLASSPATH=${CLASSPATH}:/project2/tomcat/lib/jdev3_2/xmlparserv2.j
    ar:/project2/tomcat/lib/jdev3_2/jdev-
    rt.zip:/project2/tomcat/lib/jdev3_2/jbojdbcpatch.zip
    :/project2/tomcat/lib/jdev3_2/connectionmanager.zip:/project2/tom
    cat/lib/jdev3_2/jbohtml.zip:/project2/tomcat/lib/jdev3_2/jboimdom
    ains.zip:/project2/tomcat/
    lib/jdev3_2/ordim817.zip:/project2/tomcat/lib/jdev3_2/ordvir817.z
    ip:/project2/tomcat/lib/jdev3_2/ordhttp.zip:/project2/tomcat/lib/
    jdev3_2/jbomt.zip:/project
    2/tomcat/lib/jdev3_2/jbodomorcl.zip:/project2/tomcat/lib/jdev3_2/
    jboremote.zip:/project2/tomcat/lib/jdev3_2/jndi.jar:/project2/tom
    cat/lib/jdev3_2/jbodatum12
    .zip:/project2/tomcat/lib/jdev3_2/classes12.zip:/project2/tomcat/
    lib/jdev3_2/DataJSP_DataDummy_DataDummy_Module.properties:/projec
    t2/tomcat/lib/jdev3_2/bc4j
    .xcfg
    Should the bc4j.xcfg be liste in the classpath of a different
    file than tomcat.sh?
    Is my above syntax incorrect for tomcat?
    Thank you for your assistance!

    Hello!
    I got the same problem with Tomcat 3.2. Now I tried Tomcat 4.0.1
    and it works.
    Bye,
    Andreas

  • URGENT: Problems with Dates in BC4J

    Hello I have the next problem, I have to access to Dates from my B Component and consult the day , month , and I don4t know how because it only give the posibility to convert it to a String and with a String i don4t know to access to the day.
    Thanks for your help.

    I'm having the same problem.
    Here's what the problem is (in case some people dismissed Inazio's question just because his English is not as good as theirs):
    A DATE field in a database table maps to an oracle.jbo.domain.Date class in the Business Components framework. In order to do something with the date value, we have to convert it to a java.util.Date object. How do we convert oracle.jbo.domain.Date to java.util.Date?
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Inazio:
    Hello I don4t explain it well.
    I have a BC4j and when I acess to a the Date it gives my a oracle.jbo.domain.date and my javadoc i don4t have the oracle.sql.Date doc.
    Could I convert it to other Date who have methods to acess to his components, because with the methods in oracle.jbo.domain.Date i think i can4t
    Thanks.<HR></BLOCKQUOTE>
    null

  • Urgent problem in struts bc4j app

    The problem occurs between the Controller an the View Layer(can I debug there?) Anyway, I can see the data in the Action class, but not in the jsp page, there's just one row (the first).
    Thank you.
    I'm using the 9.0.3.3 build 1205
    The Action class:
    public class ShowneuebehauftrAction extends Action
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    BC4JContext context = BC4JContext.getContext(request);
    ViewObject vo = context.getApplicationModule().findViewObject("BehauftrNeu");
    //here the output looks fine
    Row r = vo.first();
    while (r != null)
    for (int i = 0; i < vo.getAttributeCount(); i++)
    String attrName = vo.getAttributeDef(i).getName();
    String attrVal = r.getAttribute(i).toString();
    System.out.println(attrName + " = " + attrVal);
    r = vo.next();
    return BC4JUtils.getForwardFromContext(context, mapping);
    And the jsp page:
    <%@ page language="java" errorPage="errorpage.jsp" contentType="text/html;charset=windows-1252" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <html>
    <head>
    <META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
    <LINK REL=STYLESHEET TYPE="text/css" HREF="bc4j.css">
    <TITLE>
    <bean:message key="behauftr.title"/>
    </TITLE>
    </head>
    <body>
    <table border="0" bgcolor="#003399">
    <tr>
    <th><font color="white" size="3"><bean:message key="behauftr.nr"/></font></th>
    <th><font color="white" size="3"><bean:message key="behauftr.wunschdatum"/></font></th>
    <th><font color="white" size="3"><bean:message key="behauftr.status"/></font></th>
    <th> </th>
    </tr>
    <jbo:RowsetIterate datasource="DataaccessModule.BehauftrNeu" userange="true" >
    <tr bgcolor="#f3f3f3">
    <td>
    <jbo:ShowValue dataitem="Nr"/>
    </td>
    <td>
    <jbo:ShowValue dataitem="Wunschdatum"/>
    </a>
    </td>
    <td align="right">
    <jbo:ShowValue dataitem="BasNr"/>
    </td>
    </tr>
    </jbo:RowsetIterate>
    </table>
    </body>
    </html>

    There's another question: I tried to format a date field to SimpleDate format dd.MM.yyyy - in the Entity's and ViewObject's Attribute-Editor-Control-Hint.
    It works fine in the BC-App-Module, but in the Action class there's the yyyy-MM-dd format back again (and of course in the jsp page as well). Does this have to be handled in the Action class?
    But, more important, I still can't figure out why there's only one row in the jsp page - as described earlier -
    Thanks in advance for your help.
    Regards
    gabriela

  • Problem in Connection pooling after deploying BC4J App Module as EJB

    Hi,
    We have deployed the application modules on standalone OC4J as stateful EJB session beans.
    The problem is that with each user, the number of database connections seem to increase. This is making the application unscalable, which defeats the purpose of using EJB!
    Can someone please suggest how to limit the number of database conections in this scenario?
    Can this be solved by application module pooling? How can we use the PoolMgr to work with the session beans?
    We have tried to invoke disconnect on the application module after calling methods(using appmodule.disconnect(true)) and reconnect (appmodule.reconnect()) on entering the method. This keeps the number of connections low and works the first time the method is invoked. But subsequently, it gives nullpointerexception when the Row is accessed in the JSP.
    The exception we are getting is :
    java.lang.NullPointerException
         at oracle.jbo.client.remote.ViewUsageImpl.getStructDef(ViewUsageImpl.java:241)
         at oracle.jbo.client.remote.ViewUsageImpl.findAttributeDef(ViewUsageImpl.java:275)
         at oracle.jbo.client.remote.RowImpl.getAttributeIndexOf(RowImpl.java:368)
         at oracle.jbo.client.remote.RowImpl.getAttribute(RowImpl.java:144)
         at Supplier.client.ejb.beanmanaged.SupplierAM_IntPaymtVORowBeanManagedClient.getMdid(SupplierAM_IntPaymtVORowBeanManagedClient.java:63)
         at supplier.sccPayCheq._jspService(_sccPayCheq.java:102)
         [SRC:/Supplier/sccPayCheq.jsp:44]
    The Application module configuration (in bc4j.xcfg) is:
    <AppModuleConfig name="SupplierAM9iAS">
    <AppServerConnectionName>StandaloneOC4JConnection</AppServerConnectionName>
    <AppModuleJndiName>Supplier.SupplierAM</AppModuleJndiName>
    <java.naming.security.credentials>admin</java.naming.security.credentials>
    <DeployPlatform>EjbIas</DeployPlatform>
    <java.naming.security.principal>admin</java.naming.security.principal>
    <DtMiddleTierDeploymentProfile>ProjectMiddleTier.deploy</DtMiddleTierDeploymentProfile>
    <ApplicationName>Supplier.SupplierAM</ApplicationName>
    <DtDeploymentProfile>ProjectEJB.deploy</DtDeploymentProfile>
    <DtCommonDeploymentProfile>ProjectCommon.deploy</DtCommonDeploymentProfile>
    <JDBCDataSource>jdbc/ConnectionCoreDS</JDBCDataSource>
    <jbo.server.internal_connection>jdbc/ConnectionCoreDS</jbo.server.internal_connection>
    <jbo.ejb.txntype>local</jbo.ejb.txntype>
    <jbo.doconnectionpooling>true</jbo.doconnectionpooling>
    <ApplicationPath>ProjectEJB</ApplicationPath>
    </AppModuleConfig>
    The Datasource used (in $ORACLE_HOME/j2ee/home/config/data-sources.xml) is:
    <data-source
              class="oracle.jdbc.pool.OracleConnectionCacheImpl"           connection-driver="oracle.jdbc.driver.OracleDriver"
              ejb-location="jdbc/ConnectionDS"
              inactivity-timeout="30"
              location="jdbc/ConnectionCoreDS"
              name="ConnectionDS"
              password="*******"
              pooled-location="jdbc/ConnectionPooledDS"
              url="jdbc:oracle:thin:@<IPADDESS>:<SID>"
              username="USER"
              xa-location="jdbc/xa/ConnectionXADS"
              max-connections="5"
              min-connections="1"/>

    Can this be solved by application module pooling? How
    can we use the PoolMgr to work with the session
    beans?You can use a stateless checkout/checkin appmodule.
    Take a look at the following help topics which explain this in good detail.
    "About Application Module Pooling"
    "About JSP Pages and Application Module Pooling"
    The pool can help reuse the appmodule instance across requests thus reducing the number of concurrent db sessions.
    Dhiraj

  • Bc4j/oc4j/petstore problem

    After installing BC4J runtime on top of OC4J running on Win2k and Sun JDK1.3.1, bc4j demo is OK. the Sun's J2EE demo petstore stops working. Any idea?
    Thx.
    Request URI:/apps/petstore/template.jsp
    Exception:
    oracle.jsp.parse.JspParseException: Line # 8,
    Error: oracle.xml.parser.v2.XMLParseException: Invalid element 'servlet' in content of 'web-app', expected elements '[servlet-mapping, session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref]'.
    at oracle.jsp.parse.JspDirectiveTaglib.validateAttributes(JspDirectiveTaglib.java:80)
    at oracle.jsp.parse.JspParseTagDirective.validateTagAttributes(JspParseTagDirective.java:107)
    at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:672)
    at oracle.jsp.parse.JspParseTagDirective.parse(JspParseTagDirective.java:174)
    at oracle.jsp.parse.JspParseTag.parseNextTag(JspParseTag.java:548)
    at oracle.jsp.parse.JspParseTagFile.parse(JspParseTagFile.java:100)
    at oracle.jsp.parse.OracleJsp2Java.transform(OracleJsp2Java.java:40)
    at oracle.jsp.app.JspAppLoader.translatePage(JspAppLoader.java:1513)
    at oracle.jsp.app.JspAppLoader.reloadPage(JspAppLoader.java:1146)
    at oracle.jsp.app.JspAppLoader.loadPage(JspAppLoader.java:1005)
    at oracle.jsp.app.JspAppLoader.getPage(JspAppLoader.java:671)
    at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:337)
    at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
    at oracle.jsp.JspServlet.internalService(JspServlet.java:178)
    at oracle.jsp.JspServlet.service(JspServlet.java:148)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:339)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:501)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:141)
    at com.sun.j2ee.blueprints.petstore.control.web.MainServlet.doGet(MainServlet.java:105)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:198)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:312)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:339)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:501)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:549)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:189)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
    null

    Yes - this was a bug in the first version of the bc4j-oc4j installer. We have a new version of the installer that contains the correct version of orion.jar, and should fix the bug that you found. You can download it from http://otn.oracle.com/products/jdev/howtos/bc4jdeployment.html
    My apologies - and please let us know if you continue to have problems.
    Blaise

Maybe you are looking for

  • Problem with slow execution on a cFP-2120

    I have an application that runs on a cFP-2120, using web interface for the user to interact with the program. I have noticed that in order to get the web interface to get updated I have to use property nodes and write to the value property, see this

  • Not reading camera card

    I put my camera card in my macbook and it isn't even showing up on the desktop.  My friend with me has the same computer and hers opened it and registered it right away.

  • Problem with SQL Convert Function Junk Character

    Hi All, We have a database field that has a value of "2.020 OPERATOE'S CAB – GLASSES" on the front end of Oracle E-Business Suite. When we are spooling that column(in PLSQL) with the SQL covert function , one of the characters(') in the string is not

  • Connecting sky or freeview to imac?

    hello again, can this be done at all.

  • IDOC to Flatfile

    Hello expert! I have created a IDOC and now i want to pump the data from my IDOC to flat file! Is this possible? If Yes, please let me know how to do this and mail me to       [email protected] Thanks in Advance, MLN