开发者

java.lang.NumberFormatException on parsing with commons-digester

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜