Through our REST Webservices I want to insert double byte (utf-8) characters in MySql Database which is located on AWS cloud .
We have 2 db instances on cloud:
- local
- dev
We are using Tomcat server on our Windows machine and did all required changes for utf-8 support at db level and everything working perfectly fine and we are able to insert/update/fetch special characters through our code from local tomcat (whereas local DB is located on cloud only).
But when we are trying to insert the special characters by hitting the same services deployed on AWS EC2 UniBox DEV environment which is pointing to DB of DEV instance which is also located on cloud same as local db instance, we are getting below mentioned error :
{
"errorCode": 500,
"message": "Database Connection/SQL Error.",
"error": "CallableStatementCallback; uncategorized SQLException for SQL [{call sp_sign_up_insert(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; SQL state [HY000]; error code [1366]; Incorrect string value: '\\xAC\\xED\\x00\\x05t\\x00...' for column 'host_first_name' at row 1; nested exception is java.sql.SQLException: Incorrect string value: '\\xAC\\xED\\x00\\x05t\\x00...' for column 'host_first_name' at row 1"
}
We have configured our Database's connection details from Tomcat's server.xml and the same entries are present on dev environment's server.xml as well.
I tried many things by tweaking entries of server.xml located on DEV environment with reference to blogs and many more but nothing has worked......
It would be of great help if anyone can suggest that what might be the reason due to which we are facing issues performing same thing on DEV env when it is working perfectly fine from local.
Thanks in Advance !!! In real need of your inputs :)