Re: Any tutorials?

2017-08-24 Thread Sergio Muriel
I have followed the steps as you (and the guide) mention, nevertheless I ran 
into this problem:

javax.xml.ws.WebServiceException: Remote exception with status code: 
NOT_FOUND.

It happens when I call http://localhost:9080/syncope-console/

Exactly as described in:

http://www.mail-archive.com/user@syncope.apache.org/msg02058.html


It does not look like solved (do you guys have Jira or something similar?) 
indeed. As always, help is appreciated.



Sergio

From: Francesco Chicchiriccò 
Sent: Thursday, August 24, 2017 2:26 AM
To: user@syncope.apache.org
Subject: Re: Any tutorials?

On 23/08/2017 18:53, Sergio Muriel wrote:

Don't worry! Actually this solution for embedded mode works like a charm!! 
Thank you!!

Good to hear this :-)


On the other hand, I'm having an issue when I deploy it to an external 
container (Tomcat): In Topology view, it shows no connectors in between the 
resources and Connid (connid://testconnectorserver@localhost:4554 for me); in 
other words it looses all connectors.


Do you know what is wrong?



PD: I'm using same war files generated for embedded mode. I just copy them in 
webapps/.

This won't work: as the big warning at the end of

http://syncope.apache.org/docs/getting-started.html#maven-project


says: "Before actual deployment onto a standalone Java EE container, you need 
to further check the Customization chapter of the Apache Syncope Reference 
Guide", e.g.

https://syncope.apache.org/docs/reference-guide.html#customization


You'll need to (as indicated in the Reference Guide):

1. create /opt/syncope and its subdirectories as suggested
2. build with all the indicated switches (-Dconf.directory=... etc)
3. copy the filtered property files
4. only at this point deploy the generated WAR files

HTH
Regards.



From: Francesco Chicchiriccò 
Sent: Tuesday, August 22, 2017 10:33 AM
To: user@syncope.apache.org
Subject: Re: Any tutorials?

Hi Sergio,
sorry, my bad.

You need to:

1. declare the JDBC driver dependency in enduser/pom.xml (not core/pom.xml as 
said initially), as follows:


  mysql
  mysql-connector-java
  5.1.42
  test


right after


  com.h2database
  h2
  test


2. add the JDBC driver as Tomcat dependency, via cargo:

  
mysql
mysql-connector-java
  

right after

  
com.h2database
h2
  

I have just tried to be sure, and it worked in embedded mode.

In case of deployment onto an external container (rather than in embedded 
mode), you'll have to copy the JDBC Driver JAR onto the container's classpath 
($CATALINA_HOME/lib for Tomcat).

HTH
Regards.

On 21/08/2017 23:42, Sergio Muriel wrote:

com.mysql.jdbc.Driver for MySQL

com.microsoft.sqlserver.jdbc.SQLServerDriver for SQL Server


Yes, I'm trying to configure a DBTable Connector Bundle?



From: Francesco Chicchiriccò 
Sent: Sunday, August 20, 2017 1:02 AM
To: user@syncope.apache.org
Subject: Re: Any tutorials?

On 2017-08-20 01:20 Sergio Muriel wrote:

> Although I can see now the drivers in:
>
> core/target/syncope/WEB-INF/lib/mssql-jdbc-6.1.0.jre8.jar
>
> core/target/syncope/WEB-INF/lib/mysql-connector-java-5.1.42.jar
>
> I still get the same error "InvalidExternalResource [JDBC Driver is not
> found on classpath.]" when I try to create a new resource.
>
> I did as you suggest:
>
> * Added the dependency to core/pom.xml
> * Rebuilt everything from the root directory via "mvn -Pall clean
> install".
> * Ran it from enduser via "mvn -P embedded,all"
>
> I don't know what is wrong.

Which value did you provide for the "JDBC Driver" property? Are you
attempting to configure the DBTable Connector Bundle?

https://connid.atlassian.net/wiki/spaces/BASE/pages/360497/Database+Table#DatabaseTable-ConfigurationProperties

Regards.

> FROM: Francesco Chicchiriccò 
> SENT: Saturday, August 19, 2017 7:39 AM
> TO: user@syncope.apache.org
> SUBJECT: Re: Any tutorials?
>
> Hi Sergio,
> about some points below:
>
>> First point about AnyTypeClasses worked flawlessly. (Although I'm
>> still trying
>> to figure out why I cannot reuse those schemata pre-loaded there).
>
> The pre-loaded Schemas are already assigned to some AnyTypeClass - and
> each Schema might be assigned to an AnyTypeClass instance at most.
>
>> I take back part of what I said on the second point. The dependency
>> addition
>> actually works and downloads the drivers, but I did it on
>> enduser/pom.xml
>> instead of 

Re: Customizing MasterDomain.xml

2017-08-24 Thread Francesco Chicchiriccò

Hi Adrian,
thanks for sharing your experience.

A couple of things:

1. Fabio and I have been running some performance tests on 2.0.3 and the 
related improvements are now part of 2.0.4 - it seems there is still 
some issue with AnyObjects (not with Users nor Groups) in 2.0.4 - see 
SYNCOPE-1199, but AFAIK Matteo is after it


2. If you plan to run a test with 10 concurrent threads, then the DB 
thread pool should have at least 10 connections available: despite of 
the pool library in use, such setting is of fundamental importance


Regards.

On 24/08/2017 11:27, Adrian Gonzalez wrote:

Thanks Francesco, that's exactly what I need !

> Any special reason to not upgrade to 2.0.4?

The little story is that we have a little locking issue during 
authentication in Syncope (I didn't pinpointed the cause, could be 
syncope or our customization or my tests :) ), when calling the 
/syncope/rest/users/self endpoint from a JMeter test with multiple 
threads (10).


Digging a bit further, I've seen 2 pbs :
a - inifinite connection timeout in jdbc dataSource settings.
b - locking in db

I was working on a.
It came from the default setting (I can customize it, no pb).
But I've seen you changed the db pool in 2.0.4 and I wanted to give it 
a try (just for testing purposes).
Since 2.0.4 has some db changes and we already have a 2.0.2 in 
production but *without* any flyway migration scripts, I wanted to see 
if I could integrate easily the 2.0.4 db pool changes in my 2.0.2.

Hence this mail :)
And I also wanted to know if there was a way to customize the 
configuration in case I had a more urgent need in the future - so I 
know how to do it next time :)


I'm switching to work on b now.

Thanks once more, and sorry for the long and boring details :)
Adrian


*De :* Francesco Chicchiriccò 
*À :* user@syncope.apache.org
*Envoyé le :* Jeudi 24 août 2017 9h47
*Objet :* Re: Customizing MasterDomain.xml

On 23/08/2017 18:18, Adrian Gonzalez wrote:

Hello,

I'm using Syncope 2.0.2.


Any special reason to not upgrade to 2.0.4?

https://cwiki.apache.org/confluence/display/SYNCOPE/Upgrade+from+2.0.2+to+2.0.3
https://cwiki.apache.org/confluence/display/SYNCOPE/Upgrade+from+2.0.3+to+2.0.4


Is there a way to customize MasterDomain.xml in syncope webapp ?

I've the impression that MasterDomain.xml is always loaded from 
syncope-core-persistence-jpa-*.jar#domains/MasterDomain.xml (in 
WEB-INF/lib), even if I add a  MasterDomain.xml in 
WEB-INF/classes/domains


As indicated in

https://syncope.apache.org/docs/reference-guide.html#customization-core

(for 2.0.4, naturally), you'll need to tell Spring to load your local 
domains/MasterDomain.xml rather than the one included in the JAR file.


But domains/MasterDomain.xml is loaded by domains.xml, which in turn 
is imported by persistenceContext.xml; as a result, you'll need to add 
to your own project's sources:


* core/src/main/resources/persistenceContext.xml (copy from [1])
* core/src/main/resources/domains.xml (copy from [2])
* core/src/main/resources/domains/MasterDomain.xml (copy from [3])

Even so, Spring will ignore such local files if you don't replace, in 
core/src/main/webapp/WEB-INF/web.xml:


  
contextConfigLocation

  classpath*:/*Context.xml

  

with

  
contextConfigLocation

  classpath*:/coreContext.xml
  classpath*:/securityContext.xml
  classpath*:/logicContext.xml
  classpath*:/restCXFContext.xml
  classpath:/persistenceContext.xml
  classpath*:/provisioning*Context.xml
  classpath*:/workflow*Context.xml

  

(please note the missing '*' before persistenceContext.xml).

FYI, the starting value for contextConfigLocation is set as [4] since 
2.0.4.


HTH
Regards.

[1] 
https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/persistenceContext.xml

[2]https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/domains.xml
[3] 
https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/domains/MasterDomain.xml
[4] 
https://github.com/apache/syncope/blob/syncope-2.0.4/fit/core-reference/src/main/webapp/WEB-INF/web.xml#L31-L37


--
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: New blog post - Syncope Basics: Manage external DB

2017-08-24 Thread Adrian Gonzalez
Hi Matteo, 
Nice stuff and really clear !
Regards,Adrian

  De : Tirasa 
 À : user@syncope.apache.org 
 Envoyé le : Mercredi 23 août 2017 9h46
 Objet : New blog post - Syncope Basics: Manage external DB
   
  Hi all,
 
 Just to inform you that I wrote the first post of a series of tutorials about 
the "Syncope Basics" (Syncope Basics: Manage external DB).
 It covers the first steps to install a fresh instance of Syncope from 
archetype, add connectors, resources and create Pull/Push tasks to make some 
provisioning!
 
 Hope it could be useful for you!
 Regards,
 Matteo
  

   

Re: Customizing MasterDomain.xml

2017-08-24 Thread Adrian Gonzalez
Thanks Francesco, that's exactly what I need !
> Any special reason to not upgrade to 2.0.4?
The little story is that we have a little locking issue during authentication 
in Syncope (I didn't pinpointed the cause, could be syncope or our 
customization or my tests :) ), when calling the /syncope/rest/users/self 
endpoint from a JMeter test with multiple threads (10).
Digging a bit further, I've seen 2 pbs :a - inifinite connection timeout in 
jdbc dataSource settings.b - locking in db
I was working on a.It came from the default setting (I can customize it, no 
pb).But I've seen you changed the db pool in 2.0.4 and I wanted to give it a 
try (just for testing purposes).Since 2.0.4 has some db changes and we already 
have a 2.0.2 in production but *without* any flyway migration scripts, I wanted 
to see if I could integrate easily the 2.0.4 db pool changes in my 2.0.2.Hence 
this mail :)And I also wanted to know if there was a way to customize the 
configuration in case I had a more urgent need in the future - so I know how to 
do it next time :)
I'm switching to work on b now.
Thanks once more, and sorry for the long and boring details :)Adrian

  De : Francesco Chicchiriccò 
 À : user@syncope.apache.org 
 Envoyé le : Jeudi 24 août 2017 9h47
 Objet : Re: Customizing MasterDomain.xml
   
 On 23/08/2017 18:18, Adrian Gonzalez wrote:
  
  Hello, 
  I'm using Syncope 2.0.2.  
 
 Any special reason to not upgrade to 2.0.4?
 
https://cwiki.apache.org/confluence/display/SYNCOPE/Upgrade+from+2.0.2+to+2.0.3
https://cwiki.apache.org/confluence/display/SYNCOPE/Upgrade+from+2.0.3+to+2.0.4
 
 
  Is there a way to customize MasterDomain.xml in syncope webapp ? 
  I've the impression that MasterDomain.xml is always loaded from 
syncope-core-persistence-jpa-*.jar#domains/MasterDomain.xml (in WEB-INF/lib), 
even if I add a  MasterDomain.xml in WEB-INF/classes/domains  
 
 As indicated in
 
https://syncope.apache.org/docs/reference-guide.html#customization-core
 
 (for 2.0.4, naturally), you'll need to tell Spring to load your local 
domains/MasterDomain.xml rather than the one included in the JAR file.
 
 But domains/MasterDomain.xml is loaded by domains.xml, which in turn is 
imported by persistenceContext.xml; as a result, you'll need to add to your own 
project's sources:
 
 * core/src/main/resources/persistenceContext.xml (copy from [1])
 * core/src/main/resources/domains.xml (copy from [2])
 * core/src/main/resources/domains/MasterDomain.xml (copy from [3])
 
 Even so, Spring will ignore such local files if you don't replace, in 
core/src/main/webapp/WEB-INF/web.xml:
 
   
     contextConfigLocation
     
   classpath*:/*Context.xml
     
   
 
 with
 
   
     contextConfigLocation
     
   classpath*:/coreContext.xml
   classpath*:/securityContext.xml
   classpath*:/logicContext.xml
   classpath*:/restCXFContext.xml
   classpath:/persistenceContext.xml
   classpath*:/provisioning*Context.xml
   classpath*:/workflow*Context.xml
     
   
 
 (please note the missing '*' before persistenceContext.xml).
 
 FYI, the starting value for contextConfigLocation is set as [4] since 2.0.4.
 
 HTH
 Regards.
 
 
[1]https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/persistenceContext.xml
 
[2]https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/domains.xml
 
[3]https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/domains/MasterDomain.xml
 
[4]https://github.com/apache/syncope/blob/syncope-2.0.4/fit/core-reference/src/main/webapp/WEB-INF/web.xml#L31-L37
 -- 
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: Customizing MasterDomain.xml

2017-08-24 Thread Francesco Chicchiriccò

On 23/08/2017 18:18, Adrian Gonzalez wrote:

Hello,

I'm using Syncope 2.0.2.


Any special reason to not upgrade to 2.0.4?

https://cwiki.apache.org/confluence/display/SYNCOPE/Upgrade+from+2.0.2+to+2.0.3
https://cwiki.apache.org/confluence/display/SYNCOPE/Upgrade+from+2.0.3+to+2.0.4


Is there a way to customize MasterDomain.xml in syncope webapp ?

I've the impression that MasterDomain.xml is always loaded from 
syncope-core-persistence-jpa-*.jar#domains/MasterDomain.xml (in 
WEB-INF/lib), even if I add a  MasterDomain.xml in WEB-INF/classes/domains


As indicated in

https://syncope.apache.org/docs/reference-guide.html#customization-core

(for 2.0.4, naturally), you'll need to tell Spring to load your local 
domains/MasterDomain.xml rather than the one included in the JAR file.


But domains/MasterDomain.xml is loaded by domains.xml, which in turn is 
imported by persistenceContext.xml; as a result, you'll need to add to 
your own project's sources:


* core/src/main/resources/persistenceContext.xml (copy from [1])
* core/src/main/resources/domains.xml (copy from [2])
* core/src/main/resources/domains/MasterDomain.xml (copy from [3])

Even so, Spring will ignore such local files if you don't replace, in 
core/src/main/webapp/WEB-INF/web.xml:


  
contextConfigLocation

  classpath*:/*Context.xml

  

with

  
contextConfigLocation

  classpath*:/coreContext.xml
  classpath*:/securityContext.xml
  classpath*:/logicContext.xml
  classpath*:/restCXFContext.xml
  classpath:/persistenceContext.xml
  classpath*:/provisioning*Context.xml
  classpath*:/workflow*Context.xml

  

(please note the missing '*' before persistenceContext.xml).

FYI, the starting value for contextConfigLocation is set as [4] since 2.0.4.

HTH
Regards.

[1] 
https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/persistenceContext.xml
[2] 
https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/domains.xml
[3] 
https://github.com/apache/syncope/blob/syncope-2.0.2/core/persistence-jpa/src/main/resources/domains/MasterDomain.xml
[4] 
https://github.com/apache/syncope/blob/syncope-2.0.4/fit/core-reference/src/main/webapp/WEB-INF/web.xml#L31-L37


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