Error printing twice

String error_msg = (String)((DynamoHttpServletRequest)request).getObjectParameter("message");
int msg=error_msg.indexOf("some string");
if (msg >=0) {
     StringBuffer new_error_msg= new StringBuffer();
((DynamoHttpServletRequest)request).setParameter("message",new_error_msg.toString());
else {  //when it enters this else loop, the error message is printing twice. how to restrict this
if (error_msg.startsWith("the ShipTo me")) {
     StringBuffer new_error_msg= new StringBuffer();
if (error_msg.indexOf("phone number") >= 0) {
new_error_msg.append("The " + error_msg.substring(14));
else {
          new_error_msg.append(error_msg.substring(14));
error_msg = "The "+ new_error_msg.toString();
((DynamoHttpServletRequest)request).setParameter("message",error_msg.toString());
else if (error_msg.indexOf("zip code is not valid") > -1 ) {
     ((DynamoHttpServletRequest)request).setParameter("message","Invalid Zip");
When it enters the first else loop, error messages are printing twice. how to stop this error messages printing twice?It should print error messages once.

I corrected the problem by doing the following:
1. created a commit action in my ui model and renamed it to save.
2. put a UniquePkValidationBean on my primary key so that the overridden setAttributeInternal method would throw a JboException
Thanks,
David

Similar Messages

  • An original document cannot be printed twice error

    Hi All,
    Here is the thing, I am on SAP B1 2007A PL 45. I have draft Incoming Payments. Now, I choose the Payment Drafts Report and from there, I click on the relevant payment draft to highlight it. Then I click Print to print a receipt for that payment.
    I choose my printer and then click on Print. The error message, "An original document cannot be printed twice. In the Print Preferences window, choose to print a single copy only." appears and nothing is printed.
    The problem is, I used to be able to do this in version 2005A PL 46. I am aware of note number 1262165 but this note is not relevant to me as I have not set for the receipt to be printed once added. Any solutions to this? Thanks.

    Gordon,
    I refer to the note and the problem is, for me, I have not added the document and in 2005A, I could print the receipt when I select the particular payment in the draft window. In 2007A now, I can't.
    In any case, I was referring to the temporary solution which was in the link posted by Jeyakanthan A above and I needed more explaination as to how to use the work around while I wait for a permanent solution in SAP.
    In any case, the note you were referring to has been fixed in Patch 48. I am now on Patch 49, so obviously my problem is not related to the note.
    Can someone please further elaborate on the temporary work around so that I can try it out? Based on the brief description, I did not understand how the temporary work around can help me.
    Anybody at all, if you could be kind enough to explain the work around, thank you very much.
    Regards,
    Alvin

  • Error Printing using flash paper

    I have flashpaper 2.0 installed onto a windows XP Pro SP2, a
    particular user is not able to use the flash paper printer. He just
    gets Windows XP Printer Error box with 'Error printing - An unknown
    error occured'.
    There is an entry in the printer's queue, it too is marked
    with 'Error - printing'.
    When i log in (i'm an admin user) it works fine.
    Any clues on where to look?

    I have the same problem. Installed Studio 8 with Contribute 3
    and FPV2 on WIN XP PRO SP2. I can't print to FlashPaper; I just get
    the "Error-Printing" in the print queue. I have admin privledges
    but still have the problem. I have uninstalled and reinstalled
    Contribute twice. I have downloaded FPV2 drivers. I have tried
    adding FPV2 drivers through WIN XP 'Add Printer" process and always
    the same thing.

  • 0n hp m276nw error printer cannot connect the server

    i am trying to set up scan to email every time i go through the proses at the end i get this message on hp m276nw error (printer cannot connect the server) i put the out going email in then i put in the printer port and server number in when i do the test it says  error printer cannot connect the server any help will be well come

    Hello youssi,
    Welcome to the HP Forums!
    I understand when you scan to email you're receiving a message stating cannot connect to server. I will do my best to assist you! Please follow this entire HP document on How to Scan: From the Control Panel (Including Scan to Email, to a PDF, and to a Network Folder) just to make sure everything is correct.
    If this doesn't work, then please follow these steps to try setting an alternative DNS to see if that resolves the issue:
    •    Open the Embedded Web Sever on your computer.
    •    Click the Network tab.
    •    Under Wireless click on IPv4.
    •    Under DNS Address Configuration select Manual.
    •    Set the Preferred address as 8.8.8.8
    •    Set the Alternate address as 8.8.4.4
    •    Click Apply twice to confirm the change.
    •    Turn the printer Off and back On and see if the issue is resolved.
    Please post your results, as I will be looking forward to hearing from you. Have a great night!
    I worked on behalf of HP.

  • In ALV Report output heading is printing twice.

    Hi Experts,
    Im working on ALV Reports.
    Im printing header text by using listheader and commentary write function module.
    the problem is when i sort any column in ALV ouput the heading is printing twice.
    Again if i sort the column the heading is printed is 4 times.
    so if anybody knows the solution how we can avoid repetition of heading ,
    Please reply me as soon as possible.
    regards
    Imrangs.

    Hi Noorie,
    Thanks a lot.
    Your answer is perfect.
    Bye.
    Regards,
    Imran

  • Dunning Letters printed twice for the each Dunning number.

    Hi,
    Dunning letters are printed twice with the same Invoice & Details and sent to the customer.
    could you please let me know why the Dunning letter has benn printed twice? We need to give change any Profile options on printer side or in Adv collections?
    Please suggest.
    Thanks & Regards,
    Bhanu prakash

    Hello Bhanu,
    Is this dunning process has customized. If this is customized please check the end to end setup.
    Regards

  • Can't print over network get message "Error Printing" in message Queue

    Hi,
    I have 3 machines, xp, vista and windows 7.  I have 2 printers that are configured to print through the network
    1. OfficeJet Pro L7680
    2. PhotoSmart C7180
    For all 3 computers I can go to the web configurations for the printers (so I know the network settings are correct).  Windows finds the printer and properly installs the drivers using the TCP/IP network port.
    I can only print to the PhotoSmart from the Vista computer.  I can't print from the XP or Windows 7 machine, I can't printer to the OfficeJet Pro from any computer.
    Both printers work on all computers via USB port.
    when I try to print a test page the job stays in the print queue and gets a message "Error Printing".
    The funny part is that the computer can communicate with the printers and get the ink levels no problem.
    I have been banging my head on the wall and cannot figure it out.
    Any Suggestions?
    Thanks,
    Ara

    I think I figured it out after torchering my self for weeks.
    I had my computers and printers hooked up directly or wireless through a linksys WRT610N router.  I decided to add a linksys switch right after the router and plugged the computer and printers in through the switch and now it works.
    This is very strange, there must be somekind of incompatibility with the WRT610N router that is causing the problem, it works but refused to print for some reason.  I tried changing settings in the router but haven't got it to work.
    Any clues on what it could have been with the router?
    Thanks,
    Ara

  • Error printing with Windows 7 even after unistallin​g old and installing new driver

    I recently updated to 64-bit Windows 7 and cannot get my HP OfficeJetJ4580 working after the upgrade.  I uninstalled all prior printer drivers and ran the recommended software from the HP site to ensure there were no remaining drivers on my system, then installed the updated drivers for use with WIndows 7.  The driver isntallation said it was successfula dn that my printer was ready for use.
    When I try to print, the job is sent to the print que.  The print que immedialtely notes "Error printing" and deletes the job from the que.  The printer never responds or tries to print.  This happens with anything I try to print, including a test page.  No error message is dispalyed on my screen.  The only way I can see the error is by opening up the print que and looking at the pending jobs.  I went to the HP support center and downloaded and ran the printer diagnostic sofware they had on there.  It could not detect any problems with the printer. 
    I am at a complete loss as to what to try next.

    Hello PPN, and welcome to the HP Forums, I hope you enjoy your experience!
    I see you are running into installation issues.  I would like to help.
    I would suggest Uninstalling the Printer Software.
    Once it is uninstalled, I'd recommend putting your system into clean boot mode within the Microsoft configuration.  You can do so by following this document: How to perform a clean boot in Windows.
    After the computer has been put in clean boot mode, I would suggest reinstalling the HP Printer Install Wizard for Windows.
    Good luck and please let me know the results of your troubleshooting steps. Thank you for posting on the HP Forums!
    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 right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

  • Activation error: Printer not activated, error code 20

    I have had my officejet 4215 all-in-one printer well over a year and it has connected and printed whatever I wanted.  Yesterday when I wanted to print an email it would not and the following box popped up: Activation error: Printer not activated, error code 20.  Then the next box that popped up said: Printer Error  An unknown error occurred while printing.
    If I copy the email over to a Microsoft Windows page, then i can print it fine.
    Any idea how to fix this so I can print email's like I used to?
    Rey

    What operating system?  What email program are you trying to print from?
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • HP LaserJet Pro P1102w printer "Ready" for wireless printing, but gives "error -- printing" message

    This P1102w printer was configured for wireless printing from two computers (WinXP and Win7), both with a network sharing designation, and all functions worked perfectly:
    Printing from the WinXP computer directly, and from a networked Win2K computer as a guest.
    Printing from the Win7 computer directly, and from a networked Win2K computer as a guest.
    Windows Printer Test Pages were printed from both installed computers, showing correct computer names, the printer name, Port names (IP addresses), Data format (IMF), Driver information, etc.
    Several days later (after new boots), the WinXP computer showed printer status as being "Ready", along with the correct printer "Type" (HP LaserJet Professional P1102w), "Where" (IP address), and "Comment" (network printing).  When a print job was submitted from Microsoft Word, the control-panel printer window first showed the message "printing", and then the message "error -- printing".  Nothing was printed.  The same results occurred when a print job was sent to the WinXP computer from the networked Win2K computer.  HP’s troubleshooting routine did not identify the error, its cause, or what can be done about it.
    Successful printing continued, as before, from the Win7 computer directly, and from the networked Win2K computer to the Win7 computer as a guest.
    The printer’s blue “i” network indicator lamp is lit, and all three computers continue to communicate through the hub to each other and to the Internet.
    HP’s printer installation program was executed on the WinXP computer, using the “fix” option, but nothing changed.  The installation program was executed again on the WinXP computer, using the “new install” option (without removing the existing P1102w installation); the “browse” function saw the network, but no printers were found, and the installation could not be completed.
    This is very perplexing.  Any suggestions?
    PS:  The same problem occurred once before, and it was fixed by resetting factory defaults on the printer, hard wiring the printer to the WinXP computer through a USB cable, re-installing the printer’s wireless settings from HP’s installation disk, and repeating all of the networking and sharing setups on all three computers.  This is a lot of work that is not worth repeating, because the successful results have not been permanent. 

    To:  Neonskeleton,
    Thanks for your response -- especially because you are an HP employee!
    My Win2k machine does not use HP software, nor communicate to the HP printer.  (HP did not write a Win2k driver for the P1102w -- and evidently no one else has done this, either.)  My WinXP and Win7 machines use their HP drivers to send print jobs to the P1102w wirelessly, and both machines have the P1102w set up as a shared printer.  Then, when I connect to those machines as a "guest" and submit a print job to those machines, those machines receive the print job and then communicate with the printer using the proper installed printer drivers.
    Everything worked great with this configuration, until suddenly the printer was no longer responsive to ANY jobs coming from the WinXP machine, even though there was a "printer ready" indication on the WinXP machine, and even though the printer responded perfectly to print jobs coming from the Win7 machine.
    When I tried to "fix" the WinXP setup by running HP's setup program on CD, nothing changed.  Then, when I tried to reinstall the WinXP setup for wireless printing, the program insisted that I reset THE PRINTER'S factory defaults and proceed using a USB cable -- even though I wanted to simply ADD the computer for wireless communication to an existing networked printer!  I would conclude that something screwed up the printer's inner settings (maybe an unsolicited and invisible HP update sent to my printer from the Internet?).
    As I mentioned in my original post, I went through this process once before, reinstalled everything on all machines, and all was well.  Until THE SAME non-recognition problem surfaced again!
    I do not want to spend any more time on this.  I went to Staples and bought a second P1102w printer (it is a nice little machine that uses a xerographic cartridge, rather than costly inkjet cartridges that frequently plug up).  I'll use a USB cable for the connection, rather than the installed wireless feature, and set up the P1102w as a shared printer.  I expect that all of my other computers will be able to link as a "guest" through the wireless hub and be able to print.
    Thanks again.
    PS.  I am a retired computer-systems manager from Northrop Grumman. 

  • Hp officejet pro 8500a - get "error - printing" on all documents

    Quick history:
    Both my laptop and my printer HP Officejet Pro 8500 A910 have been working happily for months, with wireless connection via Belkin wireless hub.
    > Had printer jam errors - so just replaced printer under warranty - completed set-up - printed test pages - wireless connection ok (did wireless test report, albeit signal quality "Very low", but has always been like that and worked in past.)
    > Printing word document - just generates error "Error - printing" and stays stuck in queue.
    Anything else that has happened in interim ...
    > I have installed LiveDrive in the interim to back up all my files on the cloud - works in the background. Can't imagine it's relevant?
    > Any help greatfully received, driving me mad!!
    Neil

    Hi Rossainz,  I don't know that I can answer 'what is wrong with it', but I would be happy to help you figure it out and better yet, resolve the issue. Let's first try leaving the printer on and unplugging the power cable out of the back. Leave it unplugged for a full minute during which time you can hold down the power button for just a few seconds to help release and build up power, then plug the power cable back in.  If the issue persists, please let me know and we will see what other solutions might do the trick.

  • Data printed twice on the next  page in smartform

    Hi all,
    I ahve created  a smartform where I  print the header details at the start and then below that details for all line items for a particular document.
    so i have data ;ike :
    Header data :
    field 1 : field 2:
    Field3 : field4:
    field5: field6:
    Item data :
    field1 field2 field3 field4 --> Item 1
    field1 field2 field3 field4 -->Item 2
    field 1 field2 field3 field4 -->Item3
    For the Header data,I use a template in a secondary window.
    However for the item data,i use a table in MAIN window (As i know the no of records only at runtime).Also another reason for usng table would be that I dont need the header on each flloowing page but only the Line item details on the following pages.
    Now i have created a second page with only the MAIN window from the First page as I need only the  remaining line item details  to be continued/printed on the following pages.I have actually copied the MIAN WINDOW from the first page to the second page adjusting only the  uppe rand left margin.
    However now when i see the rpint preview.the 1st page data,is printed corrrectly.however on the 2nd page,the 1st record is printed twice.
    Can anyone explan why is this happening?
    Thanks!

    Thanks for the replies.
    @Meghanandan,
    I dont want to set any command for going to next page as I dont have any condition to go ot next page.Im setting the width of the first page main window to print sufficient data.
    @satyajit
    I have the text elements under the MAIN AREA.Cna you pls elborate which Points i need to check undre the table node which might have been unnnecesssarily checked?
    Thanks again for your time.

  • After 9.3 update getting error printing to Adobe PDF while converting from Powerpoint to PDF

    That happened after upgrading Acrobat Pro 9.1.2 to 9.2->9.3 on Windows XP sp2 platform. Converting from other Microsoft Office 2003 products is totally normal(Excel, Word) Did anyone came accross and know how to fix that?? We have many users with exactly same issue.

    thanks...figured out my problem!
    Date: Wed, 3 Feb 2010 12:24:29 -0700
    From: [email protected]
    To: [email protected]
    Subject: Re: After 9.3 update getting error printing to Adobe PDF while converting from Powerpoint to PDF
    What happens if you try to print to the Adobe PDF printer?
    >

  • Duplicate entries in Table T5UGJ - Garnishment notice letters printed twice

    Hi Experts,
    We have a scenario where duplicate entries have been created for an employee in the table T5UGJ. Hence when the notice letters were printed, they printed twice.
    Would there be any specific reason or any master data change in IT 0194 / IT195 which would trigger a duplicate entry in this table?
    Any information is highly appreciated.
    Thanks,
    Dipesh.

    Hi Arti,
    Please find my responses below :
    1. The employee has two different Creditor garnishments, one dated for June and second for July.
    2. The duplicate notice letters are printed for second garnishment
    Thanks,
    Dipesh

  • Need  to show three diff sheets in a smart form , first to be printed twice

    Hi
    I need to show data in a smart form where I have 3 different sheets
    •     Process order request
    •     BoM
    •     Assembly
    where the first sheet will be printed twice .
    as header in each case we have order no , produced material order qty , qty produced etc with the title changing for each sheet . main window we have diff data depending on each form like it will b changing for process order req, bom , assembly .
    how to do that & I need to print each layout in 2 diff language.
    plz help.
    useful answers will be rewarded.
    Thanks

    Create three pages . The first and the last are static and the second variable.
    The first page repeat with a loop twice. The headers of the second pages and next has a window static (the header) and other variable .
    If you have two languages repeat the operation. Call the smartform with a parameter called language by example

Maybe you are looking for

  • The installer disc could not be found bootcamp mountain lion

    Hi, Got a small problem when i'm trying to install Windows 7 (Downloaded from MSDN) Dual boot is giving me an error message 'the installer disc could not be found bootcamp mountain lion' I burned two DVD-r's 1. http://cl.ly/image/0u3M3m1m3V0B 2. http

  • Copy line item text in all line items

    Hi My requirement is during transaction, if long text entered in one line item the same taxt should copy to all line item by default. if user want to chane the same for particular line item, it should be changable. Is it possible?. If yes, please rev

  • Cannot connect to the store

    Anyone have any ideas of why my ipod touch would be saying "Cannot connect to the store A secure connection could not be established. Please check your Date and Time settings." I have checked my date and time settings and they are correct, but it sti

  • Identify tablspace in create table as select

    I am trying to run a create table as select query that specifies which tablspace to create the table in. When I run the query below I get an error, any ideas? create table roi_call_record_backup as (select * from prod.roi_call_record) tablespace roi_

  • How to use StreamTransformationException in user-defined function?

    Hi, I'm doing a DBLookup (using Java pgm in one of my Imported Java archives) for populating one of the fields in message mapping. If the DB connection fails, I want to terminate the mapping by throwing a StreamTransformationException from within a u