Connect to MariaDB

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Connect to MariaDB

Postby jdbruijn » Sat Feb 23, 2019 4:02 pm

I am trying to connect to a MariaDB instance on a Synology NAS. For this I have downloaded a JDBC driver from mariadb.com and installed it in Developer.
So now in developer I can succesfully connect to the database on my NAS. Now I have deployed Servoy to a tomcat instance and I have included the drivers in the WAR file. But when I try to start the instance it will not start in the logs it says the driver cannot be found:
Caused by: java.sql.SQLException: JDBC Driver 'org.mariadb.jdbc' not found in classpath or drivers directory : java.lang.ClassNotFoundException: org.mariadb.jdbc or url 'jdbc:mariadb://192.168.178.4/repository' is not valid/accepted by the driver (if no suiteable driver found message): org.mariadb.jdbc

However I can see the mariadb.jar file in the deployed WEB-INF\lib folder.
As this is the first time I try to deploy using a different db as the default Postgresql I am mostlikely missing something, but what? Any ideas?
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: Connect to MariaDB

Postby sbutler » Tue Feb 26, 2019 10:08 pm

Check earlier in the logs and see if you see something like "Unsupported major.minor version". You might be running an older version of java on the server, but the mariadb driver you are using might be only for java 8, so the jar won't be seen.
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
sbutler
Servoy Expert
 
Posts: 759
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Re: Connect to MariaDB

Postby jdbruijn » Thu Feb 28, 2019 12:40 am

After I created the WAR file, the invalid driver error was gone. However it still does not create the repository, I can see that 1 table is created but after that it seems the repository creation failed because of an incorrect SQL statement:
Caused by: com.servoy.j2db.persistence.RepositoryException: com.servoy.j2db.persistence.RepositoryException: java.sql.SQLSyntaxErrorException: (conn=143) You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'CLOB not null, revision INTEGER not null, sequence INTEGER not null, primary key' at line 1


Is there anybody that has used MariaDB?
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm


Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 7 guests