Hey @Mahesh_Thamilarasu
Thanks for the message, and apologies for the delay in responding.
Caused by: java.sql.SQLException: Access denied for user ‘root’@‘localhost’ (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)
I suspect this is caused by a common error running Tomcat on a Windows machine. I’m not sure if it’s a bug with Windows, Grails or Tomcat, but the file locations always end up getting mangled when the
Instead of a proper file location
c:\Users\username\.grails\openboxes-config.properties
the application looks for the file here
c:\.grails\openboxes-config.properties
essentially chopping off the USER_HOME or TOMCAT_HOME part of the file location path.
First of all, we need to confirm that this is the problem
Restart Tomcat and paste the first 100-200 lines of your stdout log file (sorry, I’ve forgotten what it’s called on Windows).
I’m looking for a snippet starting with “Using configuration locations …”. If you find it, paste it here to confirm.
Then we need to fix the issue
I think there are three options
- Copy your openboxes-config.properties into one of the locations reported in the log file.
- Figure out why USER_HOME or TOMCAT_HOME resolves to empty string
- Set up your own file location (there’s a configuration property for this, but
I would recommend using option (1) for now since the other two will require some troubleshooting and I’m guessing you just want to see this working.
There are some other posts here that might be helpful. You can also just search in the Search box for “Using configuration locations” to see posts with the same issue.
For option (3) you need to set one of the two command line arguments when starting Tomcat.
-Dopenboxes.config.location=<pathtofile>
-DOPENBOXES_CONFIG_LOCATION=<pathtofile>
In Ubuntu, I would create/edit the setenv.sh and pass this argument in via JAVA_OPTS or CATALINA_OPTS, but I have no idea where or how this would be set in Windows.
For reference, here’s the code in Config.groovy that adds these to our config file location candidates.
// Allow admin to override the config location using command line argument
configLocation = System.properties["${appName}.config.location"]
if (configLocation) {
grails.config.locations << "file:" + configLocation
}
// Allow admin to override the config location using environment variable
configLocation = System.env["${appName.toString().toUpperCase()}_CONFIG_LOCATION"]
if (configLocation) {
grails.config.locations << "file:" + configLocation
}