Thanks Francesco! It's working for me now - the problem was that I was
using "jdbc/syncopeDataSource" instead of "jdbc/syncopeMasterDataSource".

Colm.

On Tue, Jun 13, 2017 at 12:24 PM, Francesco Chicchiriccò <
ilgro...@apache.org> wrote:

> On 13/06/2017 11:03, Francesco Chicchiriccò wrote:
>
>> 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/webapp
>>> s/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).
>>
>
> FYI I am currently discussing the problem with HikariCP in the dev@openjpa
> ML [8] and provided a workaround with commit [9].
> It seems that this problem is exclusively related to MySQL, not even
> MariaDB.
>
> 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-patt
>> ern-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-sqlexc
>> eption-connection-is-closed-pool-hikaricp
>> [7] https://syncope.apache.org/docs/reference-guide.html#apache-
>> tomcat-8-and-8-5
>> [8] https://lists.apache.org/thread.html/71333fcb9e02b30791cacaf
>> 7f3cd773cd6380119e39ec2db2b984430@%3Cdev.openjpa.apache.org%3E
>> [9] https://github.com/apache/syncope/commit/1bf49e3fd9f934c1bc4
>> e7d4ee0e715e49f1e2bc7
>>
>
> --
> 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/
>
>


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to