0

Can someone please help me on setting up Apache Isis to work with MySQL. I tried to set MySQL database but it doesn't work.

isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=com.mysql.jdbc.Driver
isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:mysql://<host>/<database>
isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=<username>
isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=<pass>

With this I am getting this errors

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax;
Milos Miskone Sretin
  • 1,748
  • 2
  • 25
  • 46

1 Answers1

0

I had the same exception. In my case, it was an issue with the DB server. I am using XAMPP with the included MariaDB server (which is a fork of MySQL and should be a binary drop-in replacement for MySQL).

So, if you use MariaDB instead of MySQL, you can try the following steps:

Add the mariadb-java-client artifact to the dependency list in the pom.xml file (of your webapp project if you have split up your project).

<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
    <version>2.3.0</version>
</dependency>

Update the connection driver name and URL scheme (e.g. in the file isis.properties):

isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=org.mariadb.jdbc.Driver
isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:mariadb://localhost:3306/myapp?createDatabaseIfNotExist=true

Maybe that helps you...

JND
  • 65
  • 7