Multiple calls to execute() on an OperationBinding fail after first call

(I am using jDeveloper v11.1.1.5.0.)
I have a method in a ViewObjectImpl class that does a simple "findByKey", using a string that is passed to the method as the key, and returns the found row. I have the method bound to a page, and in a backing bean, I am trying to call the method. I get a handle to the OperationBinding for the method, get the ParameterMap object, and add (put) a parameter of the string I want to pass to the method. I then call execute() on the OperationBinding and get back the Row (if found).
This all works the first time.
The problem is that in my bean, I am actually doing this iteratively. The first time, everything works. The second time I call execute(), it appears that the parameter map is not getting passed to the method, as all of the parameters are 'null' from within the method.
Below is the code for the method in the ViewObjectImpl class for my view object:
    public Boolean isCommonWord(String word) {
        System.out.println("Checking word: " + word);
        if (word == null) return false; // short-circuit for null values
        Object[] keys = new Object[1];
        keys[0] = word.toUpperCase();
        Row[] rows = this.findByKey(new Key(keys), 1);
        System.out.println("Found " + rows.length + " matching words.");
        if (rows.length > 0) System.out.println("Word row 1: " + ((CommonWordsLOVRowImpl)rows[0]).getWord());
        return (rows.length == 1);
    }As you can see, "word" is the single parameter to the method. I dump the value to the console for debug, then (if not null) use it to create a Key object to use in findByKey, then return the row, if found.
Here's the relevant code from my bean:
                OperationBinding isCommonWord = ADFUtils.findOperation("isCommonWord");
                params = isCommonWord.getParamsMap();
                // Loop through all words in the string 'searchStr'
                StringTokenizer st = new StringTokenizer(searchStr);
                Collection<String> wordList = new HashSet<String>();
                while (st.hasMoreTokens()) {
                    String s = st.nextToken();
                    _logger.finest(this.getClass().getName(), "findUserAndPlan","Checking word: " + s);
                    // Look up word
                    params.put("word", s);
                    _logger.finest(this.getClass().getName(), "findUserAndPlan","Parameters: " + params.toString());                   
                    if (!(Boolean)isCommonWord.execute()) {
                        // nope - add to collection
                        _logger.finest(this.getClass().getName(), "findUserAndPlan","Word OK");
                        boolean add = wordList.add(s);
                }If 'searchStr' is "delta 36 inc", my output on the console is this:
<CreateAccountBean> <findUserAndPlan> Checking word: delta
<CreateAccountBean> <findUserAndPlan> Parameters: {word=delta}
Checking word: delta
Found 0 matching words.
<CreateAccountBean> <findUserAndPlan> Word OK
<CreateAccountBean> <findUserAndPlan> Checking word: 36
<CreateAccountBean> <findUserAndPlan> Parameters: {word=36}
Checking word: null
<CreateAccountBean> <findUserAndPlan> Word OK
<CreateAccountBean> <findUserAndPlan> Checking word: inc
<CreateAccountBean> <findUserAndPlan> Parameters: {word=inc}
Checking word: null
<CreateAccountBean> <findUserAndPlan> Word OKAs you can see, it calls the method three times, once for each word. In all three calls, you can see that the Parameters Map has one item in the map called "word", and it is set to the actual word from the searchStr (e.g. "delta", then "36", then "inc"). However the very next line is the output from within the method itself. The first time, the method shows it got the word ("Checking word: delta"), but in calls 2 and 3, the value it receives for 'word' is null! This is the problem.
I'm sure I'm doing something wrong, but don't know what that is! :-) Thanks in advance for any suggestions.
Edited by: Karl C on Mar 21, 2012 5:04 AM

So, after sleeping on it, and having a clear(er) head this morning, I tried a few things. I was obviously setting my value in the "params" map, but it was not getting through to the method after the first call. So, I theorized that perhaps I couldn't reuse the "params" map on each call, and that the framework generated a new parameter map for each call.
To test, I moved the one line of code where I get a handle to the parameter map to be inside the loop, as follows:
                OperationBinding isCommonWord = ADFUtils.findOperation("isCommonWord");
                // Loop through all words in 'searchStr'
                StringTokenizer st = new StringTokenizer(searchStr);
                Collection<String> wordList = new HashSet<String>();
                while (st.hasMoreTokens()) {
                    String s = st.nextToken();
                    _logger.finest(this.getClass().getName(), "findUserAndPlan","Checking word: " + s);
                    // Look up word
                    params = isCommonWord.getParamsMap(); // <<=== This is the line I moved
                    params.put("word", s);
                    _logger.finest(this.getClass().getName(), "findUserAndPlan","Parameters: " + params.toString());                   
                    if (!(Boolean)isCommonWord.execute()) {
                        // nope - add to collection
                        _logger.finest(this.getClass().getName(), "findUserAndPlan","Word OK");
                        boolean add = wordList.add(s);
                }Guess what? It worked!
So, I solved my own problem. I hope that this post perhaps can save someone else from beating their head against a wall for hours wondering why things aren't working! :-)

Similar Messages

  • Has anyone had a problem with no ear-speaker noise when making calls on iPhone 5? Usually work after first call

    So I got my iPhone. Had problems with the screen and took it back for a stock replacement. The replacement I noticed about two weeks later that when I make calls, 80% of the calls wouldn't make a noise. I would then look at the screen and see its been answered and the seconds are counting away. I'd hang up and try again which would always work.
    I've tried a restore. Twice in facts.
    Has anyone else had this problem? I'm running the up to date software but think it could be a hardware problem.

    Thank you so much.  You have solved my problem.  I never thought to click the down arrow.  In all the time I have been printing, on any program, the entire window opened up when I clicked on the print button.  This one never did.  I don't understand why Adobe support never told me about that when I called them.

  • HT201401 I am so frustrated!!!! My iphone 4s will no longer show caller id when a call is waiting, and it won't answer the call either.  I need to disconnect from first call and wait for call to come through without knowing id.  Help!!! I see no solutions

    My iphone 4s will not answer call waiting.  When I go into settings there does not appear to be the option to enable call waiting, yet I have had it for a year and had no problem with it!  Caller id does not show up during an existing call and the call waiting cannot be ansered.  Can anyone help???

    My iphone 4s will not answer call waiting.  When I go into settings there does not appear to be the option to enable call waiting, yet I have had it for a year and had no problem with it!  Caller id does not show up during an existing call and the call waiting cannot be ansered.  Can anyone help???

  • Calling another person after first call is finished

    Hi all,
    I think there is problem with my Iphone... Actually after I call a person if i want to call any other person then my phone is getting stuck and is taking time to come back to normal position....
    And if on the other end it goes to voice mail then its the biggest problem....
    I have to end the call before other person ends it other wise I have to sit idle for at least a min to make other call...
    Can you please help me out in resolving this?
    has any body faced the similar situation.
    hoping to receive an answer.
    bye
    Praveena

    Please find my codes as below:
    On scree Painter at Flow Logic:
    process before output.
    module status_0100.
    process after input.
      module user_command at exit-command.
      chain. " every field here will keep editable
    field container.
    field shipment_no.
    field shipping_line.
    field bill_of_lad.
    field bl_date.
    field from_port.
    field to_port.
    field tanship_port.
    field vessel_no.
    field voyage_no.
    field container_wt.
    field container_vol.
    field date_of_shipment.
    field eda_port.
        module check_not_initial.
      endchain.
    MODULE user_command.
    module user_command_0100.
    In Program:
    data: wa type ZSHIPMENT01,
          pa type ZSHIPMENT02.
    data: ok_code type sy-ucomm,
          save_ok like ok_code.
    call screen 100.
    MODULE check_not_initial INPUT.
    if ZSHIPMENT01-CONTAINER IS INITIAL
    and ZSHIPMENT01-SHIPMENT_NO IS INITIAL
    and ZSHIPMENT01-SHIPPING_LINE IS INITIAL
    and ZSHIPMENT01-BILL_OF_LAD IS INITIAL
    and ZSHIPMENT01-BL_DATE IS INITIAL
    and ZSHIPMENT01-FROM_PORT IS INITIAL
    and ZSHIPMENT01-TO_PORT IS INITIAL
    and ZSHIPMENT01-TANSHIP_PORT IS INITIAL
    and ZSHIPMENT01-VESSEL_NO IS INITIAL
    and ZSHIPMENT01-VOYAGE_NO IS INITIAL
    and ZSHIPMENT01-CONTAINER_WT IS INITIAL
    and ZSHIPMENT01-CONTAINER_VOL IS INITIAL
    and ZSHIPMENT01-DATE_OF_SHIPMENT IS INITIAL
    and ZSHIPMENT01-EDA_PORT IS INITIAL.
        MESSAGE 'Please complete all entries.' TYPE 'E'.
      ENDIF.
    ENDMODULE.                 " CHECK_NOT_INITIAL  INPUT
    MODULE user_command INPUT.
      CASE ok_code.
        WHEN 'EXIT'. " defined as exit-command
          LEAVE PROGRAM.
        WHEN 'BACK'. " defined as exit-command
          LEAVE TO SCREEN 0.
        WHEN 'CONTINUE'.
          CALL SELECTION-SCREEN 50.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND  INPUT
    with thanks,
    DSC

  • Database Logon Failed after first report

    I have a Windows Server 2003 x86 server running IIS6 and ASP.NET. On this server, I have two different web forms set up to export Crystal Reports to PDF.
    My problem is that only one of these reports can run. For example, I open report 1 and can then reopen (generate PDF of) report1 as many times as I want. I cannot open report 2 - I get a "Database Logon Failed" error message. If I restart the server, I can generate a PDF of report 2 successfully and as many times as I want but report 1 will get a "Database Logon Failed" error message.
    Has anyone seen this behavior before? My code is very concise and manually closes the report document (and forces the garbage collection to run) once the PDF has been generated. However, for some reason, the report is staying in memory and is trying to run again even though it has been closed. It is driving me crazy.
    Thanks in advance for any assistance you can offer.

    Let's get the server confusion out of the way.
    A "server" runtime install is an msi file called CrystalReports11_5_NET_2005.msi.
    The msi is in a download called Crystal Reports XI Release 2 - FP x.x .NET Server Install (where x.x refers to SP or FP version (e.g.; Crystal Reports XI Release 2 - FP 5.6 .NET Server Install)
    So, this gives you an easy way of installing the CR runtime on a server (e.g.. Win 2003 server). No CR server (RAS) implication here. To install the runtime, all you have to do is run the msi, provide the keycode when prompted and the runtime is installed. You should see the directory C:\Program Files\Business Objects\Common\3.5\bin created. No pretty interface, etc. If you want a pretty interface, you create your own setup project or msi using the CR msm files.
    Hopefully this clears up the "server" confusion.
    To the actual issue on hand.
    You say this works with older "Crystal Reports viewers" installed on a WIN 2003 64 bit server. My question is; does this CR XI r2 based app work anywhere? Your dev box? Staging server?
    Ludek

  • System recovery from partition fails after first boot

    I just purchased and recieve the following notebook: Pavilion DV7-6C95DX. I went through setup and then created recovery DVDs. 
    After playing with it for a short while, I decided to try restoring it to factory condition using the recovery partiton and F11 during boot.  This started the recovery manager, which (according to its checklist) reformatted the Windows partition, copied required files and restored file to the hard disk.  Then it prompted me to continue to reboot and finish the process, which I did.
    Upon boot, it reported it immediately reported "Windows failed to start... Status: 0xc000000f ... a required device inaccessible"
    I pressed Enter to contine and the screen said "Choose an operating system to start ..." and it gave me only the option "Ramdisk Options [EMS enabled]" Choosing it takes me back to the previous screen and so on.
    So, I tried using the recovery media I made earlier.  That booted Windows and Recovery Manager reported the following: "The system recovery media does not support this computer. You are not able to restore this computer with the media"  There was a code below it that read "0110-A6X02UAR#ABA-A6X02UA#ABA"
    There are apparently two problems -- the reecovery partition does not work and the recovery media does not work.  I do not know if they are related, but, in any case, now the computer is unusable. It is less than a week old.
    Thanks in advance for any advice for correcting this.
    This question was solved.
    View Solution.

    Hi Lance,
    This error can occur if there are any USB devices or media cards connected to your notebook.  If this is the case, remove everything connected to your notebook and try the Recovery process again.
    If the above is not relevant, I would try the following to rule out a potential Hardware issue.
    Before trying the following, make sure you can read the Activation key on your Windows COA label ( 5 blocks of 5 alpha/numeric sets ).
    Assuming that this is just a software problem with the Recovery process, there is a straight forward work around if you have ( or can borrow ) a retail Windows 7 installation disc that is exactly the same version as your OEM installation - ie if your notebook came with Windows 7 Home Premium 64bit this is the exact retail version you would need.
    If you don't have access to a retail disc, you can create an installation disc yourself using another PC - just download the correct Disc Image from the link below and use an application such as ImgBurn to burn the ISO correctly to a blank DVD - a guide on using ImgBurn to write an ISO to a disc is Here.  These Images are clean and from a well-respected source, however there are only limited versions available.
    Windows-7 sp1-iso-official-32-bit-and-64-bit
    Use the disc to perform the installation, enter the Windows activation key found on the COA Label when requested and when the installation has completed, use the 'Phone Method' detailed in the link below to activate the OS - this method supported by Microsoft and is popular with people who just want a clean installation of Windows 7 without the additional software load normally bundled with OEM installations.
    http://www.kodyaz.com/articles/how-to-activate-win​dows-7-by-phone.aspx
    Any additional drivers you may need can be found starting Here.
    If this also fails to install Windows, I would simply return the notebook to the retailer it was purchased from and get a replacement while you are still within the time frame where this is an option.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • Simulate Acquisition does not include new image file created after first call

    For example, I have 5 images in a folder.
    I call Simulate Acquisition.
    It cycles through all 5 images.
    Now If I include 1 more image it does not include this image in the "cycle". I need to reload this step by clicking Main\path\browse button and select any image in the folder and then it cycles through all 6 images.
    Is there anyway to automatically include new images added to the folder after the step has been created?
    Thanks.
    CVI 2010
    LabVIEW 2011 SP1
    Vision Builder AI 2011 SP1

    Here's a sample inspection and VI to illustrate how you could do this. I used an image variable and passed this into the Run LV step so the VI could read the file and update the image variable and then I used the Select Image step to get the image variable into the VBAI script so you can process it. I also added a delete option in the VI so you can delete the previous image when you read the next available image. Make sure to go to the Setup State and initialize the path variable to where your image files will live (to access the Setup State, go to View>>View Complete Inspection and select on the Setup option on the left hand side. I initialized it to c:\Image Folder
    Hope this helps,
    Brad
    Attachments:
    Read Dynamic Image File.zip ‏15 KB

  • Time Machine fails after first backup

    iMac has a 2T HD with only a little less than 1T used.  Have 4T external G-drive partitioned in two.  One half I do SuperDuper backups on and the other half for Time Machine.  SuperDuper backups go fine.  The first TM backup went fine and continued fine for three days, then would not again - failed.  I ran disk utility on the G-drive (repair disk) and the the TM back up went fine but only once, then failed on subsequent attempts. I get hourly messages saying it could not back up.  "Unable to complete backup. An error occured while creating the back up folder".  If I repeat with disk repair with Disk Utility, I can do another TM backup, but only the first one, then I get the messages again every hour that it can't back up.  Ideas would be appreciated.  Thanks

    Try Section C here > http://pondini.org/TM/Troubleshooting.html

  • HP Envy M6 Recovery DVD fail after First Disc.

    Hello Fellow Members and Support
    What I have done so far:
    - I have purchased and installed a new Harddrive for my HP Envy M6-1184ca Laptop.
    - I have run the Harddrive diagnosics test wizard to verify it has been installed correctly. 
    - I have set the bios to default settings. 
    -  I Purchased The recovery DVD pack from HP.
    -  I have inserted DVD disc  1 of the Windows 8 64 bit Recovery DVD Set.
    The Situation:
    I have booted up the Laptop and hit esc until the boot menu appeared with the option  to press F9 then select to boot from internal UEFI DVD Boot media. 
    Then I Press any key to boot from cd / DVD and see the HP logo. I am prompted with a Black installation to select english or french. I select English and select next. The computer runs through the following:
    - Reformatting the Windows partition of the harddrive
    - Copying files required to restore the harddrive
    - Restoring files to the hard drive.
    Then the DVD gets ejected and the laptop screen goes black and the laptop is not off.
    What is next?
    I have not touched it until I hear back from support here.

    Hi @escherzi ,
    Thank you for visiting the HP Support Forums and Welcome. I have looked into your issue about your HP ENVY m6-1184ca Notebook and not able to install the CD/DVD recovery discs.  Here is a link that might help. The section you need is disabling Secure Boot.
    Please note remove any and all USB devices. Disconnect all non-essential devices, as these could cause some issues.
    If that does not resolve your issue please call our technical support at 800-474-6836. If you live outside the US/Canada Region, please click the link to get the support number for your region. They will be happy to assist you immediately.
    Thanks.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping!

  • Device enrollment fails after first device success

    I have set up an OS X 10.8.3 Server 2.2.1. I have enrolled the first device (an iMac 2010 running 10.8.3), that went well. I tested locking the device and that went well too. So, Pofile Manager seemed to work and did its thing.
    After that I tried (all on the same LAN)
    - a MacBook Air 2009 running 10.8.3. This got as far as a download of the profile, and failed at the second step, maybe because I mistyped the password on getting privileges. After that, I could download profiles, but they would not install.
    - an iPad 2. Login on the mydevices web site worked, but the screen after that was not displayed properly. I started an iOS upgrade (was still one version behind)
    - an iPad mini with the latest iOS. The web page for mydevices did show up. Installing failed as it did on the MBA.
    Two of the last three failed because the certificate (self-signed) was not trusted. Then I tried the MBA 2009 again. Now it won't even download the profile, so the web server that processes the requests on my server is broken somehow. I haven't been able to find anything useful in the log.
    What to do next?

    I hope you have installed the trust profile first on the MacBook Air and iPad? (in the second tab next to the 'enroll button' in the /mydevices portal)
    This is required for self-signed profiles (which is common with small Profile Manager setups).

  • Upgrade and Install fails after first boot. Then I am unable to repair

    I don't know if anyone else has experienced this?
    I've experienced the aqua screen of death with the Upgrade option and was unable to resolve it, even after trying the APE removing technique.
    So, I decided to restore back to Tiger 10.4.10 (thanks to Super Dupering prior to upgrade) and try the archive and install option. All appeared to go well, installed fine, allowed me to login and run all my apps. But, upon doing my first reboot after the 'sucessful' install the system just hangs at the gray screen. I tried using Disk Utility from the Leopard DVD, but it's unable to repair permissions.
    I got this error message: 'The underlying task reported failure on exit'. Tried many times, I also tried the /sbin/fsck -fy in single user mode.
    I tried booting into DiskWarrior 4's. Once in DW4 I ran the Repair function there... Here I got another error message.
    This error being: 'Error -9997'.
    OK I thought, something random must have happened. Soooo I restored to Tiger again and ran the Archive and Install option once again.
    I'm am again experiencing the exact same problems with freezing gray boot screen and the inability to repair permissions (all after doing my first boot after sucessful install and login/opening of many apps)
    Please please please can anyone she some light on this problem???
    I'm going to try one more option:
    Upgrade after I've disable all startup options and removing anything to do with APE....
    I will report back!
    This is really really crap Apple, I can't believe I've spent £85 and probably 15 hours on this sloppy release. Utterly disapointed

    Just me it seems then....
    Right, I think it's finally resolved, only after the fifth time. I've now rebooted twice and so far so good.
    There was a new message when I powered down for the first time, something along the lines of:
    Please wait while your Boot Caches are updated.
    This seems to be a reasuring message, I feel almost confident in restarting again.
    I upgraded using the following method:
    1. Disabled ALL startup items (System Preferences>Accounts>Login items)
    2. Removed all traces of APE (Application Enhancer) using Finder:
    /Library/Preference Panes/Application Enhancer.prefpane
    /Library/Frameworks/Application Enhancer.framework
    /System/Library/SystemConfiguration/Application Enhancer.bundle
    /Library/Preferences/com.unsanity.ape.plist
    3. Repaired Permissions
    Right, before I perform a new backup I think I'll see how she runs for a week, so I'm sure the boot problem is definitely gone.

  • IPhone 4s call waiting; how do I get back to the first call?

    When I'm on a call and a second call comes in I tap "hold current call and answer." I get connected to the second call and the first call is put on hold. But when I am done with the second call, how do I get back to the first call? I can't find any way to get back to the call that is on hold. I usually end up hanging up on both calls. Not good.
    Also, how do I switch back and forth between two calls? How do I put the second call on hold, go back to the first call to tell that person I must call them back, then return to the second call?

    http://support.apple.com/kb/TA38607?viewlocale=en_US
    Good Luck

  • How to quickly pick up a 2nd call and drop the first call

    If I am on a phone call, and then a second call comes in, then how can I quickly pick up the second call and DROP the first call?  I can do it if I put the first call on hold but then I have two calls going.  If I simply END the first call, then it takes 5 or 6 seconds for the second call to come in.  Several times I have lost the second call because it took too long to transition over. 

    never mind i did a direct chat with a skype rep and got my answer which is no.

  • Cannot pick up calls on wait, Cannot make a second call holding the first call

    I have a really weird problem with my iPhone 5S. (iOS 7.1)
    1. When I am on a call, I am not able to pick up a second call that is on wait. I can see the second call, I can hear the beep sounds but as soon as I pick up, the call freezes in 00.00 time, and My first caller is still active, not on hold.
    2. When I am on a call, I am not able to make a second call placing the first call on hold. The second call disconnects immediately with 3 beeps.
    3. I am able to see the incoming calls on wait, when I am already on a call. I am able to hear the beeps coming in. SO it means the call waiting is on (Tried turning it on/off/on too.) But when I pick up the call, the above problem comes in.
    What have I tried to solve this: (None of them helped)
    1. I tried a hard reset of my iPhone (Holding Power and Home button)
    2. I tried toggling the Call waiting button
    3. I tried resetting network settings.
    4. I called my Operator for assistance. I am using Airtel, India. They told me to dial this code - *43# . I tried it and it gave me this screen. But the problem is not solved yet.
    Is there anybody here who is facing the same issue with your iPhone? I never had this problem with my iPhone 4.

    Make sure you do not have "Do Not Disturb" turned on. This feature will block the first call, but is someone calls right back it will be put through.
    On the iPhone, go to Settings/Do Not Disturb
    Make sure you do not have Do Not Disturb turned on manual or scheduled.

  • IPhoto 11 - Edit tools fail after initial use of program

    Running 10.6.8 (all updates complete) on new MacBook. Began editing newly imported photos  - edit features failed after first 50 photos. I have tried...
    * updated all Mac Software
    * deleted user iPhoto preferences, emptied trash, reopened
    * repaired iPhoto library, etc....
    Has this happened to anyone else? Any suggestions for repair/recovery?

    Try this:  launch iPhoto with the Option key held down and create a new, test library.  Import some photos and check to see if the same problem persists. If it does then a reinstall of iPhoto seems warranted. To do so you'll have to delete the current application and all files with "iPhoto" in the file name with either a .PKG or .BOM extension that reside in the HD/Library/Receipts folder and from the /var/db/receipts/  folder,
    Click to view full size
    Then install iPhoto from the disk it came on originally.
    OT

Maybe you are looking for