I have created a simple web app designed to provide Java flash cards for my study. The cards are stored in a mySQL database. This web app works great when run locally through Eclipse, as well as on Jelastic. I decided to try and deploy it on my Raspberry Pi and I've run into a problem. Everything works except I can't get the database connection going. The odd thing is that if I run the app from within Eclipse and reference the DB on the Pi, it works!
I have placed the two required JARs (JDBC Connection and JSON) in every possible location Google suggests on the Pi, but to no avail.
The only error I can find while running everything on the Pi is a 500 error each time the JSP requests a flash card's data from the servlet.
I'm new to setting up Apache/Tomcat, so I'm having trouble figuring out where I can see logs that might show a stack trace similar to what I am accustomed to in Eclipse.
For the record, phpMyAdmin accesses the DB fine from the Pi as well.
Were you able to get it working locally on Tomcat? The tomcat logs should be easy to find once you find the tomcat base folder.
Joined: Jul 29, 2013
Locally (on the Raspberry Pi), I can access the database via phpMyAdmin as well as through mySQL command line. Don't know if it's useful, but i have a separate PHP script that also has no issue using the database.
So far, the only logs that I have found are in, if I remember correctly, /var/lib/tomcat7/logs/ They are: catalina.out, catalina.2013-07-*.log, and a couple relating to localhost. (I'm not at my home right now to get the exact names) Catalina out shows no errors. The only error shows up in one of the localhost logs when my JSP sends a POST request for database data (error 500). This is done using AJAX, and the response from the servlet comes back as a JSON object.
Joined: Jul 29, 2013
In case anyone stumbles across this, I managed to solve my own problem after many days of troubleshooting. My code was written and compiled on my Mac using Java 1.7 where everything worked fine. My Raspberry Pi, however, was only running Tomcat 6. After updating to Tomcat 7, all worked as it should. Ultimately, a simple 'duh' solution.