On 12/06/2017 19:11, Colm O hEigeartaigh wrote:
Hi all,

I'm seeing some errors when using the latest installer for 2.0.x. I'm using
the installer with Tomcat + MySQL. It all works fine with the same setup
using the 2.0.3 installer (with SYNCOPE-1107 applied locally).

However, with 2.0.4-SNAPSHOT, the installer process completes successfully,
but only the Quartz tables are in MySQL:

+--------------------------+
| Tables_in_syncope        |
+--------------------------+
| QRTZ_BLOB_TRIGGERS       |
| QRTZ_CALENDARS           |
| QRTZ_CRON_TRIGGERS       |
| QRTZ_FIRED_TRIGGERS      |
| QRTZ_JOB_DETAILS         |
| QRTZ_LOCKS               |
| QRTZ_PAUSED_TRIGGER_GRPS |
| QRTZ_SCHEDULER_STATE     |
| QRTZ_SIMPLE_TRIGGERS     |
| QRTZ_SIMPROP_TRIGGERS    |
| QRTZ_TRIGGERS            |
+--------------------------+

and in "core-rest.log" I see:

'org.apache.syncope.core.provisioning.java.job.JobManagerImpl#0':
Unsatisfied dependency expressed through field 'scheduler'; nested
exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'scheduler' defined in URL
[jar:file:/home/colm/Desktop/tmp/apache-tomcat-8.5.12/webapps/syncope/WEB-INF/lib/syncope-core-provisioning-java-2.0.4-SNAPSHOT.jar!/provisioningContext.xml]:
Invocation of init method failed; nested exception is
org.springframework.transaction.CannotCreateTransactionException: Could not
open JPA EntityManager for transaction; nested exception is
<openjpa-2.4.2-r422266:1777108 nonfatal general error>
org.apache.openjpa.persistence.PersistenceException: Connection is closed

Any ideas what could be causing this?


Hi Colm,
I have spent some time playing with installer on my laptop (Ubuntu 16.04), with MySQL 5.7.

I initially started by using the latest MySQL JDBC connector available (6.0.6), but this turned to be a bad choice because of [1] [2] and God knows how many more issues.

Then I changed to the latest JDBC connector 5.1 I had on my local disk (5.1.22), which made me run into [3]; finally, I have upgraded to the latest 5.1 available (5.1.42) [4]: from there I have seen that version 6.X is still considered "on development".

In my local Tomcat instance I had no JDBC connection pool configuration yet, so the application-managed db pool was in effect, based on HikariCP since SYNCOPE-1084 [5]. With such configuration, I started getting exceptions in the logs like as [6], so I finally decided to switch to container-managed db pool as indicated by our docs [7] (well, nearly, since I have found out that name should be jdbc/syncopeMasterDataSource, going to fix that immediately).

At this point everything was (finally!) working as expected.

In the meanwhile, I have also spotted some things to enhance / fix with Installer, for which I am going to open some issue(s) soon.

I was actually wondering who is using it, and considering whether to start a discussion to deprecate it...

Regards.

[1] https://stackoverflow.com/questions/37719818/the-server-time-zone-value-aest-is-unrecognized-or-represents-more-than-one-ti [2] https://stackoverflow.com/questions/42084633/table-name-pattern-can-not-be-null-or-empty-in-java
[3] https://bugs.mysql.com/bug.php?id=66659
[4] https://dev.mysql.com/downloads/connector/j/
[5] https://issues.apache.org/jira/browse/SYNCOPE-1084
[6] https://stackoverflow.com/questions/36027250/java-sql-sqlexception-connection-is-closed-pool-hikaricp [7] https://syncope.apache.org/docs/reference-guide.html#apache-tomcat-8-and-8-5

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/

Reply via email to