开发者

java.lang.NumberFormatException on parsing with commons-digester

开发者 https://www.devze.com 2023-02-19 06:54 出处:网络
I get a java.lang.NumberFormatException, while parsing a xml file with commons-digester. Not sure what it means:

I get a java.lang.NumberFormatException, while parsing a xml file with commons-digester.

Not sure what it means:

Caused by: java.lang.NumberFormatException: For input string: "flickrmeetup rochester dan totheright 200701"
    at java.lang.NumberFormatException.forInputSt开发者_运维问答ring(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:449)
    ...

This is the complete error message: http://pastie.org/1708720

And this is the code: http://codepad.org/tw39paE1

thanks


It seems you have passed flickrmeetup rochester dan totheright 200701 to Integer.parseInt() which is not acceptable


Integer.parseInt() throws a "NumberFormatException" when the string passed to the function does not contain parsable int.

The string passed to the function is "flickrmeetup rochester dan totheright 200701". you need to pass a string containing only number values. e.g : "0" , "1234", "999".

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号