Casesensitive Issue in MYSQL

I bumped into a weird issue that my java web application is working perfectly in Windows box where as when I deploy that in linux it throws following error “dbuser1.table1″ doesn’t exist.

After scratching our head for couple of hours I found that I created table with name as “Table1″ in Mysql database where as in the code I called it as “table1″ and that’s the problem. The weird thing is that it everything works fine if the database is deployed in Windows and all this problem will arise only with Linux.

After that I changed the code to access the table with proper name everything works fine. As I used this table name in more than one place it took more than 30 mins to search and replace all entries. So, whenever you have a possibility of linux deployment make sure you use a DBObjectConstants class for holding all database related object names and use that constant through out your application. In this way fixing these kind of issues will be more easier.

Advertisement
This entry was posted in Database, Java and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s