Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Service XML - Mapping to BigInt
I'm having issues mapping a very large BigInt in my MySQL DB to the java type "int". The BigInt is 999999999999 and service layers API is turning it in to 9.99999999999E11. So, of course, I get the below error
[JDBCExceptionReporter:82] '9.99999999999E11' in column '1' is outside valid range for the datatype INTEGER.
When I try to change the service xml for that column and set the type="long" I get the error
ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
Is there another data type besides I can set in my service.xml besides "int" that will work??
Hi Kevin,About your exception:
ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
Can you attach the log with the full exception?
ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
Can you attach the log with the full exception?
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™