{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/2018","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/2018/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/2018/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/2018/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/2018","id":107020256,"number":2018,"title":"\"Table 'jhipster.jhi_user' doesn't exist\" error on new app","user":{"login":"piedrahitac","id":11531844,"avatar_url":"https://avatars.githubusercontent.com/u/11531844?v=3","gravatar_id":"","url":"https://api.github.com/users/piedrahitac","html_url":"https://github.com/piedrahitac","followers_url":"https://api.github.com/users/piedrahitac/followers","following_url":"https://api.github.com/users/piedrahitac/following{/other_user}","gists_url":"https://api.github.com/users/piedrahitac/gists{/gist_id}","starred_url":"https://api.github.com/users/piedrahitac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piedrahitac/subscriptions","organizations_url":"https://api.github.com/users/piedrahitac/orgs","repos_url":"https://api.github.com/users/piedrahitac/repos","events_url":"https://api.github.com/users/piedrahitac/events{/privacy}","received_events_url":"https://api.github.com/users/piedrahitac/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jhipster/generator-jhipster/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-17T16:15:01Z","updated_at":"2015-09-18T20:50:34Z","closed_at":null,"body":"## Overview\r\n\r\nAfter creating a new app using MySQL and OAuth2 on Linux, the app is inaccessible because the user always receives an authentication error.\r\n\r\nThe logs report `Table 'jhipster.jhi_user' doesn't exist` even though the table was created correctly upon application deployment.\r\n\r\nThe problem seems to be associated with the case of the table name. The query is using lowercase while the table was created using uppercase. Using the same case in the query and the table name seems to fix the issue.\r\n\r\nThis didn't happen in previous versions of JHipster.\r\n\r\n## JHipster version(s)\r\n\r\n2.21.0\r\n\r\n## JHipster configuration\r\n```json\r\n`{\r\n  \"generator-jhipster\": {\r\n    \"baseName\": \"jhipster\",\r\n    \"packageName\": \"com.piedrahitac.jhipster\",\r\n    \"packageFolder\": \"com/piedrahitac/jhipster\",\r\n    \"authenticationType\": \"oauth2\",\r\n    \"hibernateCache\": \"ehcache\",\r\n    \"clusteredHttpSession\": \"no\",\r\n    \"websocket\": \"no\",\r\n    \"databaseType\": \"sql\",\r\n    \"devDatabaseType\": \"mysql\",\r\n    \"prodDatabaseType\": \"mysql\",\r\n    \"searchEngine\": \"no\",\r\n    \"useSass\": true,\r\n    \"buildTool\": \"maven\",\r\n    \"frontendBuilder\": \"grunt\",\r\n    \"javaVersion\": \"8\",\r\n    \"enableTranslation\": true,\r\n    \"rememberMeKey\": \"obscured\"\r\n  }\r\n}`\r\n```\r\n## Browsers and OS\r\n\r\nChrome and Firefox on Linux (Fedora 22)\r\n\r\n## Reproduce the error\r\n\r\nCreate a brand new JHipster app, attempt to login and check the log."},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/141565578","html_url":"https://github.com/jhipster/generator-jhipster/issues/2018#issuecomment-141565578","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/2018","id":141565578,"user":{"login":"gmarziou","id":361007,"avatar_url":"https://avatars.githubusercontent.com/u/361007?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarziou","html_url":"https://github.com/gmarziou","followers_url":"https://api.github.com/users/gmarziou/followers","following_url":"https://api.github.com/users/gmarziou/following{/other_user}","gists_url":"https://api.github.com/users/gmarziou/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarziou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarziou/subscriptions","organizations_url":"https://api.github.com/users/gmarziou/orgs","repos_url":"https://api.github.com/users/gmarziou/repos","events_url":"https://api.github.com/users/gmarziou/events{/privacy}","received_events_url":"https://api.github.com/users/gmarziou/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T20:50:34Z","updated_at":"2015-09-18T20:50:34Z","body":"> For the MySQL issue: I've already seen this reported. I thought that the case wasn't important for database tables, it turns out that there is an option for that on MySQL for Linux... And that depending on your installation you need to have the right case.\r\n\r\nYes this is `lower_case_table_names` system variable as explained [in the official doc](https://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html).\r\nThe problem is that the default value is not the same for Linux and OSX.\r\n\r\nSo I guess we could execute a simple select in DatabaseConfiguration and depending on result log a diagnostic and advice. I suspect that not everybody could change this value, especially on shared hosting as it is a global setting.\r\n\r\nWhat if we were using EJB3NamingStrategy for MySQL? Would it cause any issue somewhere?"}}