{"action":"created","issue":{"url":"https://api.github.com/repos/alkacon/opencms-core/issues/282","labels_url":"https://api.github.com/repos/alkacon/opencms-core/issues/282/labels{/name}","comments_url":"https://api.github.com/repos/alkacon/opencms-core/issues/282/comments","events_url":"https://api.github.com/repos/alkacon/opencms-core/issues/282/events","html_url":"https://github.com/alkacon/opencms-core/issues/282","id":44558658,"number":282,"title":"setup.sh: MySQLSyntaxErrorException - DROP DATABASE ${database}","user":{"login":"gallardo","id":790448,"avatar_url":"https://avatars.githubusercontent.com/u/790448?v=3","gravatar_id":"","url":"https://api.github.com/users/gallardo","html_url":"https://github.com/gallardo","followers_url":"https://api.github.com/users/gallardo/followers","following_url":"https://api.github.com/users/gallardo/following{/other_user}","gists_url":"https://api.github.com/users/gallardo/gists{/gist_id}","starred_url":"https://api.github.com/users/gallardo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gallardo/subscriptions","organizations_url":"https://api.github.com/users/gallardo/orgs","repos_url":"https://api.github.com/users/gallardo/repos","events_url":"https://api.github.com/users/gallardo/events{/privacy}","received_events_url":"https://api.github.com/users/gallardo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-10-01T12:41:18Z","updated_at":"2015-09-25T12:18:13Z","closed_at":null,"body":"The provided webapps/opencms/WEB-INF/setup.sh aborts with a `com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException`.\r\n\r\nFrom the mysql logs I could find that OpenCms is actually executing the follow SQL (sic!):\r\n\r\n    DROP DATABASE ${database}\r\n\r\nOutput and stacktrace follows:\r\n```\r\n$webapps/opencms/WEB-INF/setup.sh -path setup.properties\r\n\r\n-------------------------------------------------\r\nSetup started at: (Wed Oct 01 14:07:11 CEST 2014)\r\n-------------------------------------------------\r\n\r\nUsing config file: setup.properties:\r\ndbWorkPwd = opencmsuser\r\ntemplateDb = null\r\ndbDefaultTablespace = null\r\njdbcDriver = org.gjt.mm.mysql.Driver\r\ndbCreateConStr = jdbc:mysql://localhost:3306/\r\nsubmit = true\r\ndbProduct = mysql\r\ndbCreateUser = opencmsroot\r\ndbTemporaryTablespace = null\r\ndbName = opencms\r\nservletMapping = null\r\ndbIndexTablespace = null\r\ndbWorkUser = opencmsuser\r\ndbCreatePwd = opencmsroot\r\ncreateTables = true\r\ndbProvider = sql\r\ndropDb = true\r\ncreateDb = true\r\ndb = opencms\r\n\r\nSystem requirements tested successfully.\r\nlog4j:WARN No appenders could be found for logger (org.opencms.init).\r\nlog4j:WARN Please initialize the log4j system properly.\r\nSetup-Bean initialized successfully.\r\nDB connection tested successfully.\r\nError executing SQL statement:  \r\n \r\n \r\n \r\n DROP DATABASE ${database}\r\n\r\n-------------------------------------------\r\n\r\ncom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{database}' at line 1\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:408)\r\n\tat com.mysql.jdbc.Util.handleNewInstance(Util.java:411)\r\n\tat com.mysql.jdbc.Util.getInstance(Util.java:386)\r\n\tat com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1054)\r\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4190)\r\n\tat com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4122)\r\n\tat com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)\r\n\tat com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)\r\n\tat com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2812)\r\n\tat com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2761)\r\n\tat com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:894)\r\n\tat com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:732)\r\n\tat org.opencms.setup.CmsSetupDb.executeStatement(CmsSetupDb.java:729)\r\n\tat org.opencms.setup.CmsSetupDb.executeSql(CmsSetupDb.java:644)\r\n\tat org.opencms.setup.CmsSetupDb.executeSql(CmsSetupDb.java:707)\r\n\tat org.opencms.setup.CmsSetupDb.dropDatabase(CmsSetupDb.java:248)\r\n\tat org.opencms.setup.CmsAutoSetup.run(CmsAutoSetup.java:269)\r\n\tat org.opencms.setup.CmsAutoSetup.main(CmsAutoSetup.java:108)\r\n\r\n\r\n-------------------------------------------\r\n\r\nAn error occurred during the setup process with the following error message:\r\nError ocurred while dropping the DB!\r\nPlease have a look into the opencms log file for detailed information.\r\n```"},"comment":{"url":"https://api.github.com/repos/alkacon/opencms-core/issues/comments/143200805","html_url":"https://github.com/alkacon/opencms-core/issues/282#issuecomment-143200805","issue_url":"https://api.github.com/repos/alkacon/opencms-core/issues/282","id":143200805,"user":{"login":"gallardo","id":790448,"avatar_url":"https://avatars.githubusercontent.com/u/790448?v=3","gravatar_id":"","url":"https://api.github.com/users/gallardo","html_url":"https://github.com/gallardo","followers_url":"https://api.github.com/users/gallardo/followers","following_url":"https://api.github.com/users/gallardo/following{/other_user}","gists_url":"https://api.github.com/users/gallardo/gists{/gist_id}","starred_url":"https://api.github.com/users/gallardo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gallardo/subscriptions","organizations_url":"https://api.github.com/users/gallardo/orgs","repos_url":"https://api.github.com/users/gallardo/repos","events_url":"https://api.github.com/users/gallardo/events{/privacy}","received_events_url":"https://api.github.com/users/gallardo/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T12:18:13Z","updated_at":"2015-09-25T12:18:13Z","body":"Published PR https://github.com/alkacon/opencms-core/pull/346 to deal with this issue."}}