Are you seeing an exception? I assume the answer is yes. Please post the stack trace.
Thanks!
--
Did you find this reply useful? Help the Railo community and add it to the Railo Server wiki at https://github.com/getrailo/railo/wiki
---
You received this message because you are subscribed to the Google Groups "Railo" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/railo/80700b29-9b29-41a6-8658-92dc3edbd868%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Where did you get this syntax from?
${env.MYSQL_IP}
railo won't expand that so your datasource will not work. cfml uses #varname# for variable expansion in a string, and there is no direct access to environment variables without dipping into java.
you would need to do something like
env = createObject("java", "java.lang.System").getenv()
jdbc_url = "jdbc:mysql://#env.MYSQL_IP#/whatever?..."
also, if you are reading the mysql ip from an environment variable why not also the username and password? railo "encrypted" passwords are insecure and should never be shared or added to source control.
In our apps we have a datasource defined in a json configuration file. We then start railo with an extra java property that tells it where to find the configuration file.
java -jar myapp.jar -Dmyapp.config=/path/to/config.json [... other settings]
You received this message because you are subscribed to a topic in the Google Groups "Railo" group.To view this discussion on the web visit https://groups.google.com/d/msgid/railo/CAB%3DtfTq%2BUbjEBT4M2PO-GPCzUwNZRZR05Hv5ywg%2B%3DFpGc8S37g%40mail.gmail.com.