Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to parse servers response: Failed to parse integer value: 4290772992 #20

Open
anilpatil27 opened this issue May 8, 2023 · 2 comments

Comments

@anilpatil27
Copy link

we are facing an issue with respect to this integer value 4290772992 in java context.
In windows value is parsed properly and no issue is reported.
For the same value in Linux environment below error is occurring.
"Failed to parse servers response: Failed to parse integer value: 4290772992"
Our further analysis showed that:
In windows environment value is parsed by I8parser
In Linux environment value is parsed by the I4parser hence the issue.

Please let me know how can we solve this

@kimhornung
Copy link

ChatGPT gave me the following suggestions:

To solve this issue, you can try using the Long.parseLong() method instead of Integer.parseInt() to parse the integer value. This method can handle 64-bit integers and will not have the same limitations as the Integer.parseInt() method.

Alternatively, you can also try using the BigInteger class to represent the integer value, which can handle arbitrarily large integers.

I hope this is helpful.

@anilpatil27
Copy link
Author

Thank you kimhornung.
I am using Apache XML-RPC library.
This library has I8parser and I4parser java files. These parsers within the library are picked differently in windows and linux environment by the library itself.
any idea why this behavior for the same value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants