How do we catch errors in Servlets?

Hello, i 'm using Servlets and JDBC.
i'm having a form.html where the user inserts data in the input fields.
It's a registration page.
I would like to check for possible user errors.
For example if the user has not typed anything in a required field like field "password", so the field is null.
I would like to inform the user that this field is null and he/she shall type in it again.
(I'm talking generally not only for a registration page but to any page that requires correct data)
*1.* Shall i use Javascript?
*2.* Shall i direct the user to an error page where the page describes the error, what the user has to do in order to correct it and direct him back to the previous page?
*3.* Shall i only use if/else?
I would appreciate if sm could give me some advice on this matter or post me some links related to catch errors in servlets.
Thanks, in advance!
Edited by: g_p_java on Jul 11, 2009 12:15 PM

Here is a possible approach to this issue:
* use javascript to validate all textfields on the form client-side every time the user clicks the submit button. If it fails, put a message in red next to the problem textfield describing what the problem is. Dont allow submit if there are validation issues.
* More than one validation may apply to a given textfield. For instance, the field cant be empty is checked before its checked for an invalid date.
* Check to see if its an invalid date format first (example: mm/dd/yyyy), then check to see if its an invalid date (non leap year for example).
* recheck all validation back on the server (necessary if user disabled javascript or a hacker bypasses your client side validation). Redraw the page and populate it, but put messages next to the problem fields as you did for javascript.
* The invalid date format and invalid date should pass if given an empty value since the its the empty value validation (if it applicable for that field) that is repsonsible for that test.
*since you will be applying this validation over and over again for all your JSP pages for this project and future projects, it may be a good idea to create reusable code for it. You may also research google for good approaches.
Your javascript code should be from a single javascript file that is included into each JSP page so it can be reused.
@see http://www.xs4all.nl/~sbpoley/webmatters/formval.html
* All textfields should be validated throughly so your database never gets bad data (data is king).
* common things to check for:
invalid date format, invalid date, empty textfield, invalid email address, invalid telephone number format, invalid zip code, etc, etc, etc

Similar Messages

  • How can I catch error in JheadStart lastest version

    Dear Forum I want to catch the errors in my Strut Action How can i do it, and then show in the in the component
    <messages>
    <messageBox id="messageBox" model="${data}"/>
    </messages>
    in my uix page. I want to Know how to use the model {data}
    Please help me Forum
    Thanks a lot.

    Christian,
    In the JHeadstart Developer's Guide, chapter 5, there is a section about the ADF Lifecycle phase "Report Errors". This section explains how errors are trapped and shown in the model{data} of a UIX page.
    So your own errors can be caught and transformed in the same way, if you either create a Struts ActionError or ActionMessage, or throw a JboException.
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • 10.6.8 wikiserver & QTKitServer: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.

    Hi Fellows,
    Since a couple of days I can't upload images and pdf's to my wiki anymore. What happens is that the image or pdf gets uploaded once and processed 3 or 4 times (I can find them in the corresponding /Library/Collaboration/ folder). But the image or pdf does not show up in the wikipage and throws up a server error message instead: There was an error uploading the file. Please try again.
    Stop/Start the wikid proces solves the problem shortly until after a couple of hours the problems start occuring again.
    On the server side I see this:
    Oct 10 08:08:37 myserver com.apple.wikid[41152]: Wed Oct 10 08:08:37 myserver.x.net QTKitServer[45631] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
    Oct 10 08:08:37 myserver /System/Library/Frameworks/QTKit.framework/Resources/QTKitServer[45631]: _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
    Oct 10 08:08:37 myserver com.apple.wikid[41152]: _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
    My questions:
    1. How can I catch errors / set breakpoint
    2. How can I make sure the QTKitserver can 'talk' to the windowserver
    Colocated productionserver with DNS, Firewall, iCal, Mail, MySQL, OD, Push Notification & Web + wikis
    Thanks in advance!
    the cat-tamer

    Ok, here is the culprit, not a solution sofar
    Safari 6 is breaking the upload mechanism of the Snow Leopard wiki server. They all end up in loops and gracefully fail and die after around 5 attempts.
    Gecko, Trident and Presto as well as Webkit based Chrome have no problem at all with uploading, just Apple's own Safari.
    Bug will be filed and will investigate more server side.

  • How to catch error in the Active Sync process

    Hi, we are using Flat File active sync to update IDM user attribute. Once IDM found matched record, it builts view. However, during this period, the the matched user is locked, for example. Then IDM stop processing this record then go to next record. How can I catch this error? In log file I saw error message but how can use workflow or other way to know the error? How can get ResultItem that contains error message during AS?

    Hi,
    I am doing the following....
    Assume a main workflow which calls many sub workflows ...
    1. Define two global variables as follows
    <Variable name='anyErrorOccured'><Boolean>false</Boolean></Variable>
    <Variable name='allErrorMsg'><s>Error..</s></Variable>
    2. In the all main and sub workflows, add an special 'Action' to check the errors after each Action
    <Action id='1' name='doSomething'>
    </Action>
    <Action id='2' name='checkForErrors'>
    <cond>
    <isTrue><ref>WF_ACTION_ERROR</ref></isTrue>
    set the anyErrorOccured variable to true
    Append a custom error message(hard coded) to allErrorMsg variable - error message may contain workflow name and in which action error occured
    </cond>
    </Action>
    3. Before ending the main workflow, if anyErrorOccured is true, then send an email to IDM administartor with allErrorMsg
    <Activity id='3' name='CheckOverallError'>
    <Transition to='SendOverallErrorNotificationToIDM'>
    <ref>anyErrorOccured</ref>
    </Transition>
    <Transition to='end'/>
    </Activity>
    Hope, this helps.
    Furthermore, I tried to catch the actual error trace from IDM using the following in each 'checkForErrors' Action and append all IDM error messages for email notification.
    <invoke name='getMessage'>
    <get>
    <invoke name='getErrorMessages'>
    <ref>WF_CASE_RESULT</ref>
    </invoke>
    <i>1</i> ???????
    </get>
    </invoke>
    But , it was not successful, as I could not extract the right error mesage at the right place from WF_CASE_RESULT

  • How to sort out error downloading perpetual license of the CS6 Design Standard for MAC: JRun Servlet Error 413  Header Length too Large?

    How to sort out error downloading perpetual license of the CS6 Design Standard for MAC: JRun Servlet Error 413  Header Length too Large?
    Just bought the perpetual license online - student-teacher version. Received email confirming my eligibility and followed all instructions to a 't', but still got this 413 error message, and cannot continue.
    Would anyone be able to help me?
    Or how can I get in touch with Adobe themselves?
    How do you get to the chat? I bought it with their help, but cannot remember how to get there again. Took me ages to find the chat.
    Cheers!!! Thanks a million! Any help is welcome!!!!

    Make sure you have cookies enabled and clear your browser's cache before you try downloading.  If it continues to present that error try using a different browser.
    As far as getting to a chat link goes, it can be hit or miss...  Start Here  If after selecting relevant responses you are unable to find a solution, choose "Still need help? Contact us." and the chat contact option.

  • How to programmatically catch the activeSync errors in identity manager 8.1

    Sun Identity Manager 8.1
    May I know how can I catch the errors thrown by activeSync during create/update/delete process and even errors before the activeSync process reaches to create/update/delete workflows (like errors when the user account is locked, it does not reach the update workflow) pro-grammatically and throw to notification process such as email.
    Your response will be highly appreciated.
    Regards

    I do this in 7.1 by using a workflow for my active sync processes. I'm sure it will be similar in 8.1. If you use a workflow rather than an input form you can set up a transition at top level of the workflow. This transition is used as an error checker which can move the workflow to an error handler section. The error handler can then do stuff like send out notices etc.
    Something like this pseudo code:
    <TaskDefintion...>
    <Extension...>
    <WFProcess...>
      <Variable .../>
      <Variable .../>
      <Transition to="Error Handler">
        <!-- your error checking here, notice it is not inside an activity but at the top level of the workflow -->
      </Transition>
      <Activity ...>
        <!-- Actions go here -->
        <Transition to="next"/>
      </Activity>
      <Activity name="Error Handler">
        <!-- Do things like send notifications out -->
        <Transition to="end"/>
      </Activity>
    </TaskDefinition>The top level transition (which checks for the error) is called between each activity so it's perfect as an error checker.

  • How to catch error

    In my application I want to cathc an error from mysql database.
    Does anybody know?
    Thanks in advance.

    You should be getting an SQLException
    But if you are really getting an error you can do
    try {
       ... throws an Error
    } catch(SQLException e) {
        e.printStackTrace();
    } catch (Error e) {
        e.printStackTrace();
    }

  • Error propagating servlet user to peer?

    Hello,
    We currently have a Windows 2003 Server 32bit running ColdFusion 8.01 with 3 instances named: cfusion, Instance1 and Instance2. Instance 1 and Instance 2 are clustered together and serving all our sites in IIS. We're hosting just over 200 sites with approx. 6-7 hits a second.
    ColdFusion is running with all the latest hot fixes and patches. The JVM is version 1.6_24.
    For a while now one of the instances in the cluster randomly  locks up a few times a month, fails to return pages and has high cpu usage. We'd normally just restart the instance and things would return to normal. It's bad to ignore things but it's only recently I've had a chance to look into the cause of these lock ups.
    Last night both the instances appeared to fail. We have an external monitor that hits our sites every 5 minutes to ensure they are still running.
    Scanning through the JRun logs at about the time we received our first monitor warning there are a bunch of what appear to be propagation errors on both instances.
    Logs from Instance1:
    22/03 07:10:14 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:16 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:17 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:18 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:20 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:21 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:23 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:23 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:24 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:24 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:25 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:26 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:26 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:26 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:26 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:27 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:28 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:28 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:10:29 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketTimeoutException: Read timed out
    22/03 07:17:43 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset by peer: socket write error
    Logs from Instance2:
    22/03 07:10:40 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset by peer: socket write error
    22/03 07:10:40 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset
    22/03 07:10:40 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset
    22/03 07:10:40 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset by peer: socket write error
    22/03 07:10:40 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset by peer: socket write error
    22/03 07:10:40 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset by peer: socket write error
    22/03 07:10:40 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset by peer: socket write error
    22/03 07:10:40 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset by peer: socket write error
    22/03 07:10:40 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset by peer: socket write error
    22/03 07:10:40 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset by peer: socket write error
    22/03 07:10:40 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset by peer: socket write error
    22/03 07:10:41 info Clusterable service JRunRMIBroker discovered ClusterManager on xxx.xxx.xxx.xxx:3862, cluster domain: cluster1 (Lookup Service's JINI-ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
    22/03 07:10:42 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset
    22/03 07:10:42 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.io.EOFException
    22/03 07:10:42 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset
    22/03 07:10:42 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.net.SocketException: Connection reset
    22/03 07:10:42 warning Error propagating servlet user to peer: error during JRMP connection establishment; nested exception is:
        java.io.EOFException
    22/03 07:10:43 error ROOT CAUSE:
    java.lang.OutOfMemoryError: unable to create new native thread
        at java.lang.Thread.start0(Native Method)
        at java.lang.Thread.start(Thread.java:640)
    I suspect it's a JVM memory issue, however I have no way of extracting or creating memory logs without bringing all our sites down again.
    I only know the basics of how the JVM heap space works but my guess is that one of the instances can't create any more threads because the PermGen space has run out and it's killing the cluster.
    Here's our current JVM settings: java.args=-server -Xmx768m -Xms768m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -Dcoldfusion.fckupload=true -Dcoldfusion.rootDir={application.home}/
    Has anyone come across this issue before or has any ideas on how to better debug the issue with minimal impact on uptime?

    Well the classes should be in WEB-INF/classes, but I don't think that's your problem.
    Getting an applet to connect to a db is notoriously difficult (so I've heard - I've never tried it), so having the applet talk to the servlet with the servlet in turn talking to the db is a good idea.
    "i cant see the error message because it wont print in the VM,"
    That doesn't sound right. What does your error handling code look like?
    " MySQL it also has access permissions for some weird reason."
    MySQL is set up so that user credentials are only valid from a specific host unless you explicitly tell it that a user can connect from anywhere. This is native to MySQL and has nothing to do with java or JDBC.
    Most of the code you posted throws Exceptions. Are you catching them, and if so what did they say?

  • How can i catch the jsp checking event ?

    As we know, there are three parameters which is about checking in the weblogic.xml, pageCheckSeconds,*servlet-reload-check-secs*,*resource-reload-check-secs*, but how can i catch the checking event when the webapp is active.
    The fellowing is my simple test, i deployed a webapp on a weblogic server instance, and it was actived. I wrote a simple bash shell to try to catch the event, but fail. i througnt it may be dependent on the webapp's stage mode. but i change the mode, and try again, it was fail too.
    [weblogic@tdy218 ~]$ ls
    getLastAccessTime.sh webapps
    [weblogic@tdy218 ~]$ ./getLastAccessTime.sh ~/webapps/Test/login.jsp
    The file's last access time is: 2011-05-22 11:10:21.000000000 +0800
    The file's last access time is: 2011-05-22 11:10:21.000000000 +0800
    The file's last access time is: 2011-05-22 11:10:21.000000000 +0800
    The file's last access time is: 2011-05-22 11:10:21.000000000 +0800
    The file's last access time is: 2011-05-22 11:10:21.000000000 +0800
    The file's last access time is: 2011-05-22 11:10:21.000000000 +0800
    The file's last access time is: 2011-05-22 11:10:21.000000000 +0800
    [weblogic@tdy218 ~]$ ./getLastAccessTime.sh
    /bea/wls924/user_projects/domains/base_domain/servers/AdminServer/stage/Test/Test/login.jsp
    The file's last access time is: 2011-05-22 11:11:37.000000000 +0800
    The file's last access time is: 2011-05-22 11:11:37.000000000 +0800
    The file's last access time is: 2011-05-22 11:11:37.000000000 +0800
    The file's last access time is: 2011-05-22 11:11:37.000000000 +0800
    The file's last access time is: 2011-05-22 11:11:37.000000000 +0800
    The file's last access time is: 2011-05-22 11:11:37.000000000 +0800
    The file's last access time is: 2011-05-22 11:11:37.000000000 +0800
    The file's last access time is: 2011-05-22 11:11:37.000000000 +0800
    [weblogic@tdy218 ~]$ stat
    /bea/wls924/user_projects/domains/base_domain/servers/AdminServer/stage/Test/Test/login.jsp
    File: `/bea/wls924/user_projects/domains/base_domain/servers/AdminServer/stage/Test/Test/login.jsp'
    Size: 634 Blocks: 8 IO Block: 4096 regular file
    Device: 804h/2052d Inode: 583725 Links: 1
    Access: (0644/-rw-r--r--) Uid: ( 502/weblogic) Gid: ( 500/ bea)
    Access: 2011-05-22 11:11:37.000000000 +0800
    Modify: 2010-05-24 14:49:08.000000000 +0800
    Change: 2011-05-22 11:10:21.000000000 +0800
    The jsp file's last access time didn't changed in the past.
    [weblogic@tdy218 ~]$ more getLastAccessTime.sh
    #!/bin/bash
    declare -i m=1
    declare -i n=100
    while [ $m -le $n ]; do
    echo "The file's last access time is: $(stat -c %x $1)"
    m=m+1
    sleep 3
    done
    weblogic.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.oracle.com/technology/weblogic/servers/wls810/dtd/weblogic810-web-jar.dtd">
    <weblogic-web-app>
    <jsp-descriptor>
    <jsp-param>
    <param-name>pageCheckSeconds</param-name>
    <param-value>2</param-value>
    </jsp-param>
    </jsp-descriptor>
    <container-descriptor>
    <servlet-reload-check-secs>2</servlet-reload-check-secs>
    <resource-reload-check-secs>2</resource-reload-check-secs>
    </container-descriptor>
    <context-root>/jdbc</context-root>
    </weblogic-web-app>
    env :
    WebLogic 9.2 MP4、Redhat Linux AS 4 Update 8 x86.

    I tested on WLS 11g ps2(10.3.3) which is running in Development Mode also, but it was the same as WLS 9.2 MP4.
    During the weblogic server running, it don't check the application resources , but it will check the $Domain_Home/autodeploy directory every three seconds in Development Mode , the following is the result.
    [weblogic@tdy218 ~]$ ./getLastAccessTime.sh /bea/wls924/user_projects/domains/base_domain/autodeploy
    The file's last access time is: 2011-05-22 12:01:43.000000000 +0800
    The file's last access time is: 2011-05-22 12:01:43.000000000 +0800
    The file's last access time is: 2011-05-22 12:01:43.000000000 +0800
    The file's last access time is: 2011-05-22 12:01:46.000000000 +0800
    The file's last access time is: 2011-05-22 12:01:46.000000000 +0800
    The file's last access time is: 2011-05-22 12:01:46.000000000 +0800
    The file's last access time is: 2011-05-22 12:01:49.000000000 +0800
    The file's last access time is: 2011-05-22 12:01:49.000000000 +0800
    The file's last access time is: 2011-05-22 12:01:49.000000000 +0800
    The file's last access time is: 2011-05-22 12:01:52.000000000 +0800
    Ctrl + ^
    [weblogic@tdy218 ~]$ ./getLastAccessTime.sh ~/webapps/Test
    The file's last access time is: 2011-05-22 17:26:25.000000000 +0800
    The file's last access time is: 2011-05-22 17:26:25.000000000 +0800
    The file's last access time is: 2011-05-22 17:26:25.000000000 +0800
    The file's last access time is: 2011-05-22 17:26:25.000000000 +0800
    The file's last access time is: 2011-05-22 17:26:25.000000000 +0800
    The file's last access time is: 2011-05-22 17:26:25.000000000 +0800
    The file's last access time is: 2011-05-22 17:26:25.000000000 +0800
    The file's last access time is: 2011-05-22 17:26:25.000000000 +0800
    The file's last access time is: 2011-05-22 17:26:25.000000000 +0800
    Ctrl + ^
    [weblogic@tdy218 ~]$ ./getLastAccessTime.sh ~/webapps/Test/
    insert.jsp login.jsp query.jsp tdy218.sql WEB-INF/
    [weblogic@tdy218 ~]$ ./getLastAccessTime.sh ~/webapps/Test/login.jsp
    The file's last access time is: 2011-05-22 11:44:31.000000000 +0800
    The file's last access time is: 2011-05-22 11:44:31.000000000 +0800
    The file's last access time is: 2011-05-22 11:44:31.000000000 +0800
    The file's last access time is: 2011-05-22 11:44:31.000000000 +0800
    The file's last access time is: 2011-05-22 11:44:31.000000000 +0800
    The file's last access time is: 2011-05-22 11:44:31.000000000 +0800
    The file's last access time is: 2011-05-22 11:44:31.000000000 +0800
    The file's last access time is: 2011-05-22 11:44:31.000000000 +0800
    The file's last access time is: 2011-05-22 11:44:31.000000000 +0800
    The file's last access time is: 2011-05-22 11:44:31.000000000 +0800
    Ctrl + ^
    I set the frequency to every one seconds this time by using sleep method in my Bash Shell script.
    #!/bin/bash
    declare -i m=1
    declare -i n=100
    while [ $m -le $n ]; do
    echo "The file's last access time is: $(stat -c %x $1)"
    m=m+1
    sleep 1
    done

  • How to solve this error java.util.MissingResourceException

    Hi Friends,
    I had developed one web dynpro application by using  Internationalization - I18N of WebDynPro (Java)  Application (Blog)   but I got one error that is
    <b>java.util.MissingResourceException: Can't find bundle for base name com.sap.example.language.lang, locale en_US</b> 
    Actually i created two properties file
    1. lang_en.properties
    2. lang_ta.properties
    I stored this two properties file in this package com.sap.example.language
    and this my code in DOInit()
    sessionLocale =  WDClientUser.getCurrentUser().getLocale();
    resourceHandler = ResourceBundle.getBundle("com.sap.example.language.lang",sessionLocale);
         catch (WDUMException e)
         e.printStackTrace();
         wdContext.currentContextElement().setUsername_label(resourceHandler.getString("testview.username"));
         wdContext.currentContextElement().setPassword_label(resourceHandler.getString("testview.password"));
    How to solve this error?
    Guide me.
    Advance Thanks,
    Balaji

    Hi Friends,
    I had developed one web dynpro application by using Internationalization - I18N of WebDynPro -Java Application (Blog) but I got one error that is
    <b>java.util.MissingResourceException: Can't find bundle for base name com.sap.example.language.lang, locale en_US</b>
    Actually i created two properties file
    1. lang_en.properties
    2. lang_ta.properties
    I stored this two properties file in this package com.sap.example.language
    and this my code in DOInit()
    sessionLocale = WDClientUser.getCurrentUser().getLocale();
    resourceHandler = ResourceBundle.getBundle("com.sap.example.language.lang",sessionLocale);
    catch (WDUMException e)
    e.printStackTrace();
    wdContext.currentContextElement().setUsername_label(resourceHandler.getString("testview.username"));
    wdContext.currentContextElement().setPassword_label(resourceHandler.getString("testview.password"));
    How to solve this error?
    Guide me.
    Advance Thanks,
    Balaji

  • Error deploying to new 10.1.3.4 App Server - "Error instantiate servlet..."

    Hello all,
    Your help would be greatly appreciated finding the root cause of this error. I'm trying to deploy your run of the mill .war to a newly installed Oracle Application Server version 10.1.3.4. The deployment fails at the very end with the exception below. The app server is running on RHEL 4.7. I built the war first with JDEV 11g, and then built it from Netbeans to try and make sure JDEV 11g wasn't doing something funny to the war. Both times, after deploying I receive the error below. Any insight would be greatly appreciated. I'm not using ADF or anything in particular like that. Thank you for any help you might be able to provide. -- Jason
    <blockquote>
         08/12/16 13:39:45 oracle.oc4j.admin.internal.DeployerException: Error instantiate servlet classes
         08/12/16 13:39:45 at com.evermind.server.http.deployment.WARAnnotationParser.getServletClasses(WARAnnotationParser.java:157)
         08/12/16 13:39:45 at com.evermind.server.http.deployment.WARAnnotationParser.parseAnnotations(WARAnnotationParser.java:95)
         08/12/16 13:39:45 at com.evermind.server.http.HttpApplication.parseMetaData(HttpApplication.java:8575)
         08/12/16 13:39:45 at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1113)
         08/12/16 13:39:45 at com.evermind.server.http.HttpApplication.&lt;init&gt;(HttpApplication.java:738)
         08/12/16 13:39:45 at com.evermind.server.ApplicationStateRunning.getHttpApplication(ApplicationStateRunning.java:414)
         08/12/16 13:39:45 at com.evermind.server.Application.getHttpApplication(Application.java:545)
         08/12/16 13:39:45 at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.createHttpApplicationFromReference(HttpSite.java:1990)
         08/12/16 13:39:45 at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.&lt;init&gt;(HttpSite.java:1909)
         08/12/16 13:39:45 at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:1606)
         08/12/16 13:39:45 at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:238)
         08/12/16 13:39:45 at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplicationBinder.java:99)
         08/12/16 13:39:45 at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(ApplicationDeployer.java:547)
         08/12/16 13:39:45 at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:202)
         08/12/16 13:39:45 at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
         08/12/16 13:39:45 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
         08/12/16 13:39:45 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
         08/12/16 13:39:45 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         08/12/16 13:39:45 at java.lang.Thread.run(Thread.java:595)
    </blockquote>

    "Not really. You can exclude the data-sources.xml from the EAR file and rely on the setup of the Global Datasource, created before deployment.
    --olaf"
    Thanks. Yes I did try this but when I setup the datasource via the datasources tab within the console I still received the error. This may have been due to an error on my part but I can't be sure as i've tried all sorts of different approaches over the last few days. I initially didn't have a datasource.xml so there wasn't one to exclude (via the deploy properties in Jdev) I had relied on Jdeveloper to setup the datasource via my connections. I read somewhere that Jdev does this fduring deploy and indeed it works fine for my embedded oc4j and when deplolying from Jdeveloper 10.1.2 so it would seem odd that the same approach doesn't work for Jdeveloper 10.1.3.
    Surely the release notes regarding the password issue is the reason why I can't deploy from Jdev 10.1.3.4 to app server 10.1.2?
    The release notes say that a patch is due to fix the issue with password indirection, Olaf do you know where I can get this?
    Also how do I setup Jdev not to write the datasources during deployment? If I don't have a datasources.xml then there is nothiing to exclude. Is there a setting somewhere in Jdev 10.1.3.4?
    Edited by: [email protected] on 05-Mar-2009 08:08
    Edited by: [email protected] on 05-Mar-2009 08:12

  • BPM dont return (catch) error occured in Adapter

    Guys,
    I created my scenario with  BPM.
    Details:
    Design:
    MI_TESTE_SEND_outb - Outbound, Sync
    MI_TESTE_outb - Abstract, Sync
    MI_TESTE_ABS - Abstract, Async
    MI_TESTE_inb - Inbound, Async
    BPM
    Send1 - Open Bridge,
    mesage - MI_TESTE_ABS
    sync message - MI_TESTE_outb
    Receive1 - Async
    message - MI_TESTE_ABS, create new transaction
    Receive2 - Close Bridge of Receive1
    message - MI_TESTE_ABS
    Configuration:
    No errors in configurations, i create SOAP Adapter Receiver for use in Receive1 from BPM
    The send is a RFC Sender.
    When i launch the process, in SOAP Adapter occurs errors (url invalid), but in SXI_MONITOR dont show errors, otherwise, my process is completed and ok.
    That occurs because the error found in Adapter and my BPM dont catch the error.
    Can anybody tell me, how can i catch the error from Adapter in my BPM? How can i return from RFC the that error?

    João,
    Could you explain the scenario plz? Coz the steps which u've given is confusing a lot.
    raj.

  • How to Throw/Catch Exceptions in BPM

    Hi All,
    I've seen a couple articles that talk about how to Throw/Catch an execption in a BPM. My question has two parts:
    1) RFC Call: I was able to catch an Fault Message in an exception step when calling an RFC (Synchronous Interface). What I wanted to do is use the fault message (exception) and store it in a DB for later review.
    2) IDOC: I'm sending an IDOC to R3 from a BPM. The send step is enclosed in a block w/ an exception. The send step is throwing an error (IDOC adpater system error), but the exception is never thrown. My question is: when the error occurrs at the adapter level does it still throw an exception in a BPM?
    Thanks for any tip/advice/anything!
    Fernando.

    Hi Fernando,
    1) Define a send step in the exception branch.
    2) If u send a IDoc from R/3 to XI and the IDoc adapter is running to an error of course there cant be an exception in ur business process. Usually the IDoc adapter sends back status back up via ALEAUD. In case of success IDoc should have then '03', if the adapter cannot send anything the IDoc should remain at '39'. U should send a ALEAUD in case of exception of BPM switching to status '40', in case of success to '41'.
    Regards, Udo

  • How can I catch the exception type c = type i?

    How can I catch the exception and display the error message when I assign the u2018ABC123u2019 value to an int data type.
    Code is as follow.
    REPORT  zfsl_sum_functions.
    DATA: cin(50),
          cout(50),
          iin TYPE i,
          iout TYPE i,
          etext TYPE string.
    cin = '123ABC'.     " how can i catch this
    iout = cin.
    WRITE: iout.

    The CATCH-ENDCATCH statement is obsolete as of release was620. You should use TRY. CATCH. ENDCATCH.
    The exception that will be raise is CX_SY_CONVERSION_NO_NUMBER, so you have to catch that exception or a super class of this exception class.
    REPORT zfsl_sum_functions.
    DATA: cin(50),
    cout(50),
    iin TYPE i,
    iout TYPE i,
    etext TYPE string.
    DATA: rf_cx_error TYPE REF TO CX_SY_CONVERSION_NO_NUMBER,
            errortxt TYPE string.
    TRY.
        cin = '123ABC'. " how can i catch this
        iout = cin.
        WRITE: iout.
      CATCH CX_SY_CONVERSION_NO_NUMBER INTO  rf_cx_error.
        errortxt = rf_cx_error->get_text( ).
        WRITE errortxt.
    ENDTRY.

  • Catch error in javascript when using SAP script

    All,
    I have a issue when using Javascript to control the SAP GUI in that I get a "syntax Error" raised by Internet Explorer if I attempt to get the SAPGUI runtime object from the runtime object table if SAP is not already running.
    For example:
    I have a javascript function embedded in a web page as follows:
    <script type="text/javascript">
    function displaymessage()
    var sapgui;
    var application;
    var connection;
    if (typeof(application) == "undefined")
       sapgui      = GetObject("SAPGUI");
       application = sapgui.GetScriptingEngine();
    if (typeof(connection) == "undefined")
       connection = application.children(0);
    if (typeof(session) == "undefined")
       session = connection.children(0);
    if (typeof(WScript) != "undefined")
       WScript.connectObject(session, "on");
       WScript.connectObject(application, "on");
    session.findById("wnd[0]/tbar[0]/okcd").text = "fb50";
    session.findById("wnd[0]").sendVKey(0);
    session.findById("wnd[1]/usr/ctxtBKPF-BUKRS").text = "0001";
    session.findById("wnd[1]/usr/ctxtBKPF-BUKRS").caretPosition = 4;
    session.findById("wnd[1]").sendVKey(0);
    </script>
    I have a simple HTML page with a button on it that calls the function.
    If I have already launched SAP GUI and logged in the code works fine and atuomatically navigates me to FB50.
    If SAP is not active and logged in then I get a syntax error!  The error is raised by IE when the GetObject("SAPGUI") is executed.
    Can anyone please help by either:
    a) explaining how I can catch this error in javascript
    b) suggesting a different way to call the GetObject
    c) suggesting a way that I can auto launch SAP to log people in if it is not already active.
    Note - Using VB is not an option as I need to embed the working Javascript code in a Siebel thin client application which only uses Javascript.
    All help welcome. Thanks

    Hey Gunter,
    Thanks much, that did work.
    The other error I spoke of was fixed with the new database, so apparently the two errors I spoke of weren't related.
    You seem to be a good help to this forum, thank you for that.... fixing my problem relieved me from much stress.
    Cheers,
    Derek Miller
    Dreamweaver Enthusiast

Maybe you are looking for

  • How to add 2 Apple ID's to one libary

    HI, I'm trying to add 2 Apple ID's to one iTunes libary. My dad is currently log into my account but I want to create a new ID for him so we can FaceTime and just have separate accounts. The only thing is that he has spent hundreds on music in my lib

  • Clipboard issue with Word and Flash CS4 in Snow Leopard

    I use Flash CS4/word 2008 on a regular basis and copy text from word into flash. Since I upgraded to SL, I no longer can paste text into Flash. This is a major productivity killer for me. Are there any global clipboard settings?

  • Cheque printing through FPY1

    HI i am narrating the scenario first and is as below. After the payment run program(FPY1) has been executed and approved by the finance dept, the cheque processor executes the payment medium program SAPLFKGV, transaction code FPCH1. this program crea

  • Bird's Eye View enabled by default

    Hi all, is there a way to have the bird's eye view enabled by default in the impact/lineage? I need to enable it everytime i do a impact/lineage analyse. It takes to much time before it pops up. I know it's something not very important :) But it's an

  • 1) "Care Pack" product registration page error 2) Driver download page error - links don't work

    I cannot register my printer because the page has "Care Pack" product registration page has errors: https://register.hp.com/americas/flowPage/registration/index.do?execution=e1s1 I fill in all the information and click the blue "Submit Query" button,