NumberFormatException resolving help

I got a problem like,
I have a string say "5.22".
The existing code converts to Integer.parseInt("5.22").
The code initially
int j = Integer.parseInt("5.22";
pstmt.setInt(2, j);
Since it is not an Integer NumberFormatException occurs.
The datatype of the value is NUMBER(5). I removed the Integer.parseInt and checked the but something like UNIQUE CONSTRAINT VIOLATION is coming.
My fix
float j = Float.parseFloat("5.22");
pstmt.setFloat(2, j);
error
java.sql.SQLException: ORA-00001: unique constraint
The value is not already present in the table I checked.
Now I need help in,
The datatype of the value in table 'NUMBER(5)' cannot be changed as it is common table for whole project. Is there any way to make the system accept the "5.22" as string then to float and then to Integer?
The value 5.22 should not change while inserting into the table. I tried to convert float to int, Float.parseFloat nothing worked correctly.
Edited by: 915175 on Aug 3, 2012 5:20 PM

915175 wrote:
I got a problem like,
I have a string say "5.22".
The existing code converts to Integer.parseInt("5.22").
The code initially
int j = Integer.parseInt("5.22";
pstmt.setInt(2, j);
Since it is not an Integer NumberFormatException occurs.
The datatype of the value is NUMBER(5). I removed the Integer.parseInt and checked the but something like UNIQUE CONSTRAINT VIOLATION is coming.
My fix
float j = Float.parseFloat("5.22");
pstmt.setFloat(2, j);
error
java.sql.SQLException: ORA-00001: unique constraint
The value is not already present in the table I checked.
Now I need help in,
The datatype of the value in table 'NUMBER(5)' cannot be changed as it is common table for whole project. Is there any way to make the system accept the "5.22" as string then to float and then to Integer?
The value 5.22 should not change while inserting into the table.
The column is effectively defined as an integer. It will only accept integers. There is no way it will accept 5.22. Ever. In the end, you must either round or truncate 5.22.
I tried to convert float to int, Float.parseFloat nothing worked correctly.You can pass it through various functions and transformations until the cows come home. But when the result finally gets to the INSERT, it must be an integer. Period.
Edited by: 915175 on Aug 3, 2012 5:20 PMEdited by: EdStevens on Aug 3, 2012 7:32 AM

Similar Messages

  • TS5168 some of my pictures say that the necessary data reference could not be resolved. help

    some of my pictures say that the necessary data reference could not be resolved. help

    It means iPhoto can't find the file.
    There are 9 different versions of iPhoto and they run on 9 different versions of the Operating System. The tricks and tips for dealing with issues vary depending on the version of iPhoto and the version of the OS. So to get help you need to give as much information as you can. Include things like:
    - What version of iPhoto.
    - What version of the Operating System.
    - Details. As full a description of the problem as you can. For example, if you have a problem with exporting, then explain by describing how you are trying to export, and so on.
    - History: Is this going on long? Has anything been installed or deleted? - Are there error messages?
    - What steps have you tried already to solve the issue.
    - Anything unusual about your set up? Or how you use iPhoto?
    Anything else you can think of that might help someone understand the problem you have.

  • Error -2000 necessary data reference could not be resolved-- HELP!!!

    So, I work in a nurse's office at a medical school editing video on an iMac 2.33 GHx Intel Core 2 Duo with 3GB 667 MHz DDR2 SDRAM. Mine is the only mac in the office, the rest of the secretaries, nurses, and grad students are on windows XP.
    My job is basically to edit videos (color correct, blur faces of patients' relatives, etc) from a study they did, and export the videos to a DVD (as a data disk, not a DVD with menus) so they can show them to each other and various committees on their windows machines.
    For the longest time, this went off without a hitch, but most recently, I tried burning some .mov files to disk, and whenever they play on any machine (windows xp) we get "Error -2000 necessary data reference could not be resolved." I re-burned the disks, and now, they are selective! They play on some of the office computers, but not all... including the target machine where they will ultimately be screened for a committee... even on the 2nd batch of disks, that error is still present...
    I know about video editing, and to some degree disk burning (I used the "New-->burn folder" option to create the data disk, burning them at 2x speed for reliability). But I don't know enough about computers to figure out what this error means, or why these disks won't work!! Somebody please help!
    (and you can save the sales pitch... I'm a mac user through and through, and there is no way in heck my office will ever have enough money or motivation to switch over)
    Thanks for your help!!

    I wont address the problem but that you should have your videos. Dont you still have them on your camera? If not, just get it from your friend. Btw, do this the next tíme around ... Whenever you plug in the camera and your  iPhoto/pic Application opens up, BEFORE you have iPhoto import them, use Finder to copy the photos over to your HDD or an external drive. This is so that YOU always have the originals BEFORE your pic Application does.

  • RESOLVED: HELP! No Longer Able To Download / Sync

    A week ago, I posted the following problem:
    Last month I downloaded the latest version of iTunes. When I installed it, I found I could no longer sync up the iPod (version 3.1). I got a pop-up message which read, "The software required for communicating with the iPod is not installed correctly. Please reinstall iTunes to install the iPod's software." And then a directory window for an "H" drive popped up.. I'm assuming "H" is what my PC assigned to the iPod. Obviously, the first thing I tried was reinstalling iTunes.
    I searched Apple's site, and found a description of the problem at http://docs.info.apple.com/article.html?artnum=93716
    The problem was that I couldn't restore the iPod. When I tried to run iPod Updater, I got an error message. I was able to solve it by following this: http://docs.info.apple.com/article.html?artnum=93499. The important point, I believe is that I completely removed iTunes and the iPod Updater, rebooted, re-loaded the iPod Updater, did an update (didn't need to restore), and THEN re-loaded iTunes.
    Hopefully this can help someone else.
    Sony   Windows XP  

    it's still a good idea to try the MSCONFIG thing to see if there's a conflict:
    Using MSCONFIG to troubleshoot conflicts in Windows
    if you still get the message after that, you can just reenable all those items again.
    also check to see if you've got a Fast User Switching issue going on:
    iPod for Windows: Fast user switching in Windows XP is not supported

  • Javax.servlet cannot be resolved - HELP

    I am using Eclipse to develop a Servlet application but Eclipse cannot resolve the javax.servelet package. Is there a special j2ee package I am suppose to download or do all the j2ee packages come with the JDK? I am running J2SE 1.5. I did not download the JDK seperately because I assumed in came with Eclipse.
    What do I have to do so that Eclipse can resolve the javax.servlet package and all j2ee packages?

    Do you mean that I have to define a new Environment
    variable in WinXP that point to the location of
    servlet.jar?no
    >
    I don't have a servelet.jar file BTW.servlet.jar is a part of the j2ee download so if you
    just have j2se it may not be there.
    it is bundled with tomcat also and should be in the
    <tomcat home>common/lib directory.
    it is also bundled with netbeans in the directory
    <netbeans home>/tomcat/common/lib
    you can download it from sun and add it in the java home lib directory

  • NumberFormatException plz help...

    have encountered a NumberformatException and I am giving stacktrace
    at java.lang.NumberFormatException. 0(NumberFormatException.java:48)
    at java.lang.Long.parseLong(Long.java:415)
    at java.lang.Long.<init>(Long.java:630)
    at domaintt.main(domaintt.java:29)
    It occurs in the given statement
    Long duration =new Long(form.getDuration()) /* getDuration() returns a string which is equal to no of hours */
    I want to replicate this Exception with some sample data.I.e like
    Long l = new Long("uuu");
    I am able to produce the Exception but in some other format like
    java.lang.NumberFormatException: For input string: "uuu"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Long.parseLong(Long.java:415)
    at java.lang.Long.<init>(Long.java:630)
    at domaintt.main(domaintt.java:29)
    if i give
    Long l =new Long("0"); it's not thowing exception as expected.Then in what scenario
    java.lang.NumberFormatException. 0(NumberFormatException.java:48)
    will occur.I am unable to replicate and i do not understand In case of '0'
    how it will thowing exception.
    I am wondering why in case '0' it is throwing Exception and any way I am passing string as parameter.so Stack trace should be as
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Long.parseLong(Long.java:415)
    at java.lang.Long.<init>(Long.java:630)
    at domaintt.main(domaintt.java:29)
    but it is not like that.
    Thanks,
    kanth.

    You already asked this question here: http://forum.java.sun.com/thread.jspa?threadID=673153
    Don't start another thread for the same question.
    kind regards,
    Jos

  • Duplicates appearing when user adds someone to 'to' field in Outlook 2010 calender invite

    Hi Everyone,
    I have a user that when they send calender invites, when they add people in the 'to' field they will appear multiple times. i.e the contact address, the full email address etc.
    We have re - imaged the PC, re created the users PST file, run outlook in online mode, Moved the users account to another DB, and still no progress, duplicates are still appearing
    See attached screenshot for example
    Has anyone had to deal with this problem before, if so how was it resolved, if it was ever resolved, Help would be greatly appreciated as we are scratching our heads in IT here

    Hi,
    As per the description, I understand that you'll have duplicate email addresses in the To... field when create calendar invites.
    In order to understand the issue more deeply, I would like to clarify the following questions:
    How did he/she "add people" in the To... field? Did he/she directly type email address or pick it from your address book?
    Will the duplicate happen right after adding people in the To... field or after sending the invites?
    Seems you've tried a lot on the machine side, I suggest we first try this on OWA (Outlook Web App) and see if issue persists. This will help to determine whether the issue is on the client side or the mailbox (server) side.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Attaching images in Mail

    Hello!
    I've only recently started using Mail.
    I work from home, freelance as an illustrator.
    As you can imagine I have to send a lot of images, usually as JPGs or PDFs.
    I'm having a major problem with this:
    Mail converts the PDFs into small thumbnails in the line of the email,
    which is fine.
    but it's not attaching the file itself.
    for example, I need to send a client a 300dpi A3 poster for them to print.
    the image they are recieving is the thumbnail alone, 300Kb JPG
    the file I need to send them is a 3MB PDF
    I've tested it to three different recieving mail clients and it happens with them all. This is going to make Mail impossible for me to use for my work if this cannot be resolved
    help!

    pez_queen,
    When I attach a document/picture an "Image Size" selection choice appears in the bottom right hand corner of the "New Message" window. This selection includes choices for:
    Actual Size
    Small
    Medium
    Large
    Have you tried choosing another size?
    ;~)

  • WRT54G blank router settings page, then the whole network goes down

    Alright, heres the setup:
    (1) DSL Modem
    (1) WRT54G Router
    (1) Desktop WinXP Pro SP2 machine, hardwired to router
    (2) WinXP Pro SP2 laptops, wireless - one with built-in wireless, one with a Linksys WPC11 Instant Wireless Network Adapter, version 3.
    (1) WinXP Media Center SP2 laptop, wireless
    (1) Ubuntu Personal Edition - "Feisty Fawn" 7.04 laptop, wireless
    The router has been set up to use WPA-TKIP encryption on channel 6 with an always-on PPPoE connection; it also has an IP of http://192.168.2.1 to avoid an IP conflict with the DSL Modem. DHCP Server is enabled with default settings, MAC Address Clone is disabled, and Operating Mode is set to Gateway. Access is set to allow both B and G, as one of the WinXP Pro laptops is an older model Toshiba that only recognizes the B protocol (that's the one with the WPC11 card).
    Here's the problem:
    Initially, the setup works flawlessly. All computers are able to see the SSID, connect to the network, and connect to the internet. The connection is fine, doesn't slow down, and is overall pretty healthy. All computers are able to access http://192.168.2.1, and are prompted with the username/password prompt, can change settings, port forwarding, etc.
    Now, wait a few days. Usually about a week.
    First, the Ubuntu laptop starts to get spotty with it's connection to the internet. After about 10 minutes, the connection to the network starts to fail. Sometimes it will see the SSID, sometimes it won't - and it's not a matter of moving the laptop. It stays pretty much on the same desk and acts as a desktop 98% of the time. If you try to access http://192.168.2.1 nothing happens. No username/password prompt, no "access denied" message. Rebooting the machine doesn't improve the situation. Manually entering in the SSID and password don't work, either.
    At this point, all of the other computers are still able to access the internet. However, trying to access http://192.168.2.1 with *any* of the other machines fails. Even if I try to access it with the wired desktop machine, there is no prompt, no error messages, just a blank white page with a "done" status in both Firefox and IE.
    After about a day or two of this, all other machines except for the wired desktop computer will cease to see the SSID and all connections to the network fail. No network access, no internet access. The only machine still connected to the network and the internet is the wired desktop machine.
    What I've tried:
    At this point, I usually power cycle the Linksys router - and viola, back to normal.
    As far as settings-side, I've tried changing just about every setting I can that wont break the system; I've tried changing channels, changing the encryption, changing the IP of the router... and nothing seems to fix the problem.
    I've also looked at just about every forum, posting, help-reference, and how-to, and I can't seem to find a solution to the problem, or even what's really happening to cause it.
    Normally, I wouldn't take issue with having to restart the router. It's not a big issue for me, personally. But I set up this network for someone else, and at the end of this month I am moving, so I would like to fix and resolve the issue so that they don't have to restart the router every week. They are not very tech-savvy people and I don't want to make things more complicated than they have to be. At the least it's a minor inconvenience, and at the most it's a disaster and a call every week from them asking how to fix it.
    Message Edited by on 07-29-2007 12:34 PM
    Message Edited by   on 07-29-2007 12:35 PM

    I have this exact same issue. I'm using the WRT54G v8 with Firmware Version: v8.00.2 (latest version)
    The log feature of mine was turned on, so I've turned it off.
    As for the P2P, 2 of the 5 computers connected to my network are using it. Are there any suggestions to resolve/help the P2P problem?
    I've also noticed that when the 'no setup page' problem happens, if I do an LAN port scan of the router, port 80 is no longer open. Very wierd.
    After chatting with the Linksys Tech support, they say to take it back to the store (although I'll try these options first)

  • File was Skipped because it is older than "store data

    i have a mail flow central install 1.4 for a customer. when i see in the status, it show success but remark written "file was skipped because it is older than "store data for" the date". After a while, it stop pulling the logs from ironport. any idea what is going on?

    This message is created in the cmt logs and sent to the customer when the log file that MFC is importing from the Ironport is older than the value set in the MFC System Administration > Configuration > 'Store Data For:' field.
    Concerning why it stopped pulling logs, what is the last date of logs pulled back? When you look at that host, does it say failed or success? If it says failed, maybe the password has changed. Let me know what you see.
    Also, fyi, there is a new feature that was introduced in AsyncOS 6.0 release, where it kind of brings MFC on-board the IronPort appliance.
    New Feature: On-Box Message Tracking
    AsyncOS 6.0 for Email includes an on-box message tracking interface that allows you to track messages that traverse your IronPort C-Series or X-Series Email Security appliance.
    The message tracking feature makes it easy to find the status of messages that the Email Security appliance processes. Email administrators can quickly resolve help desk calls by determining the exact location of a message. With on-box message tracking, an administrator can determine if a particular message was delivered, found to contain a virus, or placed in a spam quarantine — or if it is located somewhere else in the mail stream.
    Instead of having to search through log files using “grep” or similar tools, you can use the flexible tracking interface of the Email Security appliance to locate messages. To track messages, you create a message tracking query. You can use a variety of search parameters in combination, and you can refine tracking queries to narrow the result set.
    i have a mail flow central install 1.4 for a customer. when i see in the status, it show success but remark written "file was skipped because it is older than "store data for" the date". After a while, it stop pulling the logs from ironport. any idea what is going on?

  • My MacBook Pro behaves funnily!

    Hello Everybody,
    Some seroius observations, to resolve, Help Required.
    ISSUES troubled with.
    Laptop Hangs and freezes. So, I have to restart again and again.
    When restarted, from shut offf position, following warning comes!
         Your date is wrongly set as 01 01 2000. some functions and applicatiions will not work properly. From last two months this is happening!
       3.  I can play songs on itunes but no DVD plays! what happened I dont know. Any text cd works, but  no DVD  works! tried different DVD's as this is not reconised itself, on the desktop!  Cannot o[en the files it says!!
    Therefore it does not plays! However, YOUTUBE works with sound, no problem , on video too no issues, as it plays well.
        4. Laptop is updated with latest versions available on Apple site.
        5. If it is a virus problem or an application problem, please let me know as to how to resolve this.
    Can some body help me!
    Thanks
    GVJOSHI
    14 Apr 2001.
    <Email Edited By Host>

    You have either a hardware problem or just software.
    Hardware:
    DVD drive is failing, possibly. Although may be just software. Try a SMC and PRAM reset.
    First thing I'd do is the SMC and PRAM reset.
    Then I'd Wipe the drive and reinstall OS X and then add programs one at a time and check how the system runs.
    If it runs find until you get to one certain piece of software then you know it is that software. If it doesn't runn good then it is more then likely a hardware problem.

  • Jdeveloper Load Errors: oracle.jbo.dt.objects.JboException

    I am trying to extend a view object in Jdeveloper 10.1.3.1
    I get the following errors when starting Jdeveloper:
    Error 1:
    Load error.
    Object: oracle.apps.xdo.oa.schema.server.TemplatesVIEOView.DataSourceId
    Project: C:\Jdev10g\jdev\myprojectsXXPERProjAsgEnd.jpr
    Entity Attribute for this View Attribute cannot be found.
    oracle.apps.xdo.oa.schema.server.TemplatesVIEO.DataSourceId
    oracle.apps.xdo.oa.schema.server.TemplatesVIEOView.DataSourceId
    Exception: oracle.jbo.dt.objects.JboException
    Error 2:
    Load error.
    Object: oracle.apps.fnd.wf.worklist.server.GranteeListVO
    Project: C:\Jdev10g\jdev\myprojectsXXPERProjAsgEnd.jpr
    For input string: "False"
    Exception: oracle.jbo.dt.objects.JboException (java.lang.NumberFormatException)
    Please help.

    Hi,
    There is no blank line before the <?xml. statement.It is the 1st line in the server.xml file.An note the server.xml file that I am trying to load now just after creating the project is the one that I have dowloaded from the application server.
    Regards,
    Krishnan

  • Yosemite 10.10 software does not support Advent printer software-why?

    Yosemite 10.10 software does not support Advent printer software-why?
    Cannot use printer until resolved-help!!

    Did you ask Advent? It's not on the supported list:
    OS X: Printer and scanner software available for download - Apple Support
    You could try the "sandboxing relaxed" workaround offered here for other manufacturers, but Advent needs to update their drivers.
    kodak printers and Yosemite

  • Asktom

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4347359891525
    Prouduced the following:
    ORA-01654: unable to extend index ASKTOM.SYS_C004055574 by 1024 in tablespace FLOW_19246
    Is Tom sleeping?
    Cheers,
    Philani

    Hi CKPT,
    If page not working, then google is sleeping?I can't agree on that.. google is able to (reach)fetch perhaps.. might be issue with page loading.. as the error is popping out on that page it self.
    Durbanite,
    Coming to your issue, it's every much clear - try to check out the what things are currently the sessions are carrying out which effected the index. Try to check across the space available with respect to index.
    Note - Durbanite - Don't ping out such things with respect to website pages... better post across the issue - so that we can try to resolve/help from our end too.
    - Pavan Kumar N
    Edited by: Pavan Kumar on Jun 16, 2011 2:29 PM
    Edited by: Pavan Kumar on Jun 16, 2011 2:30 PM

  • Cannot upgrade schema

    Trying to upgrade to gw2012sp1. I cannot get started due to my schema
    not upgrading. I keep getting the message:
    Add attribute homePhone to class GroupWise External Entity.
    I've tried this several times in C1, plus have tried to manually add
    this via iManager, all to no avail. I don't have the gwschema.sch to
    run the ndssch command.
    I don't want to continue until I get this resolved, help!
    Stevo

    Argh! Such a simple fix: tid 7008420, sent to me via NTS. Glad it was
    something simple.
    Stevo

Maybe you are looking for

  • No amber update lumia 620

    no amber till now. can someone answer me some questions? my firmware revision no. is 1030.6407.1308.0001. do i have to update it to 1030.6407.1308.0002 to get the amber update? is the update is carrier specific in India? my mobile operator-000-IN man

  • MAC iOS 10.4.11 compatible with which version of Apple SDK?

    Hi, I have 10.4.11 MAC OS....I want to install the SDK for mobile App development and testing. Can anyone tell me which version of SDK I need to install to make it work without having to update my iOS? Thanks, Prasun

  • Let user drag drop dynamic components, resize them

    I'm just wondering how you can create UI components and let the user drag and drop them on the screen let the user resize the elements, change the text for example or rotate the element (just like scrapblog) Lets say you want to have an image object.

  • I cannot get multichannel from my 2011 mini mac

    I recently brought a 2011 mac mini 2.5ghz and iam expereincing issues regarding the output of the sound through the hdmi output . The midi settings are configured correctly for this 6 channe l 24 bit 192,000 into a multichannel cable unit. Regardless

  • 9.13 - Can't install SKUs

    I've got two different environments suffering the same problem when trying to install the three 9.13 SKUs. One is an upgrade from 9.12 (Win 7, MSSQL 2012, WebLogic 11gR1, jdk 1.7.0_51), second is a clean install (Windows Server 2008, MSSQL 2012, Webl