I am currently deploying an application using Apache Tomcat 7 Debugged the errors now and by changing localhost -> I.P., we are able to access the pages, but other users are not able to access the datasets. This maybe due to many reasons, MySQL is not allowing them etc
Backend #1 : My own MySQL Server at Local
ERROR : dataset is not defined
This could be due to the reason that mysql server is not allowing access to other users as privileges are not given yet.
Backend #2 : Then, I tried my company's MySQL server. This database can be accessed by all, using a particular set of credentials and also the particular "Host".
ERROR : XMLHttpRequest cannot load http://localhost:8080/composite2/Tablev1/datejson. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://172.21.24.24:8080' is therefore not allowed access.
dataset is not defined
In the second case, my "Datasource.groovy"
environments {
development {
dataSource {
//dbCreate = "update" // one of 'create', 'create-drop', 'update', 'validate', ''
url = "jdbc:mysql://10.1.70.13/ewacs?useUnicode=yes&characterEncoding=UTF-8"
username = "w"
password = "w@123"
}
}
test {
dataSource {
//dbCreate = "update"
url = "jdbc:mysql://10.1.70.13/ewacs?useUnicode=yes&characterEncoding=UTF-8"
username = "w"
password = "w@123"
}
}
production {
dataSource {
//dbCreate = "update"
url = "jdbc:mysql://10.1.70.13/ewacs?useUnicode=yes&characterEncoding=UTF-8"
username = "w"
password = "w@123"
}
}
}
In both the cases, the datasets are not loading. What am I doing wrong in case #2? The access should be there for other users to hit the mysql server.
Why am I getting the error? Tried looking it up, but did not find any relevant link yet. I went through this link : Question But, I'm a beginner here, not able to understand this at all.
UPDATE:
Ok, so I noticed that in my javascript files, I was still using localhost, big mistake! I changed localhost -> 10.1.70.13
So, new error now...
GET http://10.1.70.13:8080/composite2/Tablev1/datejson net::ERR_CONNECTION_REFUSED
OR
Failed to load resource: net::ERR_CONNECTION_REFUSED
What is the issue here?
All approaches/suggestions are most welcome.