NumberFormatException: for the input string: "1."

I'm trying to load data from a file to TimesTen using JDBC but NumberFormatException error occurs.

This is how my table looks like:

String tab_wysz = "CREATE TABLE WYSZ (CompanyID TT_INTEGER NOT NULL, TT_INTEGER NOT NULL, SearchDate ClientID DATE NOT NULL, Primary Key (CompanyID, ClientID));

How to load data (the same as in the examples of programs of TT):

String INPUTFILEWk = "/ book/wysz.txt";
String INSERTWysz = "insert into Wysz values (?,?,?)";

PreparedStatement pInsOrd = ttcon.prepareStatement (INSERTWysz);

BufferedReader in = new BufferedReader (new FileReader (plik));
String line;

try {}
in = new BufferedReader (new FileReader (INPUTFILEWk));
While ((line = in.readLine ())! = null) {}
Skip comments
If (line.charAt (0) == ' # ') {}
continue;
}
outStream.println ("data:" + line);
String [] fields = line.split(";");

pInsOrd.setInt (0, Integer.parseInt(fields[0])); CompanyID
pInsOrd.setInt (1, Integer.parseInt(fields[1])); ClientID
pInsOrd.setDate (2, Date.valueOf(fields[2])); SearchDate

pInsOrd.executeUpdate ();

reportSQLWarnings (pInsOrd.getWarnings ());
// }
ttcon.Commit ();
}
in. Close();
pInsOrd.close ();
} catch (IOException e) {}
Generative TODO catch block
e.printStackTrace ();
}
catch (SQLException e) {}
e.printStackTrace ();
} catch (NumberFormatException e1) {}
Generative TODO catch block
E1. PrintStackTrace();
}

}

Wysz.txt file looks like this:

1; 88894; 2011-05-17
28; 30799; 2011-07-31
28; 48583; 13-02-2012
28; 116684; 2008-09-23
28; 69301; 2009-08-02
28; 64609; 2007-09-12
83; 6514; 2007-04-29
83; 98420; 2008-06-17
83; 40325; 2008-09-14

The file is located in the UTF-8 encoding, as well as Eclipse that I use to connect database and load data.

The error looks like this:

Connected to the database

Data processing: 1; 88894; 2011-05-17
java.lang.NumberFormatException: for input string: "1."
at java.lang.NumberFormatException.forInputString (unknown Source)
at java.lang.Integer.parseInt (unknown Source)
at java.lang.Integer.parseInt (unknown Source)
at bazy.operacjaInsertILoad(bazy.java:157)
at bazy_zapytania.testInsertInto(bazy_zapytania.java:114)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
at java.lang.reflect.Method.invoke (unknown Source)
to org.junit.runners.model.FrameworkMethod$ 1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
to org.junit.runners.ParentRunner$ 3.run(ParentRunner.java:238)
to org.junit.runners.ParentRunner$ 1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
to org.junit.runners.ParentRunner.access$ 000 (ParentRunner.java:53)
to org.junit.runners.ParentRunner$ 2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Closing the connection



Any sugestion what is the problem?

I just cut-n-Paste the error message in a text box:

« 1 »

and in a simple text box, there is a nonprintable character in front of the 1:
« ? 1. "

Tags: Java

Similar Questions

  • When I try to open e-mail files a small box opens with the setting or the input string was not good format

    original title: windows live suit

    When I try to open e-mail files a small box opens with the setting or the input string was not good format

    Windows Live Solution Center
    http://windowslivehelp.com/

  • date format picture ends before converting all of the input string

    In the following query, I get the error: ORA-01830: date format picture ends before converting all of the input string

    Select sum (e.gl_fig) in the rm_gl e where e.as_on_dt < = trunc (to_date('31-Nov-2011'), 'Q')-1

    Hello

    Moreover, how many days are there in November? It IS 30 or 31?

    Please change from 31-Nov-2011 to November 30, 2011, then it works.

    select sum(e.gl_fig) from rm_gl e where e.as_on_dt <= trunc(to_date('30-Nov-2011', 'DD-MON-YYYY'),'Q')- 1
    
  • How to connect the value of the input string to numeric values

    Hello

    I'm trying to figure out how to connect the value of unique user input string to numeric values. Basically I want the user to enter the name of a gas that I have a list for (I think I put the list of gases in a table >). Then I want to match numeric values 2 'a' and 'b', according to which gas, name of the user has set. These 'a' and 'b' values will be automatically matched with the name of the gas in a list that I put. For example, hydrogen gas has the value 3 for "a" and 4 for "b. when the user puts the ' hydrogen' name in a string constant, automatically 'a' and 'b' must be issued.» I have connect a and b to a formula

    Thanks for any help

    Hello

    It is perhaps not exactly what you are looking for, but perhaps you could use the enumerated data type and the array of clusters of points (a, b).

    Look at the VI I enclose.

  • Display the name of the tag as the column name and the value in the tag as a row of data from the input string.

    Hi Forum members,

    I am looking for a query display the name of the tag as the column name and the value in the tag as a row of data.

    I have to print the values within the tag to a file by choosing the value of the flags. the sequence of the tags will vary each time, as the tag name will change dynamically.

    So here is the example of input data and the expected output. The string in the text column must be separated as the column names and values.

    Input data
    Select 1 as seqno,' < > 0210A 50 4f < / 4f > < 5f20 > TEST CARD 16 < / 5f20 > < 5f2a > < / 5f2a > < 82 > 1 c 00 < / 82 > ' double text


    Output:

    Seqno 4f 5f20 5f2a 82
    0210A 50 16 1 00 TEST CARD 1

    Please help me by providing your entries on this.

    We use the version of Oracle 11.2.

    Note: This is not the XML string

    Thank you

    Shree

    with

    data in the form of

    (select 1 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2a><82>00 1' text of all the double union)

    Select 2 as seqno,'XYZ<4F>0210 A 50<5f20>TEST CARD 16<5f2a><82>00 1' text of all the double union

    Select 3 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2A><82>1 00XYZ ' text of all the double union

    Select option 4 as seqno,'<4F>0210 A 50<5F20>TEST CARD 16<5f2A><82>1 00XYZ' double text

    )

    Select d.seqno, x.*

    d the data,

    XMLTable ('/ root')

    by the way xmltransform (xmltype ('': replace (replace (text,'<><>'),)))

    XmlType (q'~http://www.w3.org/1999/XSL/Transform "version ="1.0"> ")

                                                     

                                                       

                                                         

                                                       

                                                     

                                                     

                                                       

                                                         

                                                       

                                                     

    ~'

    )

    )

    path of columns '4f' varchar2 (10) "tag4f."

    path of "5f20' varchar2 (30)"tag5f20. "

    path of '5f2a' varchar2 (10) "tag5f2a."

    path of varchar2 (10) "82" "tag82.

    ) x


    SEQNO 4f 5f20 5f2a 82
    1 0210A 50 16 TEST CARD - 1 00
    2 0210A 50 16 TEST CARD - 1 00
    3 0210A 50 16 TEST CARD - 1 00
    4 0210A 50 16 TEST CARD - 1 00

    with

    data in the form of

    (select 1 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2a><82>00 1' text of all the double union)

    Select 2 as seqno,'XYZ<4F>0210 A 50<5f20>TEST CARD 16<5f2a><82>00 1' text of all the double union

    Select 3 as seqno,'<4f>0210 A 50<5f20>TEST CARD 16<5F2A><82>1 00XYZ ' text of all the double union

    Select option 4 as seqno,'<4F>0210 A 50<5F20>TEST CARD 16<5f2A><82>1 00XYZ' double text

    ),

    Chopper (seqno, Key, value, String) as

    (select seqno,

    regexp_substr (text,'<(.+?)>', 1, 1, null, 1),

    regexp_substr (Text,'>(.*?))

    regexp_substr (text,'<.+?>. *? ) (.*) $', 1, 1, null, 1). » <>'

    from the data

    Union of all the

    Select seqno,

    regexp_substr (String,'<(.+?)>', 1, 1, null, 1),

    regexp_substr (String,'>(.*?))

    regexp_substr (String,'<.+?>. *? ) (.*) $', 1, 1, null, 1)

    Chopper

    where regexp_substr (string,'<(.*?)>', 1, 1, null, 1) is not null

    )

    Select '4f', seqno, '5f2a', '82', '5f20.

    of (seqno, lower (key) select key, value)

    Chopper

    )

    Pivot (max (value) for key in ('4f' as '4f', '5f20' as '5f20', '5f2a' as '5f2a', "82" as "82"))

    Concerning

    Etbin

  • ORA-01830Date end of photo format before converting all of the input string

    Hi guys,.

    We have two env db a dev and AQ. Both the envs are running on the same version of database and in both the setting nls_date_format envs are the same and they are 'DD-MON-YY' format only. But when I execute the same statement immediately following my dev env is fetching data appropriate without any problem but my env qa is any mistake on the mentioned error.

    I enclose the suite that I use

    SELECT TPTRJO1. JOURNAL_ENTRY_ID
    OF TRANSACTION_JOURNAL TPTRJO1,.
    JOURNAL_CASH_DRAWER TPJCD1
    WHERE (TPJCD1. CASH_DRAWER_ID = 5010639.0)
    AND (TPJCD1. DRAWER_SEQ = 5.0)
    AND (TPJCD1. CASH_DRAWER_DATE = TO_DATE ('2011-09-13 00:00:00 ', 'yyyy-MM-dd'))

    AND (TPTRJO1. JOURNAL_ENTRY_ID = TPJCD1. JOURNAL_ENTRY_ID)
    AND (TPTRJO1. TRANSACTION_ID = 595,0)

    However, according to the logic, it should error in both the envs due date format and the actual data used in the entry.

    What would be the possible difference between the envs db towing?

    Please, share your ideas.
    Any suggestions are appreciated.

    Thank you and waiting for an early response

    I assume that you have given in your dev environment.
    If there is a record with TPJCD1. CASH_DRAWER_ID = 5010639.0,
    the expression ' TO_DATE ('2011-09-13 00:00:00 ', 'yyyy-MM-dd').
    will never be evaluated.

    Here is my test scenario where '1 = 0' prevents the date under evaluation:

    SQL>SELECT *
      2    FROM all_objects
      3   WHERE created > TO_DATE('2011-09-13 00:00:00', 'yyyy-MM-dd');
     WHERE created > TO_DATE('2011-09-13 00:00:00', 'yyyy-MM-dd')
                             *
    ERROR at line 3:
    ORA-01830: date format picture ends before converting entire input string
    
    SQL>
    SQL>SELECT *
      2    FROM all_objects
      3   WHERE 1 = 0 AND created > TO_DATE('2011-09-13 00:00:00', 'yyyy-MM-dd');
    
    no rows selected
    

    URS

  • REGISTRY FOR THE FAVORITES STRING

    I have CHANGE THE REGISTRY STRING IN WINDOWS 7 FAVORITES, NOW IT LIST PROGRAMS on THE COMPUTER.  I NEED FOR KNOW HOW CHANGE THE STRING BACK SO THAT FAVORITES FOLDER VA BEING JUST WHAT ABD BOT PROGRAM LIST.  I KNOW TWO STRINGS HAVE to BE CHANGED, BUT DID NOT KNOW WHAT SHOULD BE THE STRING.

    Hi PFBENT,

    · What exactly you are trying to accomplish by publishing for the Favorites of the registry

    You can do the system restore. Restore the computer to the date prior to the time that you have changed the registry entries, link to get the procedure please refer to:

    How to restore Windows XP to a previous state:http://support.microsoft.com/kb/306084

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • SimpleDateFormat giving different results for the same string in the form

    I use http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/i18n/SimpleDateFormat.html for formatting my date and time fields.

    I got a bug report that a device on English (UK) has a problem where the time turns off the screen, and I was able to reproduce this on device and Simulator.

    It's the pattern string that I use: hh:mma

    (hour 2 digits, colon, minute 2-digit and one letter for 'a' or 'p')

    English or r I get the result you want, for example 12: 12 p '

    "On English (UK), I get two letters for one / p marker, for example ' 12:12.

    (as if I had used 'hh:mmaa').

    What is the desired behavior? My client doesn't like it and wants a look and feel unique, with only one letter for 'a' or 'p', and I'm a little hesitatant to use aubstring...

    I usually do so, but our customer asked specifically localized to the date and time formatting.
    I have the model in my resource files, as the requested values are not easy to manage with the dateformat standard.

    Well, I have submitted comments on the entry of doc API, the doc is fake or the OS has a bug.
    I use substring if the string endsWith (am or pm) now...

  • Option required for the input column, turning off all other features

    Hello

    I have a JSF page that contains a VO, where some are output columns and others are columns of entry.
    I gave required: = True to the input (in the property inspector) column and creates a delete (as a button) operation for every row of VO, works very well.

    When I get back the input value and pressing the delete operation, works well.

    How can I remove the line even without grasping the value of input column... ?

    Note: with to enter the value, if we carry out any operation on the page (such as clicking on the buttons) it will first trigger dialog "enter the value.


    Kind regards.

    Try to 'immediately' property to true in your button remove to ignore the validation phase.

    Kind regards.

  • Using a Global Variable for the input recorder DisplayRange

    I'm assuming; Since I can't do it; that you cannot change the display range of a graphic recorder by using a variable.  If there is a way I'd love to know how.

    Thank you!

    Determine if you can use a global variable is to click right in the parameter field. If the global variable is available in the context menu, then you can use a variable y.

    You can use a variable of the y-axis from the settings.

    You cannot use a variable for the display range of the x-axis parameter. This is because DASYLab needs to know the amount of memory to be allocated at the beginning of the measure.

  • control of the input string to the character to character upcase?

    Is there a property or method in chain control who can change the input character upcase character?

    Try the attached VI.

    Edit: Make sure that the update while typing of property is selected.

  • Definition of default values for the inputs of button and the cursor?

    Hello

    I use Labview 8.5.1 and have a few entries button and zipper-type on my front. How can I set some of them having specific (as opposed to zero) default values when the VI is executed?

    Thanks for the help

    The default value for the type of slide of entry (or button).

    Right-click on the control.

    Select "Operations on the data" > "default to the current value of doing."

  • search for the slash string reverse

    I'm trying to match a pattern in a path. For example, the path is "------\Amss02\modemdata\New\WO 4276\11243_Mar_01_2007_13 16.txt ' and I want to search the 11243 number in the path. Right now I am corresponding to a model of 11243 works and converted to a string. But if I want to search 112 or 124, and then it returns this as valid path, which is not. I tried to match the \112_ model (added the backslash and one trait underscore), but the backslash's antics with the search, I think.

    Any ideas?

    Tay

    Thank you! That fixed this issue.

    Tay

  • How to get these substrings based on the input string

    Hi friends
    I want the substring entered the string
    the chain is something like this: 1234,3653,7684,3254,8777,987,234
    now, I want to
    the substrings between commas

    can someone help me with this pls

    in the first substring I need 1234
    in the second, I need 3653...
    so on until the end...
    regardless of the channel is to the last

    pls help

    Hello

    You can do something like this:

    SELECT     txt
    ,     REGEXP_SUBSTR (txt, '[^,]+', 1, 1)     AS part_1
    ,     REGEXP_SUBSTR (txt, '[^,]+', 1, 2)     AS part_2
    ,     REGEXP_SUBSTR (txt, '[^,]+', 1, 3)     AS part_3
    --     ...
    FROM     table_x
    ;
    

    If there are less than n parts, then the technique above will not raise an error; It will just return null for part_n.

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements), and the results you want from this data.
    Explain how you get these results from these data.
    What you want if the entry is like this.
    {code}
    "foo, bar".
    {code}
    ? You want to treat this as 2 pieces ('bar' is the 2nd) or a 3 s (the 2nd is NULL, and 'bar' is the 3rd)? Include examples in your sample data and results.
    Always tell what version of Oracle you are using.

  • [Flex entry for the c# string array type: string]

    Quick question, what would be the type of entry for Flex if the data on the web service type c# asp.net is an array of strings, string [], it seems to automatically detect as an ArrayCollection, but collection which isn't fair, so I suppose that table, but I would still like to confirm this.

    Thank you

    Shaine

    It was in fact collection arraycollection:------.
    the answer is:

     

    var _compEmp:ArrayCollection = new collection ArrayCollection (new Array ("Shaine Fisher"));

    Thank you

Maybe you are looking for

  • Seizure semi-automatic Firefox redirects me to the wrong Web site

    Sometimes, when I type a URL of Web site in the address bar, it autocompletes the URL of the Web site, but then after I pressed Enter, it goes to the wrong website (the website that appears first on the drop-down list). My example is when you type 't

  • Portege Z10T-A140: can I make to Win 8.1 and where to find the serial key

    HelloI have Z10T-A140. When I check the part number in the link: http://www.toshibamea.com/en/Compatibility-Matrix-8-1?SerialNo=pt131v-00h005ar told me is not compatible with win 8.1. but to under writing the page, it is compatible with win 8.1. Why

  • How to get the computer to recognize the Extender

    original title: I have a range of universal wifi netgear WN3000RP to extend, received the signal from my router, but don't know how to say my comp I have extender I have an exterder of range universal wifi WN3000RP received the signal from my ROUTER,

  • Windows Vista Edition Home Premium

    I just bought an hp computer that came with vista home premium already installed but not save the software came with it. is there anyway I can get a download if my computer crashes and I have to reformat. preferably a free download or at least not re

  • LaserJet Pro M1217nfw booting is not after the firmware update

    Hello My configuration: HP LaserJet Pro M1217nfw (USB connection) MacBook Pro (mid-2012) running OS X Lion 10.7.5 My Odyssey: The HP scanning software included on the CD is rudimentary to say the least. In particular, it don't will not let me scan mu