0

commons-digesterを使用してxmlファイルを解析しているときに、java.lang.NumberFormatExceptionが発生します。

それが何を意味するのかわからない:

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)
    ...

これは完全なエラーメッセージです:http://pastie.org/1708720

そしてこれはコードです:http://codepad.org/tw39paE1

ありがとう

4

2 に答える 2

1

合格flickrmeetup rochester dan totheright 200701してInteger.parseInt() いないようですが、受け入れられません

于 2011-03-24T16:19:04.763 に答える
0

関数に渡された文字列に解析可能なintが含まれていない場合、Integer.parseInt()は「NumberFormatException」をスローします。

関数に渡される文字列は「flickrmeetuprochesterdantotheright200701」です。数値のみを含む文字列を渡す必要があります。例:「0」、「1234」、「999」。

お役に立てれば。

于 2011-03-24T16:27:08.383 に答える