Error checking with jTextFields

I've built a GUI application with several jTextFields. The user input from the text fields is parsed into doubles when the user clicks a jButton. The problem that I'm encountering is dealing with the cases of empty text fields and inputs that are not numbers. For example, if I enter an A into a text field and hit the button, I get a :
Exception occurred during event dispatching:
java.lang.NumberFormatException: a
Any thoughts on how to correct this problem?
Colin Spencely

Well I think is obvious: before parsing the strings as numbers make a check to see if you have indeed a number.
Or build your own text field which accepts only digits:
public class DigitField extends JTextField{
  public DigitField(int cols){
    super(cols);
  //other constructors here
  protected Document createDefaultModel(){
    return new NumberDocument();
  class NumberDocument extends PlainDocument{
    public void insertString(int offs, String str, AttributeSet a) throws
      BadLocationException{
      if(str == null || !isNumber(str)){
        //error message here, if you wish
        return;
      super.insertString(offs, str, a);
  private final boolean isNumber(String number){
    if(number == null || number.equals("") || number.trim().equals("")){
      return false;
    char[] data = number.toCharArray();
    char[] digits = {
      '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.'};
    boolean isNumber = true;
    int dotCounter = 0;
    for(int i = 0; i < data.length; i++){
      int matchCounter = digits.length;
      for(int j = 0; j < digits.length; j++){
        if(data[i] != digits[j]){
          matchCounter--;
      if(data[i] == '.'){
        dotCounter++;
      if(matchCounter == 0 || (matchCounter >= 0 && dotCounter > 1)){
        isNumber = false;
        break;
    if(dotCounter == 1 && number.length() == 1){
      isNumber = false;
    return isNumber;
}

Similar Messages

  • What do you think of my Bash Script? What about the error checking?

    Well what do you think of this Bash script
    It works
    I gave it some problems (i.e. unpluged the ethernet, messed up the URL's, uninstaled some programs...) to see if would report errors and stop or just keep going... But it did
    I just kind of thought up a way to do some error checking with the commands that I know.....
    What is a better way to do error checking?
    What do you think I should add/Do to this script?
    #!/bin/bash
    # Shell script to make a USB Tumb Drive for Flashing BIOS on a Lenovo Ideapad Y510.
    # This script needs to be owned and run as ROOT with the "sudo command"
    # i.e. sudo usbbiosflasher
    # If you have anyideas send me a PM on ubuntufourms.org my user name is HunterThomson
    # Name/Rename this script usbbiosflasher and save it to the ~/home directory.
    # Then run the command- chown root:root usbbiosflasher
    # Then run the command- chmod 755 usbbiosflasher
    # Then copy the script to the directory /usr/bin.
    # Run this comand to do that- sudo cp ~/usbbiosflasher /usr/bin
    # You also must have the program "mbr" installed
    # You can install the mbr program by running this comand in the shell on Ubuntu
    # sudo apt-get install mbr
    # In Arch Linux you have to get it from Aur
    # First you will need to know a few things...
    # You will also need to know the Mount Point i.e. /media/disk and the /dev path i.e. /dev/sdb1.
    # You can find these by using the df -T comand.
    # Run df -T in the shell. Then plug in the USB Thumb Drive and run the df -T comand agin.
    # The new listing is the USB Thumb Dirve.
    # Also check to make sure the File System tipe is vFAT or FAT16 or FAT32.
    # If it is not use gparted to format it to FAT32.
    # I am farly certen that all USB Thumb drives come formated with FAT file system out of the BOX.
    # You may want to fromat it anyway just to make sure.
    echo "Interactive Shell Script to Make a USB Thumb Drive \for Flashing BIOS On a Lenovo Ideapad Y510"
    echo ""
    echo "You will need to have the program mbr installed"
    echo "If you are on Ubuntu Linux you can retreve it form the repositories"
    echo "If you are on Arch Linux you will need to get it from the Aur repository"
    echo "Open anuther shell and \do that now..."
    echo ""
    verify="n"
    while [ "$verify" != y ]
    do
    printf "Do you have mbr installed... yes or no?"
    read AN1
    echo ""
    printf "You answered... $AN1 I have installed mbr. Is this correct... y or n?"
    read verify
    done
    echo ""
    if [ "$AN1" == "no" ]
    then
    echo "Install mbr now. Then run this script agin"
    exit
    else
    echo "contunuing script"
    fi
    echo ""
    # The next comand will make a directory to put needed files into. Note this file and everything init will be owned by root.
    mkdir ~/usbbiosfiles && check1="yes"
    if [ "$check1" = "yes" ]
    then
    echo "Made directory usbbiosfiles... OK"
    else
    echo "Could not \make directory usbbiosfiles"
    echo "look above \for \info"
    echo "Fix the problem and run this scrip agin"
    exit
    fi
    # The next two comands will get the FreeDOS file and the .ROM file.
    cd ~/usbbiosfiles && checka="yes"
    if [ "$checka" = "yes" ]
    then
    echo "Changing to the usbbiosfiles directory... OK"
    else
    echo "Could not Change to the usbbiosfiles directory"
    echo "look above \for \info"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    wget "http://www.fdos.org/bootdisks/autogen/FDOEM.144.gz" && check2="yes"
    if [ "$check2" = "yes" ]
    then
    echo "Download of FreeDOS... OK"
    else
    echo "Could not Download FreeDOS"
    echo "look above \for \info"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    wget "http://ubuntuforums.org/attachment.php?attachmentid=78460&d=1216648756" && check3="yes"
    if [ "$check3" = "yes" ]
    then
    echo "Download of the BIOS.ROM \file... OK"
    else
    echo "Could not Downlad the BIOS.ROM \file"
    echo "look above \for \info"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    # The next comand will name the .ROM file to the right name.
    mv ~/usbbiosfiles/attachment.php?attachmentid=78460\&d=1216648756 ~/usbbiosfiles/06CN29WW.bios.update.tar.bz2 && check4="yes"
    if [ "$check4" = "yes" ]
    then
    echo "Renameing of the BIOS.ROM \file... OK"
    else
    echo "Could not rename the BIOS.ROM \file"
    echo "look above \for \info"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    echo ""
    # The next two comands set the variables. DEVX for the path i.e. /dev/xxx and MOUNTX for the mount point i.e. /media/xxx
    verify="n"
    while [ "$verify" != y ]
    do
    echo "You will need to know the Mount Point and the dev Path. You will also need to \make sure the File System \type is vFAT, FAT16 or FAT32."
    echo ""
    echo "With the USB Thumb Drive unpluged, Open another shell and run the comand df -T Then plug \in the USB Thumb Drive and run the comand df -T one \more time. The new device listed is the USB Thumb Drive. Note the Mount Point and The dev Path and the File system Type i.e. vFAT... If the File System \type is not vFAT, FAT16 or FAT32 you will need to fromat it with gparted. You may want to format the USB Thumb Drive anyway just to \make sure. In any \case delete all files and directorys on the USB drive before you go any ferther with this program."
    echo ""
    printf "Enter the dev path the USB Thumb Drive is at?"
    read DEVX
    echo ""
    echo "Are you sure $DEVX is the dev path of the USB Thumb Drive... y or n?"
    read verify
    done
    echo ""
    verify="n"
    while [ "$verify" != y ]
    do
    printf "What is the Mount Point of the USB Thumb Drive?"
    read MOUNTX
    echo ""
    echo "Are you sure $MOUNTX is the Mount Point of the USB Drive... y or n?"
    read verify
    done
    echo ""
    install-mbr --enable A1 --partition 1 --force --timeout 0 $DEVX && check5="yes"
    if [ "$check5" = "yes" ]
    then
    echo "Installing MBR on USB Thumb Dirve... OK"
    else
    echo "Could not install MBR on USB Thumb Drive"
    echo "look above \for \info"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    tar xjf ~/usbbiosfiles/*.tar.bz2 && check7="yes"
    if [ "$check7" = "yes" ]
    then
    echo "Unpacking BIOS.ROM file... OK"
    else
    echo "Could not unpack BIOS.ROM file"
    echo "look above \for \info"
    echo ""
    echo "Reformat the USB Stick to FAT32 with gparted"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    gunzip ~/usbbiosfiles/FDOEM.144.gz && check8="yes"
    if [ "$check8" = "yes" ]
    then
    echo "Unpacking FreeDOS files... OK"
    else
    echo "Could not unpack FreeDOS files"
    echo "look above \for \info"
    echo ""
    echo "Reformat the USB Stick to FAT32 with gparted"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    mkdir ~/usbbiosfiles/fdoem144 && check9="yes"
    if [ "$check9" = "yes" ]
    then
    echo "Made directory fdoem144 in direcoty usbbiosfiles... OK"
    echo ""
    echo "Going to \sleep \for 5secs"
    else
    echo "Could not make directory fdoem144 in usbbiosfiles directory"
    echo "look above \for \info"
    echo ""
    echo "Reformat the USB Stick to FAT32 with gparted"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    modprobe loop && sleep 5 && check0="yes"
    if [ "$check0" = "yes" ]
    then
    echo "Modprobeing loop... OK"
    else
    echo "Could not \modprobe loop"
    echo "look above \for \info"
    echo ""
    echo "Reformat the USB Stick to FAT32 with gparted"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    mount -o loop ~/usbbiosfiles/FDOEM.144 ~/usbbiosfiles/fdoem144 && check10="yes"
    if [ "$check10" = "yes" ]
    then
    echo "Mounting FreeDOS on the fdoem144 directory... OK"
    else
    echo "Could not \mount FreeDOS on the fdoem144 directory"
    echo "look above \for \info"
    echo ""
    echo "Reformat the USB Stick to FAT32 with gparted"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    cp ~/usbbiosfiles/fdoem144/* $MOUNTX && check11="yes"
    if [ "$check11" = "yes" ]
    then
    echo "Copying FreeDOS files to $MOUNTX... OK"
    else
    echo "Could not copy FreeDOS files to $MOUNTX"
    echo "look above \for \info"
    echo ""
    echo "Reformat the USB Stick to FAT32 with gparted"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    cp ~/usbbiosfiles/*.ROM $MOUNTX && check12="yes"
    if [ "$check12" = "yes" ]
    then
    echo "Copying BIOS.ROM files to $MOUNTX... OK"
    else
    echo "Could not copy BIOS.ROM files to $MOUNTX"
    echo "look above \for \info"
    echo ""
    echo "Reformat the USB Stick to FAT32 with gparted"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    sync && check13="yes"
    if [ "$check13" = "yes" ]
    then
    echo "Runing the syncing command... OK"
    else
    echo "Could not run the syncing command"
    echo "look above \for \info"
    echo ""
    echo "Reformat the USB Stick to FAT32 with gparted"
    echo "Fix the problem and run this scrip agin"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    rm -r ~/usbbiosfiles
    exit
    fi
    umount ~/usbbiosfiles/fdoem144 && check14="yes"
    if [ "$check14" = "yes" ]
    then
    echo "Unmounting of FreeDOS... OK"
    else
    echo "Could not unmount FreeDOS"
    echo "Look above for errors or problems reported and fix the problem"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    echo "Reformat the USB Stick to FAT32 with gparted"
    echo "Fix the problem and run this script agin"
    rm -r ~/usbbiosfiles
    exit
    fi
    verify="n"
    while [ "$verify" != y ]
    do
    printf "Do you see any errors... yes or no?"
    read AN2
    echo ""
    printf "You answered... $AN2 to errors. Is this correct... y or n?"
    read verify
    done
    echo ""
    if [ "$AN2" == "yes" ]
    then
    echo "User Repoted... Error"
    echo "Look above for errors or problems reported and fix the problem"
    echo ""
    echo "removeing directory usbbiosfiles..."
    echo ""
    echo "Reformat the USB Stick to FAT32 with gparted"
    echo "Fix the problem and run this script agin"
    rm -r ~/usbbiosfiles
    exit
    else
    echo "Success"
    echo "I did a lot of error checking too and didnt find anything"
    echo ""
    echo "Go get a pen and paper to write down these instructions"
    printf "Then hit the Enter to continue"
    read WAIT
    echo ""
    echo "Now leave the USB Thumb Drive pluged into your computer and Reboot. When the Lenovo Logo POST screen appears hit F2 to enter the CMOS setup utility. Go over to BOOT tab and go down to HardDrive \(Not Boot Order) \then \select the USB Thumb Drive as the 1st hard drve. Then F10 and yes to save changes. Your compter will reboot agin. Then when the Lenovo Logo POST Screen appers on reboot hit F4 to enter the BIOS FLASHING program. The USB Thumb Drive will be seen as the C drive \in the list on the Left, Select it. Then \select the .ROM \file \in the list on the Right and start the BIOS FLASH. \(NOTE Your hart may stop beating... This is normal) Pray to any God you know of and your computer should restart just like normal. Hit F2 and the BIOS will now stay it is 06CN29WW. You will need to \set the boot order to the way you like it and other things \if you need to because they have been changed to the default."
    fi
    echo ""
    echo "End of script"
    Last edited by hunterthomson (2008-08-10 11:17:47)

    Personally.....  (this is just how I would have written it - if it works, then it's good enough for me though )
    I would change this whole block:
    verify="n"
    while [ "$verify" != y ]
    do
    printf "Do you have mbr installed... yes or no?"
    read AN1
    echo ""
    printf "You answered... $AN1 I have installed mbr. Is this correct... y or n?"
    read verify
    done
    echo ""
    if [ "$AN1" == "no" ]
    then
    echo "Install mbr now. Then run this script agin"
    exit
    else
    echo "contunuing script"
    fi
    To this much shorter code:
    MBR='/usr/bin/install-mbr' # Or where ever you expect it to be
    if [ ! -x $MBR ] ; then
    echo "mbr doesn't appear to be installed."
    echo "If it is installed, check it's location, make sure it's executable and then make sure the MBR variable in this script is correct"
    exit 1
    fi
    I wouldn't have used the checkXX variables for each stage:
    mkdir ~/usbbiosfiles
    if [ $? != 0 ] ; then
    #failed
    echo "Could not \make directory usbbiosfiles"
    echo "look above \for \info"
    echo "Fix the problem and run this scrip agin"
    exit 1
    else
    echo "Made directory usbbiosfiles... OK"
    fi
    There is an issue with the way you do your verifications - the user can never get out unless they answer 'y' or hit CTRL+C. Something like this gives them options:
    verify="n"
    while [ "$verify" != "y" && "$verify" != "n" ]; do
    echo "You need to answer 'y'es or 'n'o"
    read verify
    echo $verify | tr "[:upper:]" "[:lower:]" # This converts the answer to lowercase so replies entered in upper case will still work
    done
    if [ $verify != 'y' ] ; then
    exit 1
    fi
    One last thing I try to do in scripts... Declare all your binaries as variables at the start of the program, then execute the binary program by using the variable. For example:
    # Binaries
    TAR='/bin/tar'
    CP='/bin/cp'
    CHMOD='/bin/chmod'
    # Execute tar and chmod the created file
    $TAR cvzf /tmp/tarfile.tar.gz /etc/*.conf
    $CHMOD 400 /etc/*.conf
    This way, it's easy to change the path in future without having to hunt through the script if the paths change, and it also ensures you're calling the programs using the full paths to make sure you're not executing some strange variant or alias that someone has setup. If I use `chmod` 30 times in a script, and the path changes in the future or on a different system (`chmod` is a bad example cause it's highly unlikely to change, but you know what I mean), then all you need to do is update the variable at the start of the script, and it all works again without having to script-hunt and change it 30 times.

  • Having installed an upgrade for Photoshop Elements 13, I cannot open the application. I get an error message saying "Adobe Photoshop Elements Editor cannot be opened because of a problem. Check with the developer to make sure Adobe Photoshop Elements Edit

    Having installed an upgrade for Photoshop Elements 13, I cannot open the application. I get an error message saying "Adobe Photoshop Elements Editor cannot be opened because of a problem. Check with the developer to make sure Adobe Photoshop Elements Editor works with this version of OS X. You may need to reinstall the application. Be sure to install any available updates for the application and OS X".
    I have since uninstalled and reinstalled the app, but get the same error message.

    Which version of OS X do you have? It's not clear from your post whether "installed an upgrade" means you just installed PSE 13 as an upgrade or you installed an update to PSE 13, like ACR 9 or 13.1. Please clarify.

  • I used migration to send photos form my Mac Book to my I Mac now i get an error message "iPhoto can not be opened because of a problem"  Check with the developer to make sure iPhoto works with this version of Max OSX.  You may need to install any availabl

    I used migration to send photos form my Mac Book to my I Mac now i get an error message "iPhoto can not be opened because of a problem"  Check with the developer to make sure iPhoto works with this version of Max OSX.  You may need to install any available updates or reinstall IPhoto.
    I tried installing Iphoto it said it was downloaded successfully. I still get the error messafe, and can not open any photos of program,  any suggestions?

    What version of iPhoto do you have on the Macbook and on the iMac? What systems are you running on the Macbook and on the iMac?
    Does the message only refer to "a problem" or does it specify what it is?
    Happy Holidays

  • Problem with simple error checking

    Scratch the error checking bit. The original code involved error checking, but I've dwindled the problem down to the following code:
    int input;
    cout << endl << "Enter number: ";
    cin >> input;
    if (isnumber(input) == 0)
    cout << "Not a number";
    else
    cout << "Is a number";
    How is it that, when I enter the number 2 as input for this program, I get the response "Not a number." I get the same response when I enter something that actually is not a number, like the character 'a', as input. No matter what, it displays "Not a number."
    This seems really basic to me. Am I missing something obvious here?

    As far as isnumber() goes, I made a mistake. Apparently isnumber() is also a function because it didn't raise an error, but it was a typo -- the function I meant to use was isdigit(), not isnumber(). So, I changed the function isnumber() to isdigit(), but still got the exact same result.
    I've since figured out what the problem is, though. The function isdigit() was given in the notes my professor provided, along with isalpha(), ispunct(), isspace(), isupper(), and islower(). It occurred to me that these functions are intended to be used with single characters, and in my code I had defined the variable input as an int. So, I changed input to data type char and it worked fine.
    So, that solves that issue, but raises another. Consider the following code, if you will:
    int numHands;
    while (numHands < 1 || numHands > 7)
    cout << endl << "How many hands do you want to play: ";
    cin >> numHands;
    if (numHands < 1)
    cout << endl << "You must play at least one hand...";
    wait();
    else if (numHands > 7)
    cout << endl << "You can not play more than seven hands...";
    wait();
    This is a simple bit of error checking to make sure that the number that the user enters is between 1 and 7, and in that regard, it works fine. It does not, however, ensure that what the user enters is a number in the first place. My original solution to this was the following code:
    while (numHands < 1 || numHands > 7 || isdigit(numHands) == 0)
    cout << endl << "How many hands do you want to play: ";
    cin >> numHands;
    if (numHands < 1)
    cout << endl << "You must play at least one hand...";
    else if (numHands > 7)
    cout << endl << "You can not play more than seven hands...";
    else if (isdigit(numHands) == 0)
    cout << endl << "You did not enter a number...";
    When this didn't work, it prompted me to post this thread, but as I mentioned at the beginning of this post, I realized that the reason it didn't work was because isdigit() works with char and not int data types, and I obviously can't declare numHands as a char because the user could enter more than one character as input.
    How, then, can I error check to ensure that the user's input is, in fact, a number?

  • Not all of my photos upload to my website when I publish it. when my site finishes publising I get an error that says, "There was an error communicating with the FTP server. Try again later, or check with your service provider."

    Not all of my photos upload to my website when I publish it. when my site finishes publising I get an error that says, "There was an error communicating with the FTP server. Try again later, or check with your service provider."

    I am publishing directly to an FTP server (option 1).  Is this the optimal method or should I be publishing to a folder and then (how do/would I?) publish to my hosting domain?
    I'm wondering if this has really anything to do with the publishing process, or whether it just has to do with the photos and/or the photo albums.  I've deleted the photo albums with the missing pictures from my site on iweb thinking a file might be corrupt. (I'm getting the albums from iphoto -- drag/drop method into iweb) I then replaced these albums with the same albums as the previous ones from iphoto and then published my site again -- and the EXACT same photos were once again missing in the NEW albums as were missing in the old albums...
    Maybe it is a publishing issue, or it could be a photo/file issue.  However, these albums aren't very large -- the largest containing 135 photos --
    Please! if you have any suggestions or ideas as to what is happening I would be greatly appreciative!
    I'm pulling my hair out here trying to diagnose the problem...

  • Trying to publsh changes to my website. I get a message "There was an error communicating with the FTP server. Try again later, or check with your service provider." I did, and all my settings are correct, but still cannot publish

    Trying to publsh changes to my website. I get a message "There was an error communicating with the FTP server. Try again later, or check with your service provider." I did, and all my settings are correct, but still cannot publish.
    Any other ideas?

    Most likely you are suffering from a bug in iWeb that doesn't let you publish websites if an image you have added to your site begins with space. You can either search for that image and remove it.
    <Link Edited by Host>

  • Publish error There was an error communicating with the FTP server. Try again later, or check with your service provider.

    OK! So I got everything filled out right to publish my iWeb site with iCloud now but after it looks like everything is fine this error pops up REPEATLY!:
    PUBLISH ERROR There was an error communicating with the FTP server. Try again later, or check with your service provider.
    Is this an Apple problem or with my server Netfirms???

    Yeah no sorry not the answer.  I have my own online hosting unlimited space and bandwidth.
    It seems to be linked to teh podcast image.  It's very strange...

  • I am facing problem when configuring listener.ora and tnsnamess.ora in listener side it is showing The listener supports no services The command completed successfully  and in when i cross check with listener from tns it is showing the error

    i am facing problem when configuring listener.ora and tnsnamess.ora in listener side it is showing The listener supports no services The command completed successfully  and in when i cross check with listener from tns it is showing the error
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor
    here is my listener file
    lsn =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.125.128)(PORT = 1575))
    #ADR_BASE_LISTENER = /u01/app/oracle
    (SID_LIST_LISTENER=
    (SERVICE_NAME=kull)
    (ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1)
    tnsnames.ora
    to_lsn=
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1575))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = kull )
    my database name is kull
    please somebody help

    Biswaranjan wrote:
    i have two database one is kull and another is kk
    i configured listener.ora in kull
    and tnsnames.ora in kk
    when i am running lsnrctl start listener in database kull
    This makes no sense.  You don't configure a listener nor a tnsnames.ora "in a database".   I hope this is just a language issue and not reflective of a fundamental misunderstanding of how tns works.
    read: http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/ Help! I can’t connect to my database 
    read: http://edstevensdba.wordpress.com/2011/02/16/sqlnet_client_cfg/ Help! I can’t connect to my database (part duex)
    it is showing the message
    Alias                     lsn
    Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
    Start Date                05-JUL-2013 19:08:06
    Uptime                    0 days 0 hr. 0 min. 0 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    Listener Log File         /u01/app/oracle/product/11.2.0/db_1/log/diag/tnslsnr/server1/lsn/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1575)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=server1)(PORT=1575)))
    The listener supports no services
    The command completed successfully
    and in another database in kk when i am giving the command tnsping to_lsn
    it is giving this message
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = server1)(PORT = 1575)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = kull)))
    OK (0 msec)
    but when i am cross check sqlplus system/manager@ to_lsn
    it is giving the following error
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor

  • Syntax/error checking breaks in FlexBuilder/Flashbuilder with class libraries over Samba?

    We have our class libraries on a shared server we access via Samba (and ssh for command line). Sadly, several features seem to fail in both Flex Builder and Flash Builder/Gumbo with this setup. For example, we no longer get automatic syntax and error checking. Anyone familiar with this issue and able to suggest a solution? Thanks!

    Be sure you are not mixing -compat=4 and -compat=5 compilations in the same program.
    The -compat=4 mode is for compiling very old source code that was written for C++ 4.2 (1996). It provides almost none of the features of standard C++. Don't use this mode unless there is a specific reason why you must.
    Do not use -I or -L options that point into /usr/include, /usr/lib, or into the compiler installation area. These directories are always searched by default in the correct order. If you specify them explicitly, you force an incorrect search order.
    Be sure you have the minimum patch level of SUNWlibC required by the compiler. The patch includes libCstd, libCrun, libC, libiostream, libdemangle, and some other files. The minimum patch level comes with the compiler, and the Sun Studio installer will install the patch on the system where the compiler is installed.
    You also need the patch on every system that runs the compiler, and every system that runs programs created by the compiler.
    It is always safe to use the latest SUNWlibC patch. You can download the current patch from
    http://developers.sun.com/sunstudio/downloads/patches/index.jsp
    But the link failure in your case is due to a missing function from your own code, since it involves a function parameter of a programmer-defined type. I suspect you have either
    1. failed to define (provide a body for) the function,
    2. declared it inconsistently as inline and not inline,
    3. defined the function in a namespace different from the one where it was declared, or
    4. failed to link the object file where the function is defined.

  • Swing : login with error checking

    Hi all,
    I am trying to write a login with error checking on the password. If password validation fail. It will remain there. If it passes it will go to the application. any samples and sites please.
    thanks
    andrew

    CardLayout would be good for this sort of thing - allows you to lay panels on top of one another and then switch the display accordingly.
    Thus, when your app starts up you show the login screen and then once a user successfully logs on you switch to the main application screen.
    I put a basic example on another thread earlier:
    http://forum.java.sun.com/thread.jsp?thread=341205&forum=421&message=1404092

  • I started downloading ios 6 with iTunes. And at the end of the download , some kind of error comes with a pop up box  and a RED cross mark in it saying some error occurred and asking to disconnect and reconnect again and to check the internet is active?

    i started downloading ios 6 with iTunes with latest version of 10.7 for my iphone 4s running ios 5.1.1. And at the end of the download , some kind of error comes with a pop up box  and a RED cross mark in it saying some error occurred and asking to disconnect and reconnect again and to check the internet is active? and then nothing happens and when i disconnect and reconnect again, the same error comes and the same thing happens. what should i do now to install ios 6?

    Are you running any Firewalls or Anti-Virus software? If so, disable all of that stuff & try again.

  • Receiving a file sys initialization error(check config. with FAM/GRAMIN library)

    About 1 week ago I began seeing the above message pop up in the lower corner of my computer and have not been able to send emails from one of my 2 mail accounts. I receive messages OK but when I send them this message window pops up. ( An error occurred while sending mail. The mail server responded: sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1). Please check the message recipient *******@gmail.com and try again. ) This happens for every address I send.

    I checked with me email provider and they indicated they were no longer allowing mail relay. They said I need to set my outgoing mail to my ISP. The problem is this is my personal email and I want to have the recipients see me business email address when the receive my mail. How can I set up the outgoing mail server to show my business email?

  • I submitted my podcast and I got an email saying error, I checked with the feed validator and got this message: This feed does not validate. line 40, column 6: Undefined item element: itunes:order, how do sort this out, someone help me please.

    I submitted my podcast and I got an email saying error, I checked with the feed validator and got this message: This feed does not validate. line 40, column 6: Undefined item element: itunes:order, how do sort this out, someone help me please.

    Ignore it. 'itunes:order' is a recent addition which FeedValidator doesn't know about. If your podcast is rejected that is unlikely to be the reason. Of course as you haven't posted the feed URL nor the text of the error message I can't make any further comment.

  • For Loop with Error Check

    Hello all,
    As per my sample VI.
    I gave   Empty array to For Loop. As we know this Loop will not execute because N value “0”.
    But, I want to know why Error out always giving True value. This Error Indicator value changing to “True” irrespective of Error In.  
     BR,
    Munna
    Munna
    Solved!
    Go to Solution.

    That''s exaclty what I said.
    If you use plain tunnels and the loop iterates zero times, the output will give the default value for the datatype, which is FALSE for errors.
    If you use shift registers, whatever is wired to the initializer terminal will be output unchanged on the right if the loop iterates zero times. Since you initialize with a error=TRUE, that's what you get.
    This is all as expected. In your first post you claimed that the output is error=true using plain tunnels, which cannot be. Agreed?
    If you want error=false with the shift register, change the diagram constant accordingly.
    LabVIEW Champion . Do more with less code and in less time .

Maybe you are looking for

  • R/3 to CRM replication,'CRS_SEND_TO_SERVER'

    Hi All, We have extended CRM BP using EEWB. We have created about 20 screen fields. So, they are available at screen and also in the table BUT000. Now I have the same 20 fields in KNA1(R/3) table but not on the screen. If I would like to update any o

  • How do I install an operating system on my erased hard drive when I get the error "This item is unavailable"?

    So i erased my MacBook's hard drive trying to get a fresh, clean system install. After erasing, I tried to install a new OS X with the Recovery drive but after entering my Apple ID it simply says "This item is currently unavailable, Please try again

  • Quicktime and windows 7 beta

    Cant seem to play movies any longer, anyone know when an updated or beta app will come out?

  • Searching messages in XI according to MQSeries message id

    Hey guys, We are using the following scenario: MQSeries -> XI -> SAP IDOC, we find it a little difficult to find messages in XI according to the message ID of the MQSeries (the MQSeries message id is diffrent from xi message id). the MQSeries message

  • IPhoto calendar upload problem

    I am trying to purchase/upload a calendar. When transferring calendar the assembIy step work but then freezez on the upload. I have tried several times over the past 3 days.  Having to re-click "buy now" to get to the upload window again.  I purchase