使用commons digester解析时的java.lang.NumberFormatException
在使用commons digester解析xml文件时,我得到一个java.lang.NumberFormatException 不知道这意味着什么:使用commons digester解析时的java.lang.NumberFormatException,java,apache-commons-digester,Java,Apache Commons Digester,在使用commons digester解析xml文件时,我得到一个java.lang.NumberFormatException 不知道这意味着什么: Caused by: java.lang.NumberFormatException: For input string: "flickrmeetup rochester dan totheright 200701" at java.lang.NumberFormatException.forInputString(NumberForma
Caused by: java.lang.NumberFormatException: For input string: "flickrmeetup rochester dan totheright 200701"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
...
这是完整的错误消息:
这是代码:
谢谢似乎您已经将
FlickrSetup rochester dan totheright 200701
传递给了Integer.parseInt()
,这是不可接受的Integer.parseInt()在传递给函数的字符串不包含可解析int时抛出“NumberFormatException”
传递给函数的字符串是“Flickrmetup rochester dan totheright 200701”。您需要传递一个只包含数值的字符串。e、 g:“0”、“1234”、“999”
希望这有帮助