Issue with "firstRecord" Business Component method of JAVA Data bean API.

Hi,
Following is my use-case scenario:
I have to add or associate child MVG business component (CUT_Address)
with the parent business component (Account) using JAVA Data bean API.
My requirement is: first to check whether child business component(i.e. CUT_address) exists. If it exists then associate it with parent business component (Account)
otherwise create new CUT_address and associate it with account.
Code (using JAVA Data bean APIs) Goes as follows:
SiebelBusObject sBusObj = connBean.getBusObject("Account");
parentBusComp = sBusObj.getBusComp("Account");
SiebelBusComp parentBusComp;
SiebelBusComp childBusComp;
// retrieve required account.. Please assume Account1 exists
parentBusComp.activateField("Name");
parentBusComp.clearToQuery();
parentBusComp.setSearchSpec("Name", "Account1");
sBusComp.executeQuery2(true, true);
sBusComp.firstRecord();
Counter = 0;
while (counter < Number_Of_Child_Records_To_Insert)
childBusComp = parentBusComp.getMVGBusComp("City");
associatedChildBusComp = childBusComp.getAssocBusComp();
childBusComp.activateField("City");
childBusComp.clearToQuery();
childBusComp.setSearchSpec("City", Vector_of_city[counter]);
sBusComp.executeQuery2(true, true);
if( sBusComp.firstRecord() )
// Child already exist and do processing accordingly
else
// Child does not exist and do processing accordingly
childBusComp.release();
childBusComp = null;
associatedChildBusComp.release();
associatedChildBusComp=null;
Now the issue with this code is: For the first iteration, SbusComp.firstRecord returns 0 if records does not exist. However from the second iteration, SbusComp.firstRecord returns 1 even if there is no record matching the search specification.
Any input towards the issue is highly appreciable.
Thanks,
Rohit.

Setting the view mode to "AllView" helped.
Thanks for the lead!
In the end, I also had to invoke the business component method SetAdminMode with "true" as the argument so that I could also modify the records from my script.

Similar Messages

  • JDev 10.1.3.3 - issues with imported Business Components

    Hi,
    I have got some issues with importing Business Components in JDev 10.1.3.3.
    I cannot discover/use the imported components.
    What I did is the folowing:
    1. In a existing project I extended the default base-classes to create our own layer
    2. created a project called ModelShared
    2a. configured the project to use the base-classes I created in step 1
    2b. created an entitybased-viewobject (RefCodesByDomain)
    2c. created bc deployment-descriptors
    3. created a project called RelatieModel in the same workspace as ModelShared
    3a. added dependencies to the deployment-descriptors as well as the project created in step 2
    3b. configured the project to use the base-classes I created in step 1
    3c. imported business components
    Although I did not recieve any errors during the import of business components, I am unable to add the vo (RefCodesByDomain) to a service.
    I do see the package which contains the vo but is has no entries.
    Importing the business components to a new BC Project in a seperate workspace did succeed (I could reuse the vo).
    I tested a little further and the folowing occurred:
    4. I created a new vo in the ModelShared Project
    5. I deployed the ModelShared
    6. Restarted JDeveloper
    7. Got the folowing error message in the console window when expanding a service in my datacontrol pallette:
    INFO: oracle.adf.share.config.ADFConfigFactory No META-INF/adf-config.xml found
    1-sep-2008 13:23:27 oracle.adf.dt.controls.DataControlsTreeWillExpandListener treeWillExpand
    FINER: THROW
    java.lang.NullPointerException
            at oracle.adf.dt.objects.JUDTViewReferenceAccessorDefinition.init(JUDTViewReferenceAccessorDefinition.java:108)
            at oracle.adf.dt.objects.JUDTViewReferenceAccessorDefinition.<init>(JUDTViewReferenceAccessorDefinition.java:98)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.createViewObjectDefinition(BC4JDataControlDefinition.java:228)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.addViewObjects(BC4JDataControlDefinition.java:208)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.loadStructure(BC4JDataControlDefinition.java:110)
            at oracle.adfdt.internal.meta.bc4j.BC4JDataControlDefinition.getStructure(BC4JDataControlDefinition.java:407)
            at oracle.adf.dt.controls.treemodel.jsr227.JSR227DataControlTreeNode.loadChildNodes(JSR227DataControlTreeNode.java:129)
    8. In my other "fresh" bc project I was able to use the newly created vo.
    9. When I added a VO to my shared project, all projects that are refering to the shared project loose their vo's in the data-controlpannel
    Do you have any suggestions?
    Regards,
    Romano

    Hi,
    since this appears to be a WebCenter related issue, I suggest to try the Webcenter forum WebCenter Portal or to log a bug
    Frank

  • Browser specific Issue with af:fileDownloadActionListener/ component.

    Hi all,
    We are facing an issue with <af:fileDownloadActionListener/> component.
    The issue is that when we download a particular file to the local system/machine, after downloading the file using <af:fileDownloadActionListener/>, none of the actions/links/button work on the page thereafter. We have to do a browser refresh or switch the URL.
    After doing some investigation, it is looking like a browser specific issue, as this is reproducible only on chrome but not on firefox or IE.
    The UI component used is <af:fileDownloadActionListener/> component. Below is the snippet of the code. Is there anything to be specified for af:fileDownloadActionListener?
    <f:facet name="buttonBar">
    <af:panelGroupLayout partialTriggers="expPoll expProgess" id="gsexppgl11">
    <af:commandButton text="#{uib_o_w_w_r_WebCenter.LABEL_DOWNLOAD}"
    shortDesc="#{uib_o_w_w_r_WebCenter.LABEL_DOWNLOAD}"
    id="expClientp"
    disabled="#{!pageFlowScope.o_w_w_i_v_b_l_WebCenterExportBean.showExportButtons}">
    <af:fileDownloadActionListener filename="#{pageFlowScope.o_w_w_i_v_b_l_WebCenterExportBean.fileName}"
    contentType="application/force-download; charset=utf-8"
    method="#{pageFlowScope.o_w_w_i_v_b_l_WebCenterExportBean.dumpOAROnClient}"/>
    </af:commandButton>
    </af:panelGroupLayout>
    </f:facet>
    Anyone has faced this issue before? Is this a known issue?
    Thanks,
    Ankush

    Jdveloper version is 11g. But we saw this issue with 12c as well.
    I have reproduced this in a standalone application as well. I had a page on which I just had a button attached to the file download component. And I faced the similar situation - works fine on IE/FF but causing issues on chrome/safari.

  • Issue with executing Business Rules from Planning web

    Hi,
    We are using Hyperion Planning 9.3.0.1 and we keep getting an issue with the Business Rules. We get an error if we try to run the rules from Planning web. The same rules validates and executes fine if we run it from AAS. This issue gets resolved if we restart the Planning and RMI service. But this issue keeps happening randomly. Is there a permanent resolution to it? Is it a bug or I am missing something here?
    Thanks and Regards,
    Amol
    Edited by: user638718 on Apr 7, 2009 5:20 PM

    Hi,
    Have you installed any of the patches for 9.3.0.1, I think it goes up to 9.3.0.1.09
    One of the fixes was :-
    8-665086601 (6588823) – When the Business Rules connection to the relational database is lost, Business Rules does not reconnect to it. To solve this problem, an optional property, HBR_CONNECTION_VALIDATE_TIME, was added to HBRServer.properties. This property specifies a time interval for checking the connection between Business Rules and the relational database. If the connection is not valid, a new connection is established. The time interval is specified in milliseconds and defaults to 300,000 (five minutes).
    Though I know there has been more attention to fixing known issues on 9.3.1 than 9.3.0.1
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to interact with a COM component from a Java class

    Hi, could someone give a hint on what API I should explore in order to interact with a COM component from a Java class?
    Thanks in advance
    Luis

    jacob sounds nice...http://danadler.com/jacob/

  • Scenario is HTTP to db. In HTTP client, when Sender is Business Component, Pi is getting data successfully but when Business system is used as sender Pi is not getting any message in sxi monitor. Please help

    Scenario is HTTP to db. In HTTP client, when Sender is Business Component, Pi is getting data successfully but when Business system is used as sender Pi is not getting any message in sxi monitor. Please help

    Hi Ankita,
    Try to trace at ICM level, Go to smicm transaction
    Set level to 3.
    Later send your request. Finally trace the request in:
    When you have seen the log, check if any exception is raised with your request or the request and share it here.
    Regards.

  • How to create a dbservlet with existing business component.

    Can I use the dbservlet wizard to create a dbservlet, which works with the existing business component? The business component module is created previously.
    Thnks.
    mike

    String are immutable so just initialize it with the number of characters you want.
    You might want to look at java.lang.StringBuffer and see if that's what you want.

  • Issues with connection busy functionality

    Here are a few things I've noticed with the busy connection functionality:
    If I want to right click in a SQL worksheet window while a tab has a query running (current or different tab) I get the "connection busy" error. Don't know why this is b/c right clicking should not be contacting the DB so it's not like I'm trying to run another process or something.
    I had one tab with a basic select statement and another that was running another script that was taking a while to execute. The tab running had a bunch of insert statements running but not in a pl/sql block. The script had 15,729 inserts. When I tried running a statement on the other tab, I recieved the "connection busy" error, and I clicked abort. Instead of not trying to connect, I kept recieving the "connection busy" error over and over. The second tab came back with results finally. When my other tab with the insert statements was done, I checked the number of rows in my table - 15,717! So it looks like when I was clicking abort the other script was skipping statements or something! Good thing I double checked b/c this nasty little bug would have caused me some grief in the future.

    The connection-busy-abort-retry dialog is popped us when a JDBC operation is being performed on the connection and another such operation is requested.
    SqlDeveloper uses single connection/session everywhere, so in your case, in the second worksheet, the same connection was being used which was busy through the operation in first worksheet.
    Right click on the worksheet, does some JDBC operation, hence you got the dialog in second worksheet.
    One workaround is to use unshared sql worksheet (ctrl-shif-n in a woeksheet).
    A better solution for above issues is being worked on by the development team that should give you better concurrency and responsiveness.
    This would be available in next major release of Sql Developer.
    -Raghu
    dev. team.

  • Layout issue with af:tree component

    I am using af:tree component but I am finding layout issue with it. I have a requirement where in I need the tree to stretch to the available space but a horizontal and a vertical scrollbar comes up automatically. Is there a way to handle this issue?

    User, without your jdev version it's hard to help.
    Have you embedded the tree component in a stretch layout?
    Timo

  • Issue with Default Variable in WAD after Java Patch 7.01.7.31

    Hello all,
    I'm running into an issue with the Web Application Designer Template execution for a particular default variable. This started occuring after Java Patch 7.01.7.31 we had implented over the weekend.
    The issue is when Executing the WAD Template, we have a selection screen with a variable with default values assigned to it. When leaving the default values and hitting Ok to execute  through the screen does not register and stays as is and I get a message at the top with the following: Characteristic Prob % Number has no master data for "1.00" or you do not have authorization.
    This only seems to occur for this default variable on info object Prob % Number, the other default variables seem to work fine. Also another note when clearing out the values it returns data and executes through. The value 1.00 is also a valid value in the cube and also in the output display. If we run this report in the BEx analyzer, the selection screen executes through with the default variable perfectly fine, this is only an issue with the Web Application Designer Template.
    Has anyone ran into this? I've searched and have not found any notes as of yet.
    Thank you,
    -Andy

    Dear Andy,
    Please raise this to SAP, seems like a strange problem this needs to be addressed by OSS note only.
    Close this thread once you get a solution.
    Regards.
    Den

  • Issue with a resultSet.wasNull() method

    Hello all
    I'm having a small issue with a resultset, basically i wanna test if it returns a null value but it does not seems to work.
    Its a simple application that pulls football matches data out of a database base on the provided data.
    This is my code, i would like to first say that, connectivity works fine, database existing, tables existing, if correct data's are inserted the application fetches the data with no problem.
    public void getMatch(GregorianCalendar cal){
    java.sql.Date sqlDate= new java.sql.Date(cal.getTimeInMillis());
    try{
    String resultMatch="SELECT resultMatch FROM matches WHERE date=?";
    PreparedStatement pre=connection.prepareStatement(resultMatch);
    pre.setDate(1,sqlDate);
    ResultSet resMatch=pre.executeQuery();
    if(resMatch.wasNull()){
    System.out.println("No data found");
    } else {
    System.out.println("Show all datas");
    }//rest of code
    } catch(SQLException e){
    }//rest of code
    the problem arises now, if i enter a data that its in the DB, its fine, all data's are pulled out and printed (via while(resMatch.next()........))
    If i enter a non existing data....nothing comes out, not even an exception.
    Any advice?
    Thx

    enrico wrote:
    This is my code, i would like to first say that, connectivity works fine, database existing, tables existing, if correct data's are inserted the application fetches the data with no problem.The code posted does not do that.
    >
    public void getMatch(GregorianCalendar cal){
    java.sql.Date sqlDate= new java.sql.Date(cal.getTimeInMillis());
    try{
         String resultMatch="SELECT resultMatch FROM matches WHERE date=?";
         PreparedStatement pre=connection.prepareStatement(resultMatch);
    pre.setDate(1,sqlDate);
         ResultSet resMatch=pre.executeQuery();
    if(resMatch.wasNull()){There is no way that the above code returns 'data' from the database.
    A result set represents a collection of zero or more rows.
    One must first retrieve a row before doing anything with it.
    The above code does not call next() so it absolutely does not retrieve any rows.
    The JDBC tutorial might help.
    http://download.oracle.com/javase/tutorial/jdbc/basics/

  • Issue with Citrix Business Objects full client

    Hi ,
    I have issue with my database pasword being expired. I ran a recovery and it works fine for me.
    Since we are using the citirx installation the bomain.key is available on the citrix server which is copied across the user profile when they are login into citrix server via the logon script.
    I still could not find whether the log on script is correct or not can any one of you let me know what I can use to copy the bomain.key using citrix usrlogon.cmd script.
    Regards,
    Ramesh

    Please post this query to the Business Objects Enterprise Administration forum:
    BI Platform
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all BOE queries remain in one place and thus can be easily searched in one place.
    Thank you for your understanding,
    Ludek

  • Issue with af:selectOneChoice component

    Hi All,
    I am facing issue when using the selectOneChoice components in the below scenario
    I have a page fragments, lets say it as MainPage.jsff, where records are shown in table. On selecting a record and pressing the update button the user moves to EditPage.jsff where the record is shown in editable mode. The MainPage.jsff and EditPage.jsff are based on the same View Object Instance. The EditPage.jsff contains 4 fields,
    field1 - Non Editable
    field2 - Non Editable
    field3 - Editable - selectOneChoice - dependent on field1 and field2. Achieved by setting the bind values in the View Accessors.
    field4 - Editable - selectOneChoice -dependent on field1, field2, field3. Achieved by setting the bind values in the View Accessors.
    Test Case: -
    User selects a record and clicks the edit button, all the fields - fields1, field2, field3, field4, fetch the correct values for the record. So far so good.
    Now, the user navigates back to MainPage.jsff and selects another record and clicks on the update button. This time the values of the field1 and field2 are proper but the values of field3 and field4 which are editable and displayed in selectOneChoice component display some other value with select item of the list containing only one item. Is there some caching issue with the selectOneChoice components which is creating the issue?
    When i do a browser refresh at this stage, the values in the fields - field3 and field4 are automatically set to correct value.
    Also, when i drop field3 and field4 from the view object as simple <af:outputText> the values are shown with correct values.
    Is there anything which i am missing?
    Thanks,
    Tarun
    P.S Though the page contain other components i have narrowed down the test case and considered only the components with the issue.

    Hi Tarun.
    I think selectOneChoices are not refresh try in your EditPage.jsff button ActionListner with fillowing way with partial trigger
    Craete binding attribute for two selectOneChoice and then
    YourBindUIComponent.resetValue();
    AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
    adfFacesCtx.addPartialTarget(YourBindUIComponent);

  • Issues with Small Business Switch config

    Hi, I know that if I read the documentation I will come to the answers but I would really like some input from someone with more knowledge than me. I have an issue with Cisco SF300 , one of the Small Business Switches. I have a single interface on my router and I need to separate my internal networks , I thought that one way would be to use VLANs. On my two internal networks one network only has unmanaged D-Link switches, the other has the Cisco SF300 so I did as follows. 
    On the Cisco Switch, all ports default to Trunk ports. I have changed FE1-FE24 and GE1-2 to access ports.
    Created two VLANS and placed FE1-FE24 in VLAN10 (also my management VLAN) , GE3 is a trunk Port for VLAN20 untagged, VLAN 20 uplinks to my DiLink Switches. This way traffic from my unmanaged switches comes in on a trunk port untagged on VLAN20.
    GE4 is a trunk port and I have assigned  VLAN1 untagged, VLAN10 tagged and VLAN20 tagged. VLAN 10 and VLAN 20 then forward to my Router.
    The plan was to connect GE4 to my router however I had two things happen I can not explain.
    Firstly as soon as I connected my D-Link to GE3 the LAN on VLAN20 went down, I could not ping Servers from PCs etc, all devices are connected to the unmanaged D-Links. Secondly the VLAN Assigment changed on GE3 and GE4 , VLANs 10 and 20 disappeared and only the default VLAN was assigned, also under VLAN Settings my VLAN interface state for VLAN20 shows Disabled. Also one of my access ports FE12 keeps changing VLAN.
    Can anyone offer any suggestions as to what might have crashed the LAN and why my VLANs change. I did write my running config to the start up config by the way.
    I added two screen shots. 
    I would seriously appreciate some help.
    Thanks 
    Bob

    Hi Garrett, thanks for your reply to my post, I hope you are well. I called Cisco support, they told me that they could not understand why this was happening and suggested a firmware upgrade, usually something I should have considered right from the beginning. This solved the issue for me.
    Thanks
    Bob

  • Issue with Crystal Report based on 2 different data sources

    Hi there,
    I am having a frustrating problem with a report I've designed and I'm hoping someone might be able to assist please.
    The report has 3 different prompts, each of which is based on a dynamic list of values retrieved via views within a SQL server db.
    We are wanting to introduce the use of Universes as much as possible, so the data returned is based off a BO Universe data source query.
    I have uploaded the report into BO and have provided the necessary database logon information for the report (in the "Process" > "Database" settings in the CMC) for both the direct db datasource connection (for the views) and the BO Universe query connection.
    When the report is run however, the report still prompts for the database user name & password credentials. I have triple checked my db connection settings, and also have "Use same database logon as when report is run" set to true. I also tested a cut-down version of the report without the Universe connection with the same db logon credentials I provided and there was no credentials prompt when it was run, proving those values are accepted.
    Does anyone know why this is happening & if there is a way around it? Alternatively, is there some way that a report prompt may be based on a dynamic list of values retrieved via a Universe connection? This way I'd be able to remove the db connection for the views and have the report solely based on the Universe.
    Another issue that occurs is out of the 3 prompts, a user can select a User Name OR Number, and also must select a Period. However if the User Name or Number is left blank the message "The value is not valid" is shown. So I tried a cut-down version of the report with only the BO Universe as a data source (static prompts) and this didn't occur, i.e. I was allowed to leave either the User Name or Number empty.
    I hope this all of makes sense - let me know if not. If anyone is able to help out with any of this it would be very much appreciated.
    Cheers,
    Marco

    Please re-post if this is still an issue to the Business Objects Forum or purchase a case and have a dedicated support engineer work with you directly

Maybe you are looking for