Unexplained Issue with working with ActionMessages.

All,
BACKGROUND:
I have a simple Struts application that is connected to MySQL. In one of my Actions that calls a method that accesses the database, I'm handling the SQLExceptions by catching the exception and storing (as strings) the error code and message into two bean properties (both properties have the appropriate getter/setter methods) and the bean is passed back to my "calling" action:
...catch (SQLException ex) {
beanname.setCaughterror(Integer.toString(ex.getErrorCode()));
beanname.setCaughterrormessage(ex.getMessage());
return beanname;
Now, I can create a scenario where I create a SQL Exception by inserting a record that duplicates the primary key. This creates the exception code 1062 (Duplicate Primary Key error) in MySQL.
Once back in the action code, I now have a bean with the error code and message. I then add these two pieces of information to the Action Messages object with the following code:
ActionMessages messages = new ActionMessages();
messages = MyExceptionHandler.handleMyErrors(messages,beanname.getCaughterror(),beanname.getCaughterrormessage());
saveErrors(request, messages);
Now the MyExceptionHandler.handleMyErrors looks like this:
public static ActionMessages handleMyErrors (ActionMessages messages,
String errorcode,
String myerrormessage) {
if (errorcode.equals("1062")) {
messages.add("myerrortext", new ActionMessage("myerrortext", myerrormessage));
return messages;
My ApplicationResources file looks like this:
myerrortext= The system generated error message is noted below: <br> {0}
ISSUE:
The error message prints out correctly; however, at any point in time, whenever I try and print the error message itself, (either by displaying the bean property value in my JSP page via ${beanname.caughterrormessage} or by saving it to a string String ttest = beanname.getCaughtErrorMessage()) it comes up null. Can anyone explain why that is happening this way? I can't for the life of me figure out why it displays in the ErrorMessage, but it appears to be null if accessed directly.
Please Help.

Problem Solved.
The error messages from MySQL can contain single quotes in them and have to escaped out before writing to the Log4j logger.

Similar Messages

  • I just restored my 13" MBP i5 at the apple store to the newest version of Lion after issues with a previous Time Machine backup from Snow Leopard- this time I created a new account and just ported files and folders, and now MS Office doesn't work. Help?

    I just restored my 13" MBP i5 at the apple store to the newest version of Lion after issues with a previous Time Machine backup from Snow Leopard- this time I created a new account and just ported files and folders, and now MS Office doesn't work.
    ^^ that's the main problem. Here's the full history.
    I bought a new 13" i5 MBP, early 2011 edition. I had an old white Macbook 2.14 ghz core2duo on Snow Leopard. I attempted to port over my time machine backup, but encountered problems in that my User was inaccessible from the new computer after the import finished, and I had to go in and change the root password, etc, and for some reason or another, I couldn't install any programs at all from that administrator's account. By "couldn't" I mean I could install them, but upon installation they would never boot. So, I took it to the apple store and did a clean install from the most up to date Lion OSX. Then, I created a brand new admin account, instead of trying to import the old one, and things seemed great. Then, I just imported my old files from the TM backup, but not any system settings, permissions, or user data. Just my Docs, pics, vids, apps, and itunes stuff.
    Here's where things get weird again. I imported this stuff under the name "old", but all of these folders have a red negative sign on them, marking them as restricted. So, from my main admin account, I cannot even peruse these folders. Since I didn't import user data, I can't sign in to the "old" account to change permissions. I already tried to change the permissions from system preferences, but that didn't change anything. And now, for whatever reason, of all the apps that were imported then, MS Office is the only set of apps that does not work. When I click on it, it just says there was a problem and asks if I'd like to send a report to apple. I tried reinstalling it to no avail. I'm an English student, so i really need access to Word. Can anyone help? The Apple store is a major detour for me and would like to fix this issue myself.

    Most likely you have Office 2004 which are PPC-only applications and will not work in Lion. Upgrade to Office 2011. Other alternatives are:
    Apple's iWork suite (Pages, Numbers, and Keynote.)
    Open Office (Office 2007-like suite compatible with OS X.)
    NeoOffice (similar to Open Office.)
    LibreOffice (a new direction for the Open Office suite.)

  • Tap to click not working properly in Mountain Lion. How do I get apple to fix this major issue with mountain lion?

    The tap to click does not work with mountain lion as it did before the mountain lion install. I purchased a brand new imac in August of 2011 and got a wireless keyboard and selected the wireless trackpad instead of a mouse.  The trackpad worked wonderful pre upgrade with tap to click. Now after the install of the newest beast, I have to actually press the trackpad rather than a slight tap. I have carpel tunnel and this is causing great stress upon my hand. How do I get apple to fix this major issue with mountain lion?

    Perhaps, I was not clear enough.
    I have an imac purchased in Aug. 2011 which came with Lion 10.6 (two uprades before mountain lion)
    Recently, I just purchased a macbook pro retina with Mountain Lion
    On my imac, my settings allowed me to "tap to click" everything EXCEPT the initial log in at the star up of my imac, again running Lion 10.6
    On my macbook pro retina which has Mountain Lion, I set up the "tap to click" option, but notice that a "hard" click was neccessary when trying to click things. I thought this was a macbook thing (my first one) so I went and upgraded my imac to Mountain LIon, BIG MISTAKE! Now both my imac AND my macbook only have limited "tap to click" options. Before mountain lion I could "tap" to highlight and select text, tap and drag, and many other thiings that Mountain Lion has disabled.
    I am truly surprised that no one has noticed this MAJOR issue.
    Is there a way to uninstall this update, similar to how on a PC you can go back to a restore point.
    On another note even the way PREVIEW has changed is less user friendly, there used to be icons on the bottom right corner of the screen, now I have to double tap and select the option I would like to switch between contacts and thumbnails. This is really annoying and is causing me time when reviewing files.
    Just in case anyone was wondering, I did go to system preferences -> trackpad -> select tap to click
    In fact almost all of the trackpad functions have been selected.

  • I am having major issues with links in keynote! Even though the links (a navigation system) are on the master page, they are only working on some of my slides. Anyone have ideas on how to fix this or similar issues? Help!

    I am having major issues with links in keynote! Even though the links (a navigation system) are on the master page, they are only working on some of my slides. Anyone have ideas on how to fix this or similar issues? Help!
    I have created a navigation system on the master pages and set the presentation to links only mode. I also have other links scattered throughout the program, like a linkable table of contents, etc. Some of them work, some of them don't. Not sure why. Anyone out there having similar issues? Or have any idea on how I can solve this issue? Any help would be appreciated!
    Thanks!

    Links should not create any problems in Keynote.  If they are set up correctly on text, the text will be underlined. Objects that have links will have a curved arrow bottom right, if you click the arrow a popup will display the link information.
    Try this repair for Keynote,  ensure you complete all the tasks and in the order shown:

    delete all the iWork applications if you have them, not just Keynote, using Appcleaner from Mac Update, its a freeware application

    empty the trash:  Finder > Empty Trash

    Shut down your Mac, wait 30 seconds, then power on the Mac, immediately after the start chime, hold down the Shift key
    When you see the grey Apple symbol and progress indicator (a spinning gear), release the Shift key.
    If you are prompted to log in, type your password, then hold down the Shift key again as you click Log in.
    4  
    Let the Mac fully boot up, it will take longer as the OS is repairing the drive

    when fully booted, go to Applications > Utilities > Disc Utility; click on the boot drive then First Aid tab and click  repair disc permissions

    when complete, restart the Mac normally, Apple menu > Restart

    install Keynote from the Mac App Store
    let us know if this helped

  • I downloaded CS6 and am having issues with my print driver. It is not compatible with the HP 2600n and have tried to download drivers given to me by adobe ( (Jupiter 3) but it is not working. after a few days. Its a temporary fix and is still looking for

    I downloaded CS6 and am having issues with my print driver. It is not compatible with the HP 2600n and have tried to download drivers given to me by adobe ( (Jupiter 3) but it is not working. after a few days. Its a temporary fix and is still looking for the HP driver when i boot up. It also will not save in any print or postscript format. Does anyone know how to fix?
    Currently use a Mac with the latest Mavericks 10.9.4

        Oh boy! Acting kind of weird seems to be an understatement, aquaequus!
    What type of troubleshooting were we able to do with you? I want to make sure that we can get some sort of resolution for this problem.
    It is quite possible the battery door may get your phone in working order again. I'm not sure if the store has it in stock, but it is available in our warehouse for $14.99 which can be ordered via customer service.
    Tamara H.
    Follow us on Twitter @VZWSupport

  • Issues with itunes error -50, determining gapless playback, missing speaker options, home sharing not working

    In the last few weeks I have been experiencing multiple issues with my iTunes.
    I believe it began when my itunes library corrupted and I had to start again.
    By starting again I mean I went to previous itunes libraries and used the most recent backup.
    After I noticed a large number of unknown error (-50) messages I thought I better copy the backup I was using from the previous libraries folder over to the itunes folder (in case the error related to failed attempts to back up the library).
    This problem in itself wasn't too bad as I am able to close and relaunch iTunes and carry on however I have noticed some less desirable side effects - the loss of home sharing. I am unable to pick speakers to broadcast to (I have 2 airport express units plugged in and working and an Apple TV2) and I am unable to access the iTunes library on Apple TV.
    I've done some basic troubleshooting: creating rules to allow the home sharing ports, temporarily disabling antivirus/firewall, uninstalling antivirus/firewall, setting up rules on the router for homesharing ports, uninstalling iTunes, rebooting, reinstalling iTunes and retrying, disabling home sharing and reenabling, disabling peerblock, deauthorising itunes and reauthorising and rebooting both the pc and Apple TV, checking sharing settings under preferences and verifying both the entire library is shared and that the status of home sharing is on but no devices connected, created a new library and reimporting my media and the problem still exists.
    I noticed that occasionally when I switch between libraries, deauthorise and reauthorise I do get access to home sharing and Apple Tv gets full access to the library BUT iTunes quickly becomes unresponsive and when I close and relaunch Apple TV can no longer see my library or iTunes.
    I have checked the network I am running on is marked as a home network, I have tried connecting the Apple TV via LAN instead of WiFi but this makes no difference. What I do find interesting is that I have iTunes running on another pc and on a virtual machine and as soon as I run either their libraries appear on Apple TV so there must be something about the installation on my pc and nothing wrong with the Apple TV, airport express, router etc.
    With that in mind I retried an uninstall and this time deleted as many tmp files as I could see in the iTunes library folder, rebooted and reinstalled. I also checked the permission levels on the iTunes application folder and the iTunes library folder (located on an additional internal drive), I then tried running iTunes as an administrator (which my user account is already set as) but all the problems are still evident.
    The determining gapless playback has no effect on how I use iTunes but it clearly does not need to run for every single recently added track any time I make a minute change to other library entries. I tried looking up one of the files it was determining gapless playback for but it wasn't corrupt or read only so I don't see why it needs to retry continually.
    I'm running Windows 7 64bit with all latest updates installed and iTunes 64bit 10.6.3.25, all apple devices are running the latest version of firmware and I'm running out of ideas. I did try running CCleaner to clear up and registry issues if there were any and I ran Appcleaner to remove any iTunes cache that may have been left between installs. I'm running out of ideas - what am I missing here?

    I have found the problem was in part caused by Windows firewall.
    Exactly how Windows firewall can cause the problem when I wasn't even using it I don't know.
    What I do know is that when I checked 'allow a program through the firewall' I found 4 rules set for iTunes, one of which was public network access.
    I deleted the superfluous rules and the Home Sharing problems are solved.
    All that needs sorting now is the 'determining gapless playback'.

  • I have installed the agent 10 or 15 times and one installation hasfailed, no error appeared during the installation but I am havinginconsistent issues with my ethernet card not working here and there. Werebooted and can log into Novell client but th

    I have installed the agent 10 or 15 times and one installation has failed, no error appeared during the installation but I am having inconsistent issues with my ethernet card not working here and there. We rebooted and can log into Novell client but the login prompt did not appear for ESM client or the icon was not in the systray. Everything seems to work, besides at times (a couple times today) it terminates his ethernet card/connection. I would re-image his computer but he has several applications and it would take several hours, so I am hoping someone has an idea to fix this issue. So I was trying to figure out why he did not get the prompt to login and why it's not in the systray and it appears to not have completed the install? I checked the add/remove programs, its not listed within their, I also checked the registry and found nothing for endpoint within their, but the files are within c:\program files\novell\zenworks endpoint security.
    I have also tried uninstalling it but that fails due to it "not being installed", and it will not reinstall over itself either.
    I did notice that stuninstdrv.exe is running in task manager. Any help would be great...
    Windows xp sp3
    ESM 3.5.154
    Thanks,
    Andy

    If you are searching the registry, check for the "Senforce" string. It should be at HKLM\Software\Senforce
    Try running the install program for the ZSC with the following command line:
    setup.exe /V"STUNINSTALL=1"
    If you've specified an uninstall password, try this one instead:
    setup.exe /V"STUNINSTALL=1 STUIP=password"" (please note the double quote at the end)
    Let me know if that helped you.
    Daniel
    >>>
    From: Andy_DeWees<[email protected] du>
    To:novell.support.zenworks.endpoint-security-management
    Date: 2/5/2009 12:52 PM
    Subject: I have installed the agent 10 or 15 times and one installation hasfailed, no error appeared during the installation but I am havinginconsistent issues with my ethernet card not working here and there. Werebooted and can log into Novell client but the login prompt did not appearfor ESM client or the icon was not in the systray. Everything seems towork, besides at times (a couple times today) it terminates his ethernetcard/connection. I would re-image his computer but he has severalapplications and
    I have installed the agent 10 or 15 times and one installation has failed, no error appeared during the installation but I am having inconsistent issues with my ethernet card not working here and there. We rebooted and can log into Novell client but the login prompt did not appear for ESM client or the icon was not in the systray. Everything seems to work, besides at times (a couple times today) it terminates his ethernet card/connection. I would re-image his computer but he has several applications and it would take several hours, so I am hoping someone has an idea to fix this issue. So I was trying to figure out why he did not get the prompt to login and why it's not in the systray and it appears to not have completed the install? I checked the add/remove programs, its not listed within their, I also checked the registry and found nothing for endpoint within their, but the files are within c:\program files\novell\zenworks endpoint security.
    I have also tried uninstalling it but that fails due to it "not being installed", and it will not reinstall over itself either.
    I did notice that stuninstdrv.exe is running in task manager. Any help would be great...
    Windows xp sp3
    ESM 3.5.154
    Thanks,
    Andy

  • Anybody had an issues with mail since upgrading to mountain lion? Can't get emails from one account, tried deleting and recreating but to no avail. Set up a new user and it works fine. Macbook pro 13" mid 2010 model.

    Anybody had an issues with mail since upgrading to mountain lion? Can't get emails from one account, tried deleting and recreating but to no avail. Set up a new user and it works fine. Macbook pro 13" mid 2010 model.

    Anybody had an issues with mail since upgrading to mountain lion? Can't get emails from one account, tried deleting and recreating but to no avail. Set up a new user and it works fine. Macbook pro 13" mid 2010 model.

  • Since updating my iPhone 4 to iOS 5.1 I'm having compatibility issues with my speakers and my iTunes wifi sync isn't working. Anyone else having the same problems?

    Since updating my iPhone 4 to iOS 5.1 I'm having compatibility issues with my speakers / docking station and my iTunes wifi sync isn't working. Anyone else having the same problems? Both worked fine until the update...

    Okay. I got it working again by setting it up as a new phone instead of just syncing. Then I backed up. All is good today.

  • Issues with Yosemite, can I downgrade to Mavericks or Mountain Lion and downgrade Apple Apps to work with older OS X

    Hi
    I am having several issues with Yosemite, mainly disappearing folders (title / name) but no folder or more importantly no previews of .mov or other video files nor unable to open them.  I have years of these files that I want to edit in FCP X.
    I have upgraded all my Apple apps so they now work in 10.10.2, but I want to revert back to Mavericks as a second partition for video work.
    Is there any way I can reinstalled an older OS and downgrade my Apple apps like FCP X and Aperture so I can open, edit and produce dvd / bluray of these files.
    Thanks in advance
    Matt

    Thanks perermac87. I'm can make a second partition on ssd for mavericks as plenty of space, but final cut x 10.1.4 I have now needs Yosemite to open. So how can I also download older versions of my apps from the App Store?
    urbkuhl I live in the uk with fibre too and downloaded 10.10.2 in under 10 mins

  • HT202008 I am having issues with my Window 7 on boot camp. My hardware is Macbook Pro Mid 2010 model and working on OS X 10.9.5. Recently I went to windows 7 to do a system upgrade but failed and was told to update the bootcamp drivers.

    I am having issues with my Window 7 on boot camp. My hardware is Macbook Pro Mid 2010 model and working on OS X 10.9.5. Recently I went to windows 7 to do a system upgrade but failed and was told to update the bootcamp drivers. I installed boot camp5 but seem to be the wrong version and change to boot camp 4 which was updated okay. However I still cannot do the updates. Can someone advice me please? Thank you!

    Please see Boot Camp: System requirements for Microsoft Windows operating systems - Apple Support for the appropriate version of drivers related to the specific version of Windows 7.
    MacBook Pro
    (13-inch, Mid 2010)
    4
    4
    DVD
    DVD
    DVD
    MacBook Pro
    (15-inch, Mid 2010)
    5
    5
    4
    DVD
    DVD
    DVD
    MacBook Pro
    (17-inch, Mid 2010)
    5
    5
    4
    DVD
    DVD
    DVD
    Be careful with Windows Updates, especially driver updates. Standard WHQL drivers can cause problems.

  • Strange issue with external monitor, only working when external speakers plugged in (using Thunderbolt to VGA adaptor)

    Hey – I am having a very strange issue with my external monitor; where it only works if my external speakers are plugged in and connected.
    I am using a late 2011 Macbook pro, running Mavericks 10.9.4, along with an MBox 2 (USB Audio Interface), and two powered speakers (KRK Rokit 5). This setup has had no issues. I have just acquired an external monitor (Benq T2200HD), which I am using with a thunderbolt to VGA adaptor (a cheap Chinese knockoff adaptor).
    To start - I plugged the monitor in with the thunderbolt adaptor, and it powers up and works fine. However, there is a nasty buzz coming from the speakers. I did some research and it looks like a simple ground loop issue. I did a bit of troubleshooting, and this is where things get weird.
    What I found is - If I unplug the MBox, the monitor loses signal from the computer (displaying ‘No Signal Detected!’). Further, if I keep the MBox plugged in, however unplug both the cables from the MBox to the speakers, the monitor loses signal. It doesn’t matter if the speakers are turned off, however they need to be plugged in (or the monitor loses signal). Weirder still, I can unplug the MBox, however the monitor will work if I plug in the speakers through my macs headphone jack.
    Simply put, the monitor only works if there is a direct connection between the computer, the speakers, and the power source.  What is going on here? Is the monitor grounding through the computer port, to the speakers (I don’t know how this works, is this possible?). Could it somehow be the cheap VGA adaptor I am using?
    Some other information:
    - Everything is plugged into the same multi-box for power. I have tried plugging things into separate sources, and the result is the same.
    - If I unplug the thunderbolt adaptor, then the speaker noise disappears straight away.
    - The ground noise doesn’t appear in my headphones, which are plugged into the MBox.
    Any information would be great – am I missing something here, or is this genuinely weird?

    Well, I went back into Best Buy to test on 3 other laptops (2 Asus, and their floor model for this Sony). It seems to be doing the same problem so at least I was able to rule out broken hardware issue on my particular laptop.
    Here's what I did to test:
    Since I couldn't really install Adobe Premiere on their machines, I used the DVIO software (http://www.carr-engineering.com/dvio.htm) and a 5 min clip I captured.  I transferred onto their machines, hooked up my Sony D8, and attempted to play the video.  It would play for 15 seconds and then stop and jitter with a loud noise (like it does on my laptop).  I even tried changing each machine's firewire driver to the legacy one and same results.  I pulled a brand new 4 pin to 4 pin firewire cable off their shelf and still the same problem.
    I think I've nailed it down to Win7x64 bit Home Edition not playing nice with Firewire driver.  Very annoying.  I can't find any concrete evidence of this from other users on any of the forums that have my particular problem, but from my own testing, it's all I can conclude.
    I have 2 other things I can try:
    1.  Opening the laptop and looking at the firewire to maybe find appropriate driver (ugh, I don't want to have to open this thing up).
    2.  Upgrading to Win7x64bit Pro and possibly testing with XP on the new MS Virtual PC (http://www.microsoft.com/windows/virtual-pc/).  I can't do it with my Home edition apparantly.
    Who needs to view video on an external TV anyways....sheeesh...(scarcasm).
    Tim

  • Issue with a work order

    Hi Team,
    I am having an issue with the work order having multiple line items for the same component. Out of all line items it is showing error for two line items mentioning,
    No status object available for CMP 81411471 0160 0110
    Double clicked on it msg no displayed BS.001
    Please help on this issue, Thanks in advance.
    Regards
    Nivas

    Are you using Work Clearance Management?? Please provide the detailed error message, if any.
    67826 - Restoring the status for orders RIORDST1
    http://scn.sap.com/thread/3209398
    Check the above details.

  • Issue with Reminders not working when setting it to arrive or leave a location in iOS7.

    Hi all,
       Tried everything: Called support and reset All setting.  Made sure all "location settings" are set.  Restored via iTunes as a new phone, checked all setting again, set a reminder to remind me to get gas when I leave my home, and it never reminded me.  Also, doesn't remind when I arrive at a location.  I have tried this with my wifes phone (iPhone 5) and my daughters (iPhone 4) all running iOS7 and it doesn't work.  I never had this issue with iOS6. All other locations services like GPS, maps, & weather working fine.  I strongly believe it's a iOS7 bug. Has anyone else experianced this issue?

    In case you haven't seen this thread:
    https://discussions.apple.com/thread/5329723
    Jump to page 5. There is a solution by ben812 that initially worked for me, but after restarting my phone I was back to square one.
    I visited the local Genius Bar, and they claim they have not heard of this problem. Whether that is true or not, they know now. One of the employees confirmed that WiFi would need to be on, as the location service checks it first (before using GPS). Seems like a bug, but for now having WiFi on and leaving Reminders running in the background seems to solve the issue.
    I hope Cupertino addresses this in an upcoming iOS release.

  • Issue with Work Items for a User

    HI All,
    I have an issue with workflow.
    One of my user stopped receiving work items in his inbox. I checked table SWWUSERWI and found 0 entries for the user. So i guess there is no problem with the display setting in SBWP.
    What could be the probable reason and where can i find if those workitems that are generated for him that he has not received.
    Regards,
    Rohit

    There can be many many reasons. You need to understand the workflow and work with an example (an item the user says they should have received). Then try to follow the agent determination logic based on the data contained in that example and verify that everything matches up.

Maybe you are looking for

  • Currency Valuation G/L Account Balance Sheet Posting F.05

    Hi all, Is there a way to post the Currency Valuation F.05 for G/L account balance sheet posting to another account than itself. I cannot find any configuration on that, and a trace look to show that it goes back to SKA1, SKAT & SKB1. Open item have

  • Which cables are needed to connect macbook 13" to HDTV

    Hi, was wondering which cables i needed to connect my 13" aluminium macbook to a samsung HDTV. There's so many on the apple store, not entirely sure what I need. Any help would be appreciated. thanks

  • Can't Open Video Files from Desktop or Finder

    Hello, I am faced with the current error. Whenever I try to open a video file (such as MP4) from the desktop or Finder by double-clicking it, I am faced with the following error: However, when I open the file directly via Open File in Quicktime Playe

  • Only access to Safari. How?

    Hello I need one application that blocks all services except internet browsing with Safari. I tested with the restrictions, but still have access to many applications and I want the user only has access to iPad Safari and Internet. Thanks for your he

  • PSE6 Unable to Open Saved JPGs

    After I save a photo which I have edited in this program, when I attempt to open the saved image from my computer, I am asked to enter my serial number.  When I do enter my serial number, it tells me that it is incorrect.  Now, clearly it is not the