Checking to see if Spike (or someone else) has any ideas on this one:
My application - Railo on top of Java on top of Tomcat - can access my datasources just fine WHEN in the production environment (in the Stax cloud) but no such luck locally (localhost:8080)
Here is what a datasource configuration looks like:
The free Stax database service isn't locked down from remote access so there shouldn't be any problem connecting from your local machine (most users connect this way).
Couple questions to help figure this out:
- What error do you get when connecting locally?
- Are you able to connect to the DB from your local machine using a MySQL client (like the mysql command line, or SQLYog)?
- Have you always had this problem, or did it just stat happening?
When I try to "verify a datasource" using Railo's web administrator (http://localhost:8080/railo-context/admin/web.cfm), two possible values come back for a datasource - OK or Error.
I get Error. That's it. No explanation. Just "Error"
I can connect with MySQL administrator (a MySQL client) just fine.
This problem just started happening. I haven't worked on this particular application in over a month. but a month ago, it worked just fine...
If you can connect with a mysql client, then that implies something is wonky with Railo or the way it's setup. You'll need to track down the underlying Railo error (maybe in its logs??) to see if you can figure out what error it is catching.
1. In stax, select create app (Basic servlet & JSP)
2. stax getapp -a username/newapp -u username-p password
3. Downloaded Railo WAR file from http://www.getrailo.org/index.cfm/download/ (Railo Custom/railo-3.1.1.000.war (33 MB))
4. Locally, delete the contents of webapp directory
5. Extract the contents of the Railo WAR file to the webapp directory (index.cfm, License.txt, and WEB-INF)
6. stax run
then i go to http://localhost:8080/railo-context/admin/web.cfm - Datasources
Create a MySQL datasource....FAIL :)
": input contained no data"
so, i say "screw that" and manually add the datasource to WEB-INF/railo/railo-web.xml.cfm between the empty data-sources node:
- restart tomcat
- go back to http://localhost:8080/railo-context/admin/web.cfm and view datasources. ha! my datasource is there!
- verify datasource...FAIL :(
can you see any problem with the way I'm setting up railo? see my previous entry, i outlined my steps 1-6
there's gotta be a problem with my stax/railo setup because i just downloaded railo express (railo-3.1.1.000-railo-express-with-jre-windows.zip (62 MB)) from http://www.getrailo.org/index.cfm/download/ and adding a datasource (http://localhost:8888/railo-context/admin/web.cfm?action=services.datasource) works like a charm. (but railo express uses jetty instead of tomcat)
i guess i'll try to setup tomcat / railo without using stax and see if get the same problem.
any thoughts or suggestions? i can setup tomcat/railo and add a datasource just fine locally without using stax (see my latest post). obviously, i want this to work with stax.
fyi - this is the only error i get when trying to add a datasource = ": input contained no data" - none of the railo log files are being written to (/webapp/WEB-INF/railo/logs)