Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restSQL on Tomcat 9 #89

Open
matseku opened this issue Sep 21, 2019 · 4 comments
Open

restSQL on Tomcat 9 #89

matseku opened this issue Sep 21, 2019 · 4 comments
Labels

Comments

@matseku
Copy link

matseku commented Sep 21, 2019

Hi,

I'm having problems getting restSQL to run on Tomcat 9.

Any help appreciated.

Thanks.

@omc2016
Copy link

omc2016 commented Oct 18, 2021

restSQL is working fine in my Tomcat 9 (9.0.41) environment. The only problem that I encountered was an outdated MySQL 5.7 JDBC connector that didn't seem to be compatible with MySQL 8's authentication mechanism (restSQL Monitoring Healthcheck showed failure to connect to database, and auto resource creation under Tools would fail with authentication error). Replacing the JDBC JAR file under ./WebContent/WEB-INF/lib with mysql-connector-java-8.0.26.jar fixed the problem.

@restsql
Copy link
Owner

restsql commented Oct 18, 2021

Good find, and thanks for posting this for others!

I wonder if the 8 driver is backwards compatible with 5.x, which I believe is still widely used. (AWS actively supports 5.6 and 5.7 in RDS).

Interested in taking a crack at a fork to fix it?

@omc2016
Copy link

omc2016 commented Nov 2, 2021

Sure. Need to figure out how much regression testing is needed. If I run the tests that are in
https://github.com/restsql/restsql-test, would that be good enough?

I am trying to figure out how to use the trigger feature also. Looking for sample code. Not sure if it exists. If not, I'd be happy to develop and document it, although I might need a bit of help if I can't figure out how to use the mechanism.

Is the information in http://restsql.org/doc/Concepts.html and http://restsql.org/doc/Roadmap.html up to date?

@restsql
Copy link
Owner

restsql commented Dec 27, 2021

Hello omc2016. I apologize for the long delay in response. I'm on holiday this week and have a chance to look at this.

The trigger feature does look poorly documented, as if I never got around to building it out properly. I would think it works though, as there is an example and unit test.

I see one example, SingleTableTrigger. The unit test is next to it. Theres a triggers.properties in the resources area of test that sets it up. Probably there is one impl class per table. The table is declared as SingleTable in the resources/xml/sqlresources. It's sakila.actor. I can see the trigger's beforeInsert/Update throw a InvalidRequestException and it's expected in the unit test.

Running the test suite is essential to building your confidence in the change / addition. There's the README.txt for an overview. You'll have to set up the sakila database, a sample from the mysql community project. And you'll have to install the java build tool ant (now eclipsed by maven, gradle, etc.). Ant uses build.xml. Run ant -p verbose to list all targets (actions).

But really the place to get started is the framework developers guide. That describes all the prereqs and tooling.

Good luck!

Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants