Billy Grant
Billy Grant

Reputation: 31

In Magnolia: Replacing H2 with MySQL: JackRabbit Cannot instantiate persistence manager

I want to set up Magnolia with MySQL instead of embedded H2.

I followed the Magnolia and JackRabbit Wiki: https://wiki.magnolia-cms.com/display/WIKI/Setting+up+a+Jackrabbit+persistence+manager, and made the 4 required changes:

  1. I installed MySQL and created a Magnolia database and a user with accesses to it:

    CREATE DATABASE magnl_author;
    CREATE DATABASE magnl_public;
    CREATE USER 'mgnl_admin'@'localhost' IDENTIFIED BY 'superuser';
    GRANT ALL PRIVILEGES ON magnl_author.* TO 'mgnl_admin'@'localhost';
    GRANT ALL PRIVILEGES ON magnl_public.* TO 'mgnl_admin'@'localhost';

  2. I set magnolia.repositories.jackrabbit.config = WEB-INF/config/repo-conf/jackrabbit-bundle-mysql-search.xml in the magnolia.properties.xml

  3. I added mysql-connector-java-8.0.16.jar to webapps\magnoliaAuthor\WEB-INF\lib and removed derby-10.14.1.0.jar

  4. I configured jackrabbit-bundle-mysql-search.xml which can be seen in https://drive.google.com/file/d/13QImOipAUwZd0bOTFi_kZloIG549URpk/view?usp=sharing , so the PM (Persistence Manager) is configured for both versioning and workspace.

However when I start Tomcat, I still get the following error: ERROR org.apache.jackrabbit.core.RepositoryImpl : failed to start Repository: Cannot instantiate persistence manager org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager

Upvotes: 0

Views: 704

Answers (1)

Ducaz035
Ducaz035

Reputation: 3132

Based on your stacktrace, your issue seems to be related to TimeZone. I'd suggest to set it to UTC for the time being and see if that helps you.

In order to do so, please append your configuration with the line below:

&serverTimezone=UTC

E.g.

  <param name="url" value="jdbc:mysql://localhost:3306/magnolia" />

becomes

  <param name="url" value="jdbc:mysql://localhost:3306/magnolia?serverTimezone=UTC" />

Hope that helps,

Cheers,

Upvotes: 1

Related Questions