Re: Obtain JWT token

2017-06-13 Thread Sergey Beryozkin

Hi Francesco
On 13/06/17 16:28, Francesco Chicchiriccò wrote:

On 13/06/2017 17:25, Colm O hEigeartaigh wrote:

Thanks Francesco, I will take care of that.


Cool :-)

Another question - do we have tests (e.g. bad signature, untrusted 
signature, token expired etc.)?


No, we don't have specific tests for that: since we're using CXF 
libraries for parse and generation, I thought it was not necessary, 


JWT token is simply a JSON object where each top-level property is 
called a 'claim' :-) and given that CXF JOSE (and other JOSE) libraries 
protect the arbitrary format payloads, it does not specifically validate 
the expiry date, only that the signature or encryption has been done right.
The expiry dates are checked in scope of the higher-level applications 
which use JWT, in OIDC for example, so indeed, as Colm indicated, it can 
be a good idea to test that for example, a JWT token used in scope of 
Syncope flows is not effective after it has expired, etc


Thanks, Sergey

but 
feel free to add.


Regards.

On Tue, Jun 13, 2017 at 4:21 PM, Francesco Chicchiriccò 
 wrote:



On 13/06/2017 17:17, Colm O hEigeartaigh wrote:


Hi all,

The docs state that "X-Syncope-Token is returned on response to 
successful

authentication
,
and contains the unique signed JSON Web Token
 identifying the
authenticated user".

However with, e.g. curl -I -u alice:security
http://localhost:8080/syncope/rest/users/self I don't see the
X-Syncope-Token header being returned (Syncope 2.0.4-SNAPSHOT).

Do I need to explicitly configure returning the token or am I missing
something else?


The endpoint for obtaining the JWT is

POST /accessTokens/login

Maybe it is an idea to add an example to that section in the docs.

Regards.





--
Sergey Beryozkin

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


Re: Obtain JWT token

2017-06-13 Thread Francesco Chicchiriccò

On 13/06/2017 17:25, Colm O hEigeartaigh wrote:

Thanks Francesco, I will take care of that.


Cool :-)


Another question - do we have tests (e.g. bad signature, untrusted signature, 
token expired etc.)?


No, we don't have specific tests for that: since we're using CXF 
libraries for parse and generation, I thought it was not necessary, but 
feel free to add.


Regards.


On Tue, Jun 13, 2017 at 4:21 PM, Francesco Chicchiriccò  
wrote:


On 13/06/2017 17:17, Colm O hEigeartaigh wrote:


Hi all,

The docs state that "X-Syncope-Token is returned on response to successful
authentication
,
and contains the unique signed JSON Web Token
 identifying the
authenticated user".

However with, e.g. curl -I -u alice:security
http://localhost:8080/syncope/rest/users/self I don't see the
X-Syncope-Token header being returned (Syncope 2.0.4-SNAPSHOT).

Do I need to explicitly configure returning the token or am I missing
something else?


The endpoint for obtaining the JWT is

POST /accessTokens/login

Maybe it is an idea to add an example to that section in the docs.

Regards.


--
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/



Re: Obtain JWT token

2017-06-13 Thread Colm O hEigeartaigh
Thanks Francesco, I will take care of that. Another question - do we have
tests (e.g. bad signature, untrusted signature, token expired etc.)?

Colm.

On Tue, Jun 13, 2017 at 4:21 PM, Francesco Chicchiriccò  wrote:

> On 13/06/2017 17:17, Colm O hEigeartaigh wrote:
>
>> Hi all,
>>
>> The docs state that "X-Syncope-Token is returned on response to successful
>> authentication
>> > authentication-and-authorization>,
>> and contains the unique signed JSON Web Token
>>  identifying the
>> authenticated user".
>>
>> However with, e.g. curl -I -u alice:security
>> http://localhost:8080/syncope/rest/users/self I don't see the
>> X-Syncope-Token header being returned (Syncope 2.0.4-SNAPSHOT).
>>
>> Do I need to explicitly configure returning the token or am I missing
>> something else?
>>
>
> The endpoint for obtaining the JWT is
>
> POST /accessTokens/login
>
> Maybe it is an idea to add an example to that section in the docs.
>
> Regards.
>
> --
> 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


Re: Obtain JWT token

2017-06-13 Thread Francesco Chicchiriccò

On 13/06/2017 17:17, Colm O hEigeartaigh wrote:

Hi all,

The docs state that "X-Syncope-Token is returned on response to successful
authentication
,
and contains the unique signed JSON Web Token
 identifying the
authenticated user".

However with, e.g. curl -I -u alice:security
http://localhost:8080/syncope/rest/users/self I don't see the
X-Syncope-Token header being returned (Syncope 2.0.4-SNAPSHOT).

Do I need to explicitly configure returning the token or am I missing
something else?


The endpoint for obtaining the JWT is

POST /accessTokens/login

Maybe it is an idea to add an example to that section in the docs.

Regards.

--
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/



Obtain JWT token

2017-06-13 Thread Colm O hEigeartaigh
Hi all,

The docs state that "X-Syncope-Token is returned on response to successful
authentication
,
and contains the unique signed JSON Web Token
 identifying the
authenticated user".

However with, e.g. curl -I -u alice:security
http://localhost:8080/syncope/rest/users/self I don't see the
X-Syncope-Token header being returned (Syncope 2.0.4-SNAPSHOT).

Do I need to explicitly configure returning the token or am I missing
something else?

Thanks,

Colm.


-- 
Colm O hEigeartaigh

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


[jira] [Commented] (SYNCOPE-1108) NullPointerException while saving an empty template

2017-06-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SYNCOPE-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16047935#comment-16047935
 ] 

ASF subversion and git services commented on SYNCOPE-1108:
--

Commit 35019bc576c9ed826bffb304021e014ed9de7519 in syncope's branch 
refs/heads/2_0_X from [~ilgrosso]
[ https://git-wip-us.apache.org/repos/asf?p=syncope.git;h=35019bc ]

[SYNCOPE-1108] Avoid sending empty content to Core


> NullPointerException while saving an empty template
> ---
>
> Key: SYNCOPE-1108
> URL: https://issues.apache.org/jira/browse/SYNCOPE-1108
> Project: Syncope
>  Issue Type: Bug
>  Components: console
>Affects Versions: 2.0.3, 2.0.4
>Reporter: Matteo Alessandroni
>Assignee: Francesco Chicchiriccò
>Priority: Minor
> Fix For: 2.0.4, 2.1.0
>
>
> Steps to reproduce:
> * in Admin Console, go to Reports -> Templates
> * edit an existing template or create a new one
> * save with empty content



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SYNCOPE-1108) NullPointerException while saving an empty template

2017-06-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SYNCOPE-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16047936#comment-16047936
 ] 

ASF subversion and git services commented on SYNCOPE-1108:
--

Commit 9f979f6aa9f98b7fb79fd4bbf300f55aff661ff3 in syncope's branch 
refs/heads/master from [~ilgrosso]
[ https://git-wip-us.apache.org/repos/asf?p=syncope.git;h=9f979f6 ]

[SYNCOPE-1108] Avoid sending empty content to Core


> NullPointerException while saving an empty template
> ---
>
> Key: SYNCOPE-1108
> URL: https://issues.apache.org/jira/browse/SYNCOPE-1108
> Project: Syncope
>  Issue Type: Bug
>  Components: console
>Affects Versions: 2.0.3, 2.0.4
>Reporter: Matteo Alessandroni
>Assignee: Francesco Chicchiriccò
>Priority: Minor
> Fix For: 2.0.4, 2.1.0
>
>
> Steps to reproduce:
> * in Admin Console, go to Reports -> Templates
> * edit an existing template or create a new one
> * save with empty content



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Assigned] (SYNCOPE-1108) NullPointerException while saving an empty template

2017-06-13 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/SYNCOPE-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francesco Chicchiriccò reassigned SYNCOPE-1108:
---

Assignee: Francesco Chicchiriccò

> NullPointerException while saving an empty template
> ---
>
> Key: SYNCOPE-1108
> URL: https://issues.apache.org/jira/browse/SYNCOPE-1108
> Project: Syncope
>  Issue Type: Bug
>  Components: console
>Affects Versions: 2.0.3, 2.0.4
>Reporter: Matteo Alessandroni
>Assignee: Francesco Chicchiriccò
>Priority: Minor
> Fix For: 2.0.4, 2.1.0
>
>
> Steps to reproduce:
> * in Admin Console, go to Reports -> Templates
> * edit an existing template or create a new one
> * save with empty content



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: Errors with latest installer

2017-06-13 Thread Colm O hEigeartaigh
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
>>> 
>>> 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


[jira] [Resolved] (SYNCOPE-1109) Installer fails to setup Activiti

2017-06-13 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/SYNCOPE-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francesco Chicchiriccò resolved SYNCOPE-1109.
-
Resolution: Fixed

> Installer fails to setup Activiti
> -
>
> Key: SYNCOPE-1109
> URL: https://issues.apache.org/jira/browse/SYNCOPE-1109
> Project: Syncope
>  Issue Type: Bug
>  Components: installer
>Affects Versions: 2.0.3
>Reporter: Francesco Chicchiriccò
>Assignee: Francesco Chicchiriccò
> Fix For: 2.0.4, 2.1.0
>
>
> Even if selected, Activiti is not enabled - including Modeler.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SYNCOPE-1109) Installer fails to setup Activiti

2017-06-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SYNCOPE-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16047907#comment-16047907
 ] 

ASF subversion and git services commented on SYNCOPE-1109:
--

Commit 06f3fdd73e6b08f400d6551b4607d9527b70ef0d in syncope's branch 
refs/heads/master from [~ilgrosso]
[ https://git-wip-us.apache.org/repos/asf?p=syncope.git;h=06f3fdd ]

[SYNCOPE-1109] Various fixes


> Installer fails to setup Activiti
> -
>
> Key: SYNCOPE-1109
> URL: https://issues.apache.org/jira/browse/SYNCOPE-1109
> Project: Syncope
>  Issue Type: Bug
>  Components: installer
>Affects Versions: 2.0.3
>Reporter: Francesco Chicchiriccò
>Assignee: Francesco Chicchiriccò
> Fix For: 2.0.4, 2.1.0
>
>
> Even if selected, Activiti is not enabled - including Modeler.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (SYNCOPE-1109) Installer fails to setup Activiti

2017-06-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SYNCOPE-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16047906#comment-16047906
 ] 

ASF subversion and git services commented on SYNCOPE-1109:
--

Commit e5a8f1f92d29de289b291d60bcecbfbff48d in syncope's branch 
refs/heads/2_0_X from [~ilgrosso]
[ https://git-wip-us.apache.org/repos/asf?p=syncope.git;h=e5a8f1f ]

[SYNCOPE-1109] Various fixes


> Installer fails to setup Activiti
> -
>
> Key: SYNCOPE-1109
> URL: https://issues.apache.org/jira/browse/SYNCOPE-1109
> Project: Syncope
>  Issue Type: Bug
>  Components: installer
>Affects Versions: 2.0.3
>Reporter: Francesco Chicchiriccò
>Assignee: Francesco Chicchiriccò
> Fix For: 2.0.4, 2.1.0
>
>
> Even if selected, Activiti is not enabled - including Modeler.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SYNCOPE-1109) Installer fails to setup Activiti

2017-06-13 Thread JIRA
Francesco Chicchiriccò created SYNCOPE-1109:
---

 Summary: Installer fails to setup Activiti
 Key: SYNCOPE-1109
 URL: https://issues.apache.org/jira/browse/SYNCOPE-1109
 Project: Syncope
  Issue Type: Bug
  Components: installer
Affects Versions: 2.0.3
Reporter: Francesco Chicchiriccò
Assignee: Francesco Chicchiriccò
 Fix For: 2.0.4, 2.1.0


Even if selected, Activiti is not enabled - including Modeler.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: Errors with latest installer

2017-06-13 Thread Francesco Chicchiriccò

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/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

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-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
[8] 
https://lists.apache.org/thread.html/71333fcb9e02b30791cacaf7f3cd773cd6380119e39ec2db2b984430@%3Cdev.openjpa.apache.org%3E
[9] 
https://github.com/apache/syncope/commit/1bf49e3fd9f934c1bc4e7d4ee0e715e49f1e2bc7


--
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/



[jira] [Commented] (SYNCOPE-1084) Switch to HikariCP for Core's default DataSource definitions

2017-06-13 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/SYNCOPE-1084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16047754#comment-16047754
 ] 

ASF subversion and git services commented on SYNCOPE-1084:
--

Commit 8cee38084c20592ecb80c5cd0caf3e2127bda6af in syncope's branch 
refs/heads/master from [~ilgrosso]
[ https://git-wip-us.apache.org/repos/asf?p=syncope.git;h=8cee380 ]

[SYNCOPE-1084] Running MySQL fine with HikariCP


> Switch to HikariCP for Core's default DataSource definitions
> 
>
> Key: SYNCOPE-1084
> URL: https://issues.apache.org/jira/browse/SYNCOPE-1084
> Project: Syncope
>  Issue Type: Improvement
>  Components: core
>Reporter: Francesco Chicchiriccò
>Assignee: Francesco Chicchiriccò
> Fix For: 2.0.4, 2.1.0
>
>
> The default {{DataSource}} definitions used by the Core to deal with internal 
> storage (for each domain) are currently based on Commons DBCP2 (see [this 
> example|https://github.com/apache/syncope/blob/2_0_X/core/persistence-jpa/src/main/resources/domains/MasterDomain.xml#L51-L78]).
> It seems, however, that [HikariCP|http://brettwooldridge.github.io/HikariCP/] 
> offers best performances under several aspects, so it is worth switching the 
> default {{DataSource}} definitions.
> JNDI datasources can always be used, anyway.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


Re: Errors with latest installer

2017-06-13 Thread Francesco Chicchiriccò

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

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/



[jira] [Updated] (SYNCOPE-1108) NullPointerException while saving an empty template

2017-06-13 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/SYNCOPE-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Francesco Chicchiriccò updated SYNCOPE-1108:

Fix Version/s: 2.0.4

> NullPointerException while saving an empty template
> ---
>
> Key: SYNCOPE-1108
> URL: https://issues.apache.org/jira/browse/SYNCOPE-1108
> Project: Syncope
>  Issue Type: Bug
>  Components: console
>Affects Versions: 2.0.3, 2.0.4
>Reporter: Matteo Alessandroni
>Priority: Minor
> Fix For: 2.0.4, 2.1.0
>
>
> Steps to reproduce:
> * in Admin Console, go to Reports -> Templates
> * edit an existing template or create a new one
> * save with empty content



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (SYNCOPE-1108) NullPointerException while saving an empty template

2017-06-13 Thread Matteo Alessandroni (JIRA)
Matteo Alessandroni created SYNCOPE-1108:


 Summary: NullPointerException while saving an empty template
 Key: SYNCOPE-1108
 URL: https://issues.apache.org/jira/browse/SYNCOPE-1108
 Project: Syncope
  Issue Type: Bug
  Components: console
Affects Versions: 2.0.3, 2.0.4
Reporter: Matteo Alessandroni
Priority: Minor
 Fix For: 2.1.0


Steps to reproduce:

* in Admin Console, go to Reports -> Templates
* edit an existing template or create a new one
* save with empty content



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)