Re: Push task via REST

2017-10-13 Thread Sergio Muriel
> As you can see from the log you have "duplicate class definition for name: 
> "com/fasterxml/jackson/databind/node/ObjectNode" error.
> Check inside the directory bundle or your groovy scripts.


Sure I will do it, but it can be seen in the logs that the linkage error 
occurred at 18:48 whereas the http rest request was at 19:00. So it looks like 
one of those Tomcat + App starting errors after many restarts.


Anyways, what is going on is that I'm trying to connect to a service without 
being previously logged in to. The solution that I have is:

  1.  Go to an authentication service an get a session ID.
  2.  Use the session ID as an additional attribute to the service I wanted to 
connect originally.

My question is: How can I do it?
I know that I could implement it in the SearchScript, but it does not look very 
efficient because I would need to create a session every time.
Now, I see that there is an AuthenticateScript. Would it help? If so, how can I 
use it? Is there any way to pass the session ID from this script to the 
SearchScript?


Best Regards,
Sergio Muriel



From: Marco Di Sabatino Di Diodoro <marco.disabat...@tirasa.net>
Sent: Friday, October 6, 2017 6:34 AM
To: user@syncope.apache.org; Sergio Muriel
Subject: Re: Push task via REST



Il 03/10/2017 02:15, Sergio Muriel ha scritto:

> Edit your resource and set the Pull / Push trace level to Failure or None

I did it but the user info still does not change.
As you can see from the log you have "duplicate class definition for name: 
"com/fasterxml/jackson/databind/node/ObjectNode" error.
Check inside the directory bundle or your groovy scripts.

Regards
M

Logs:

core-connid.log:
**
19:00:35.978 DEBUG Connector net.tirasa.connid.bundles.rest.RESTConnector 
successfully inited Method: init
19:00:35.979 DEBUG ObjectClass: __ACCOUNT__ Method: createFilterTranslator
19:00:35.979 DEBUG Enter: executeQuery(ObjectClass: __ACCOUNT__, {left=__UID__, 
conditionType=EQUALS, right=user999}, 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl$1@7dba83cf,
 OperationOptions: {ATTRS_TO_GET:[__NAME__,__UID__,__ENABLE__]}) Method: 
executeQuery
19:00:35.979 DEBUG ObjectClass: __ACCOUNT__ Method: executeQuery
19:00:35.980 INFO  Entering SEARCH Script Method: run
19:00:36.067 WARN  Could not read object user999 Method: run
19:00:36.067 DEBUG Search ok Method: executeQuery
19:00:36.067 DEBUG Enter: 
org.identityconnectors.framework.common.objects.SearchResult@6afe5053 Method: 
handleResult
19:00:36.067 DEBUG Return: Method: handleResult
19:00:36.067 DEBUG Return Method: executeQuery
19:00:36.067 DEBUG Return: null Method: getObject
**

core.log:
**
18:48:49.359 ERROR 
org.apache.syncope.core.provisioning.java.ConnectorFacadeProxy - Connector 
request execution failure
java.util.concurrent.ExecutionException: java.lang.LinkageError: loader 
(instance of  
org/identityconnectors/framework/impl/api/local/BundleClassLoader): attempted  
duplicate class definition for name: 
"com/fasterxml/jackson/databind/node/ObjectNode"
at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.8.0_25]
at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.8.0_25]
at 
org.apache.syncope.core.provisioning.java.ConnectorFacadeProxy.test(ConnectorFacadeProxy.java:405)
 ~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
at org.apache.syncope.core.logic.ResourceLogic.check(ResourceLogic.java:393) 
~[syncope-core-logic-2.0.4.jar:2.0.4]
at 
org.apache.syncope.core.logic.ResourceLogic$$FastClassBySpringCGLIB$$b886f42c.invoke()
 ~[syncope-core-logic-2.0.4.jar:2.0.4]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) 
~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at 
org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:85)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at 
org.apache.syncope.core.logic.LogicInvocationHandler.around(LogicInvocationHandler.java:88)
 ~[syncope-core-logic-2.0.4.jar:2.0.4]
at sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source) ~[?:?]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_25]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_25]
at 
org.springframework.aop.aspectj.AbstractAspectJAdvice.

Re: Push task via REST

2017-10-02 Thread Sergio Muriel
rver.java:82)
 ~[tomcat-websocket.jar:8.5.16]
at 
org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable(WsFrameServer.java:171)
 ~[tomcat-websocket.jar:8.5.16]
at 
org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable(WsFrameServer.java:151)
 ~[tomcat-websocket.jar:8.5.16]
at 
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(WsHttpUpgradeHandler.java:148)
 ~[tomcat-websocket.jar:8.5.16]
at 
org.apache.coyote.http11.upgrade.UpgradeProcessorInternal.dispatch(UpgradeProcessorInternal.java:54)
 ~[tomcat-coyote.jar:8.5.16]
at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:53)
 ~[tomcat-coyote.jar:8.5.16]
at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
 ~[tomcat-coyote.jar:8.5.16]
at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
 ~[tomcat-coyote.jar:8.5.16]
at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 
~[tomcat-coyote.jar:8.5.16]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
[?:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
[?:1.8.0_25]
at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 ~[tomcat-util.jar:8.5.16]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_25]
Caused by: java.io.IOException: An established connection was aborted by the 
software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method) ~[?:1.8.0_25]
at sun.nio.ch.SocketDispatcher.write(Unknown Source) ~[?:1.8.0_25]
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source) ~[?:1.8.0_25]
at sun.nio.ch.IOUtil.write(Unknown Source) ~[?:1.8.0_25]
at sun.nio.ch.SocketChannelImpl.write(Unknown Source) ~[?:1.8.0_25]
at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:134) 
~[tomcat-coyote.jar:8.5.16]
at 
org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
 ~[tomcat-coyote.jar:8.5.16]
at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:157) 
~[tomcat-coyote.jar:8.5.16]
at 
org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.doWrite(NioEndpoint.java:1259)
 ~[tomcat-coyote.jar:8.5.16]
at 
org.apache.tomcat.util.net.SocketWrapperBase.doWrite(SocketWrapperBase.java:670)
 ~[tomcat-coyote.jar:8.5.16]
at 
org.apache.tomcat.util.net.SocketWrapperBase.flushBlocking(SocketWrapperBase.java:607)
 ~[tomcat-coyote.jar:8.5.16]
at 
org.apache.tomcat.util.net.SocketWrapperBase.flush(SocketWrapperBase.java:597) 
~[tomcat-coyote.jar:8.5.16]
at 
org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:95)
 ~[tomcat-websocket.jar:8.5.16]
at 
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:494)
 ~[tomcat-websocket.jar:8.5.16]
at 
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:309)
 ~[tomcat-websocket.jar:8.5.16]
... 19 more
**


The filter worked fine!



From: Marco Di Sabatino Di Diodoro <marco.disabat...@tirasa.net>
Sent: Monday, October 2, 2017 2:30 AM
To: user@syncope.apache.org
Subject: Re: Push task via REST


Hi Sergio,

Il 28/09/2017 22:37, Sergio Muriel ha scritto:

Sorry guys, I realized that I had not saved the provision rules :D  My bad!


Okay, so I ran my task, 5k users, took about 40 minutes to finish and I ended 
up with this log for each user and no changes whatsoever :-/



core-connid.log:

12:47:03.388 DEBUG Enter: getObject(ObjectClass: __ACCOUNT__, Attribute: 
{Name=__UID__, Value=[user999]}, OperationOptions: 
{ATTRS_TO_GET:[__NAME__,__UID__,__ENABLE__]}) Method: getObject
12:47:03.391 DEBUG Create script loaded Method: init
12:47:03.463 DEBUG Update script loaded Method: init
12:47:03.463 DEBUG Delete script loaded Method: init
12:47:03.585 DEBUG Search script loaded Method: init
12:47:03.585 DEBUG Search script loaded Method: init
12:47:03.585 DEBUG Search script loaded Method: init
12:47:03.585 DEBUG Sync script loaded Method: init
12:47:03.585 DEBUG Sync script loaded Method: init
12:47:03.585 DEBUG Test script loaded Method: init
12:47:03.585 DEBUG Connector net.tirasa.connid.bundles.rest.RESTConnector 
successfully inited Method: init
12:47:03.586 DEBUG ObjectClass: __ACCOUNT__ Method: createFilterTranslator
12:47:03.586 DEBUG Enter: executeQuery(ObjectClass: __ACCOUNT__, {left=__UID__, 
conditionType=EQUALS, right=user999}, 
org.identityconnectors.framework.impl.api.local.operations.SearchImpl$1@e0c9a82,
 OperationOptions: {ATTRS_TO_GET:[__NAME__,__UID__,__ENABLE__]}) Method: 
executeQuery
12:47:03.586 DEBUG ObjectClass: __ACCOUNT__ Method: executeQuery
12:47:03.586 INFO  Entering SEARCH Script Method: run
12:47:03.628 WARN  Could not read object user999 Method: run
12:47:03.628 DEBUG Search 

Re: Push task via REST

2017-09-28 Thread Sergio Muriel
]
at 
org.apache.syncope.core.persistence.jpa.spring.DomainTransactionInterceptor.invoke(DomainTransactionInterceptor.java:64)
 ~[syncope-core-persistence-jpa-2.0.4.jar:2.0.4]
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at com.sun.proxy.$Proxy237.execute(Unknown Source) ~[?:?]
at 
org.apache.syncope.core.provisioning.java.job.TaskJob$1.exec(TaskJob.java:80) 
~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
at 
org.apache.syncope.core.provisioning.java.job.TaskJob$1.exec(TaskJob.java:70) 
~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
at 
org.apache.syncope.core.spring.security.AuthContextUtils.execWithAuthContext(AuthContextUtils.java:136)
 ~[syncope-core-spring-2.0.4.jar:2.0.4]
at 
org.apache.syncope.core.provisioning.java.job.TaskJob.execute(TaskJob.java:69) 
~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
... 2 more




As always, help is very appreciated!

PD: Is there any way to run the task just for one user?


Best Regards,
Sergio Muriel



From: Sergio Muriel <sergio...@hotmail.com>
Sent: Wednesday, September 27, 2017 5:01 PM
To: user@syncope.apache.org
Subject: Push task via REST


Hi,

I'm trying to push user info changes via REST, but when I execute the task this 
is what I get:


Result status of execution '3c628254-4f03-462d-a282-544f03d62d62'
 No provisions nor orgUnit available: aborting...

Although there is  a change in one of the users that I made manually using the 
syncope-console interface.

Help is appreciated!


PD:  I included the configuration of my connector and resource, as well as the 
Search and Update scripts.
PD2: If not pictured asume default value.
PD3: https://myserver/direct/user.json sample:
{"entityPrefix": "user", "user_collection": [
{
  "createdDate": 1421366855000,
  "createdTime": {
"display": "Jan 15, 2015 7:07 pm",
"time": 1421366855000
  },
  "displayId": "scott",
  "displayName": "scott",
  "eid": "sc...@123.com",
  "email": "sc...@123.com",
  "firstName": "Scott",
  "id": "1cdbc07b-7975-4b65-8923-751d782787de",
  "lastModified": 1440698352000,
  "lastName": "Tiger",
  "modifiedDate": 1440698352000,
  "modifiedTime": {
"display": "Aug 27, 2015 1:59 pm",
"time": 1440698352000
  },
  "own
...
[more users..]

and this https://myserver/direct/user/scott.json works as well. (Same variable 
names as above)


Best Regards,
Sergio Muriel


Re: Scripted SQL Pull Task Error

2017-09-25 Thread Sergio Muriel
Thank you Marco,

worked like a charm!


Something else that I want to know:

I pulled my users with creation and last change dates in this way in my Search 
script:


lastChangeDate:it.MODIFIEDON?.toString(),
creationDate:it.CREATEDON?.toString()

(Need to use toString() because it said it didn't support Timestamp)
And when I reviewed the log I found things like this:

Attribute: {Name=creationDate, Value=[2012-06-23 10:39:10.0]} , Attribute: 
{Name=lastChangeDate, Value=[2017-07-29 03:43:36.0]}


However when I reviewed the pulled users in Syncope all of them had the current 
(today's) date. Is it supposed to be like that?

Note: lastChangeDate is mapped to lastChangeDate, and creationDate is mapped to 
creationDate.


Second and most important question:

Login of the users does not work. This is some proof that I pulled up the 
password:

{Name=__PASSWORD__, 
Value=[org.identityconnectors.common.security.GuardedString@9ce8aa1f]}

Obviously 'username' was pulled up as well. I also changed 
password.cipher.algorithm to SHA256 which is the encryption it has on the DB.

However, when I try to login as one of the users it says "Wrong username and/or 
password"

What could be wrong?



Best Regards,
Sergio Muriel



From: Marco Di Sabatino Di Diodoro <marco.disabat...@tirasa.net>
Sent: Monday, September 25, 2017 3:38 AM
To: user@syncope.apache.org; Sergio Muriel
Subject: Re: Scripted SQL Pull Task Error



Il 23/09/2017 01:54, Sergio Muriel ha scritto:

Thank you Matteo! It seems like it works.


Now I want to pull the password from an Identity Store so I wrote this on my 
script:

__PASSWORD__:it.PW,

With resource mapping:
Internal attribute External attribute Mandatory Remote Key Password Purpose
password   __PASSWORD__   false 
   o  x  <=>



However I'm getting:


Caused by: java.lang.IllegalArgumentException: Password value must be an 
instance of GuardedString
at 
org.identityconnectors.framework.common.objects.Attribute.(Attribute.java:114)
 ~[connector-framework-1.4.2.0.jar:?]
at 
org.identityconnectors.framework.common.objects.AttributeBuilder.build(AttributeBuilder.java:188)
 ~[connector-framework-1.4.2.0.jar:?]
at 
org.identityconnectors.framework.common.objects.AttributeBuilder.build(AttributeBuilder.java:87)
 ~[connector-framework-1.4.2.0.jar:?]
at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.processResults(ScriptedSQLConnector.java:580)
 ~[?:?]
at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.executeQuery(ScriptedSQLConnector.java:403)
 ~[?:?]
... 20 more


What is wrong? Isn't it the way I should pull the password?

you must add in your groovy script:

import org.identityconnectors.common.security.GuardedString;

and

__PASSWORD__:new GuardedString(it.PW)

Regards
Marco


Best Regards,
Sergio Muriel



From: Marco Di Sabatino Di Diodoro 
<marco.disabat...@tirasa.net><mailto:marco.disabat...@tirasa.net>
Sent: Friday, September 22, 2017 2:41 AM
To: user@syncope.apache.org<mailto:user@syncope.apache.org>
Subject: Re: Scripted SQL Pull Task Error


Hi Sergio,

Il 18/09/2017 18:30, Sergio Muriel ha scritto:

Hi Matteo,

I replaced "username:it.eid" with "username:it.EID" but no luck, still same 
result, same exceptions.


I'm getting this on core-connid.log:



11:05:59.298 DEBUG Enter: {Uid=Attribute: {Name=__UID__, 
Value=[abcdefgh-04a9-4181-9d4d-e3a812345678]}, ObjectClass=ObjectClass: 
__ACCOUNT__, Attributes=[Attribute: {Name=__NAME__, 
Value=[abcdefgh-04a9-4181-9d4d-e3a812345678]}, Attribute: {Name=__UID__, 
Value=[ffe5c419-04a9-4181-9d4d-e3a8a09a8305]}, Attribute: {Name=email, 
Value=[validem...@yahoo.com<mailto:validem...@yahoo.com>]}], Name=Attribute: 
{Name=__NAME__, Value=[ffe5c419-04a9-4181-9d4d-e3a8a09a8305]}} Method: handle
11:05:59.346 DEBUG Return: true Method: handle
.
11:08:56.979 DEBUG 
d:\\syncope-standalone-2.0.4\\project\\myproject\\core\\src\\test\\resources\\scriptedsql\\SakaiUserSearchScript.groovy
 is readable Method: checkFileIsReadable
11:08:56.979 INFO  Checking Sync Script filename Method: validate
11:08:56.980 DEBUG 
d:\\syncope-standalone-2.0.4\\project\\myproject\\core\\src\\test\\resources\\scriptedsql\\SakaiUserSyncScript.groovy
 is readable Method: checkFileIsReadable
11:08:56.980 INFO  Checking Test Script filename Method: validate



Is there anything else you want to see from scripts?

Where can I find it?

the problem is in your mapping, you've mapped the internal attribute username 
with eid, but the search script doesn't return eid

case "__ACCOUNT__":
  sql.eachRow("SELECT * FROM sakai_user u, sakai_user_id_map m WHERE u.USER_ID 
= m.USER_ID "
+ ((where?.trim ()) ? ("AND" + where) : ""),
{result.add([
__UID__:it.user_id,

Re: Scripted SQL Pull Task Error

2017-09-22 Thread Sergio Muriel
Thank you Matteo! It seems like it works.


Now I want to pull the password from an Identity Store so I wrote this on my 
script:

__PASSWORD__:it.PW,

With resource mapping:
Internal attribute External attribute Mandatory Remote Key Password Purpose
password   __PASSWORD__   false 
   o  x  <=>



However I'm getting:


Caused by: java.lang.IllegalArgumentException: Password value must be an 
instance of GuardedString
at 
org.identityconnectors.framework.common.objects.Attribute.(Attribute.java:114)
 ~[connector-framework-1.4.2.0.jar:?]
at 
org.identityconnectors.framework.common.objects.AttributeBuilder.build(AttributeBuilder.java:188)
 ~[connector-framework-1.4.2.0.jar:?]
at 
org.identityconnectors.framework.common.objects.AttributeBuilder.build(AttributeBuilder.java:87)
 ~[connector-framework-1.4.2.0.jar:?]
at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.processResults(ScriptedSQLConnector.java:580)
 ~[?:?]
at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.executeQuery(ScriptedSQLConnector.java:403)
 ~[?:?]
... 20 more


What is wrong? Isn't it the way I should pull the password?


Best Regards,
Sergio Muriel



From: Marco Di Sabatino Di Diodoro <marco.disabat...@tirasa.net>
Sent: Friday, September 22, 2017 2:41 AM
To: user@syncope.apache.org
Subject: Re: Scripted SQL Pull Task Error


Hi Sergio,

Il 18/09/2017 18:30, Sergio Muriel ha scritto:

Hi Matteo,

I replaced "username:it.eid" with "username:it.EID" but no luck, still same 
result, same exceptions.


I'm getting this on core-connid.log:



11:05:59.298 DEBUG Enter: {Uid=Attribute: {Name=__UID__, 
Value=[abcdefgh-04a9-4181-9d4d-e3a812345678]}, ObjectClass=ObjectClass: 
__ACCOUNT__, Attributes=[Attribute: {Name=__NAME__, 
Value=[abcdefgh-04a9-4181-9d4d-e3a812345678]}, Attribute: {Name=__UID__, 
Value=[ffe5c419-04a9-4181-9d4d-e3a8a09a8305]}, Attribute: {Name=email, 
Value=[validem...@yahoo.com<mailto:validem...@yahoo.com>]}], Name=Attribute: 
{Name=__NAME__, Value=[ffe5c419-04a9-4181-9d4d-e3a8a09a8305]}} Method: handle
11:05:59.346 DEBUG Return: true Method: handle
.
11:08:56.979 DEBUG 
d:\\syncope-standalone-2.0.4\\project\\myproject\\core\\src\\test\\resources\\scriptedsql\\SakaiUserSearchScript.groovy
 is readable Method: checkFileIsReadable
11:08:56.979 INFO  Checking Sync Script filename Method: validate
11:08:56.980 DEBUG 
d:\\syncope-standalone-2.0.4\\project\\myproject\\core\\src\\test\\resources\\scriptedsql\\SakaiUserSyncScript.groovy
 is readable Method: checkFileIsReadable
11:08:56.980 INFO  Checking Test Script filename Method: validate



Is there anything else you want to see from scripts?

Where can I find it?

the problem is in your mapping, you've mapped the internal attribute username 
with eid, but the search script doesn't return eid

case "__ACCOUNT__":
  sql.eachRow("SELECT * FROM sakai_user u, sakai_user_id_map m WHERE u.USER_ID 
= m.USER_ID "
+ ((where?.trim ()) ? ("AND" + where) : ""),
{result.add([
__UID__:it.user_id,
__NAME__:it.user_id,
username:it.eid, -> Error
email:it.email,
firstname:it.first_name,
lastname:it.last_name
])
});

you must replace username:it.eid with eid:it.eid

or

fix the mapping with username > username

Regards
Marco




Thank you


Best Regards,
Sergio Muriel



From: Matteo Alessandroni 
<matteo.alessandr...@tirasa.net><mailto:matteo.alessandr...@tirasa.net>
Sent: Monday, September 18, 2017 2:25 AM
To: user@syncope.apache.org<mailto:user@syncope.apache.org>
Subject: Re: Scripted SQL Pull Task Error

Hi Sergio,

have you already tried to replace "username:it.eid" with "username:it.EID"?
The problem is that I'd need to see some logs from your groovy script to be 
sure that all username EID values are not empty.

Regards,
Matteo


On 15/09/2017 18:29, Sergio Muriel wrote:

Hi Matteo,

Sure!


SELECT * FROM sakai_user u, sakai_user_id_map m WHERE u.USER_ID = m.USER_ID


"USER_ID"; "EMAIL"; "EMAIL_LC"; "FIRST_NAME";"LAST_NAME";"TYPE"; "PW"; 
"CREATEDBY"; "MODIFIEDBY"; "CREATEDON"; "MODIFIEDON"; "USER_ID"; "EID"
"-62e7-425e-be28-12345678abcd"; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; "Vi"; "Du"; "guest"; 
"pRCclQ==:KzTo0T9rfw45tgrsegfdCh/x3QJu/kragzJi4a8tCNk="; "admin"; "admin"; 
"2016-08-08 14:04:53"; "2017-07-29 03:46:08"; 
"-62e7-425e-be28-12345678abcd"; &

Re: Scripted SQL Pull Task Error

2017-09-18 Thread Sergio Muriel
Hi Matteo,

I replaced "username:it.eid" with "username:it.EID" but no luck, still same 
result, same exceptions.


I'm getting this on core-connid.log:



11:05:59.298 DEBUG Enter: {Uid=Attribute: {Name=__UID__, 
Value=[abcdefgh-04a9-4181-9d4d-e3a812345678]}, ObjectClass=ObjectClass: 
__ACCOUNT__, Attributes=[Attribute: {Name=__NAME__, 
Value=[abcdefgh-04a9-4181-9d4d-e3a812345678]}, Attribute: {Name=__UID__, 
Value=[ffe5c419-04a9-4181-9d4d-e3a8a09a8305]}, Attribute: {Name=email, 
Value=[validem...@yahoo.com]}], Name=Attribute: {Name=__NAME__, 
Value=[ffe5c419-04a9-4181-9d4d-e3a8a09a8305]}} Method: handle
11:05:59.346 DEBUG Return: true Method: handle
.

11:08:56.979 DEBUG 
d:\\syncope-standalone-2.0.4\\project\\myproject\\core\\src\\test\\resources\\scriptedsql\\SakaiUserSearchScript.groovy
 is readable Method: checkFileIsReadable
11:08:56.979 INFO  Checking Sync Script filename Method: validate
11:08:56.980 DEBUG 
d:\\syncope-standalone-2.0.4\\project\\myproject\\core\\src\\test\\resources\\scriptedsql\\SakaiUserSyncScript.groovy
 is readable Method: checkFileIsReadable
11:08:56.980 INFO  Checking Test Script filename Method: validate



Is there anything else you want to see from scripts?

Where can I find it?


Thank you


Best Regards,
Sergio Muriel



From: Matteo Alessandroni <matteo.alessandr...@tirasa.net>
Sent: Monday, September 18, 2017 2:25 AM
To: user@syncope.apache.org
Subject: Re: Scripted SQL Pull Task Error

Hi Sergio,

have you already tried to replace "username:it.eid" with "username:it.EID"?
The problem is that I'd need to see some logs from your groovy script to be 
sure that all username EID values are not empty.

Regards,
Matteo


On 15/09/2017 18:29, Sergio Muriel wrote:

Hi Matteo,

Sure!


SELECT * FROM sakai_user u, sakai_user_id_map m WHERE u.USER_ID = m.USER_ID


"USER_ID"; "EMAIL"; "EMAIL_LC"; "FIRST_NAME";"LAST_NAME";"TYPE"; "PW"; 
"CREATEDBY"; "MODIFIEDBY"; "CREATEDON"; "MODIFIEDON"; "USER_ID"; "EID"
"-62e7-425e-be28-12345678abcd"; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; "Vi"; "Du"; "guest"; 
"pRCclQ==:KzTo0T9rfw45tgrsegfdCh/x3QJu/kragzJi4a8tCNk="; "admin"; "admin"; 
"2016-08-08 14:04:53"; "2017-07-29 03:46:08"; 
"-62e7-425e-be28-12345678abcd"; "987854"
"-54ae-418e-95ce-12345678abcd"; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; "Bar"; "Than"; "guest"; 
"pfAqaw==:wx5Wc/M5msdfgdffsdffgf+mGPSSiFzs/omJF+wIFYU="; "admin"; "admin"; 
"2015-02-17 15:54:17"; "2017-07-29 03:44:55"; 
"-54ae-418e-95ce-12345678abcd"; "987655"
"-20e7-4905-b044-12345678abcd"; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; "Joseph"; "Donovan"; "guest"; 
"psLZjA==:pNYul7adfadfadfasdfadssaPEIPTzrFLPdxC346gro="; 
"-f21d-4179-85e5-12345678abcd"; "-20e7-4905-b044-12345678abcd"; 
"2013-04-01 14:05:11"; "2013-04-02 14:47:23"; 
"-20e7-4905-b044-12345678abcd"; "987656"
"-9e65-41ce-a434-12345678abcd"; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; "Habibah"; "Assisi"; "guest"; 
"AvC7MQ==:2WCl8JQTasdfafeg452fgsgr45gsfsdg+XOMOUCLcfQ="; 
"-f21d-4179-85e5-12345678abcd"; "-f21d-4179-85e5-12345678abcd"; 
"2013-08-26 19:42:24"; "2013-08-26 19:42:24"; 
"-9e65-41ce-a434-12345678abcd"; "987657"
"-f75c-42df-beaf-12345678abcd"; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; 
"sampl...@abc.com"<mailto:sampl...@abc.com>; "Keith"; "Roberts"; "guest"; 
"k/R8Mg==:vyM1Adfgsdfgsdget4563457tryeetyr1xSAHJXcqWk="; 
"-f21d-4179-85e5-12345678abcd"; "-fe13-4bcc-84a7-12345678abcd"; 
"2015-03-30 22:34:04"; "2017-05-06 13:09:25"; 
"-f75c-42df-beaf-12345678abcd"; "987658"


...

/* Affected rows: 0  Found rows: 5,103  Warnings: 0  Duration for 1 query: 
0.000 sec. (+ 0.125 sec. network) */


Yes, my MySQL is case insensitive.
SELECT *,m.EID FROM .
and
SELECT *,m.eid FROM .
both work the same.

Best Re

Re: Scripted SQL Pull Task Error

2017-09-15 Thread Sergio Muriel
Hi Matteo,

Sure!


SELECT * FROM sakai_user u, sakai_user_id_map m WHERE u.USER_ID = m.USER_ID


"USER_ID"; "EMAIL"; "EMAIL_LC"; "FIRST_NAME";"LAST_NAME";"TYPE"; "PW"; 
"CREATEDBY"; "MODIFIEDBY"; "CREATEDON"; "MODIFIEDON"; "USER_ID"; "EID"
"-62e7-425e-be28-12345678abcd"; "sampl...@abc.com"; "sampl...@abc.com"; 
"Vi"; "Du"; "guest"; "pRCclQ==:KzTo0T9rfw45tgrsegfdCh/x3QJu/kragzJi4a8tCNk="; 
"admin"; "admin"; "2016-08-08 14:04:53"; "2017-07-29 03:46:08"; 
"-62e7-425e-be28-12345678abcd"; "987854"
"-54ae-418e-95ce-12345678abcd"; "sampl...@abc.com"; "sampl...@abc.com"; 
"Bar"; "Than"; "guest"; 
"pfAqaw==:wx5Wc/M5msdfgdffsdffgf+mGPSSiFzs/omJF+wIFYU="; "admin"; "admin"; 
"2015-02-17 15:54:17"; "2017-07-29 03:44:55"; 
"-54ae-418e-95ce-12345678abcd"; "987655"
"-20e7-4905-b044-12345678abcd"; "sampl...@abc.com"; "sampl...@abc.com"; 
"Joseph"; "Donovan"; "guest"; 
"psLZjA==:pNYul7adfadfadfasdfadssaPEIPTzrFLPdxC346gro="; 
"-f21d-4179-85e5-12345678abcd"; "-20e7-4905-b044-12345678abcd"; 
"2013-04-01 14:05:11"; "2013-04-02 14:47:23"; 
"-20e7-4905-b044-12345678abcd"; "987656"
"-9e65-41ce-a434-12345678abcd"; "sampl...@abc.com"; "sampl...@abc.com"; 
"Habibah"; "Assisi"; "guest"; 
"AvC7MQ==:2WCl8JQTasdfafeg452fgsgr45gsfsdg+XOMOUCLcfQ="; 
"-f21d-4179-85e5-12345678abcd"; "-f21d-4179-85e5-12345678abcd"; 
"2013-08-26 19:42:24"; "2013-08-26 19:42:24"; 
"-9e65-41ce-a434-12345678abcd"; "987657"
"-f75c-42df-beaf-12345678abcd"; "sampl...@abc.com"; "sampl...@abc.com"; 
"Keith"; "Roberts"; "guest"; 
"k/R8Mg==:vyM1Adfgsdfgsdget4563457tryeetyr1xSAHJXcqWk="; 
"-f21d-4179-85e5-12345678abcd"; "-fe13-4bcc-84a7-12345678abcd"; 
"2015-03-30 22:34:04"; "2017-05-06 13:09:25"; 
"-f75c-42df-beaf-12345678abcd"; "987658"


...

/* Affected rows: 0  Found rows: 5,103  Warnings: 0  Duration for 1 query: 
0.000 sec. (+ 0.125 sec. network) */


Yes, my MySQL is case insensitive.
SELECT *,m.EID FROM .
and
SELECT *,m.eid FROM .
both work the same.

Best Regards,
Sergio Muriel



From: Matteo Alessandroni <matteo.alessandr...@tirasa.net>
Sent: Friday, September 15, 2017 10:45 AM
To: user@syncope.apache.org
Subject: Re: Scripted SQL Pull Task Error

Hi Sergio,

could you please add a little piece of the result of your query:

SELECT * FROM sakai_user u, sakai_user_id_map m WHERE u.USER_ID = m.USER_ID ...

from your "SakaiUserSearchScript.groovy" script?
Also please check that your mysql is case insensitive, otherwise ensure that 
"it.eid" values are always set.

Regards,
Matteo



On 15/09/2017 17:17, Sergio Muriel wrote:

Hi Matteo,

please find the scripts attached to this email.

Thank you again!


Best Regards,
Sergio Muriel



From: Matteo Alessandroni <skylar...@apache.org><mailto:skylar...@apache.org>
Sent: Friday, September 15, 2017 2:25 AM
To: user@syncope.apache.org<mailto:user@syncope.apache.org>
Subject:

Hi Sergio,

could please add the "SakaiUserSearchScript.groovy" too?
I need to see whether the "eid" field is set correctly and does always return a 
value that will be mapped to "username".

Regards,
Matteo

On 2017-09-14 18:20, Sergio Muriel 
<sergio...@hotmail.com><mailto:sergio...@hotmail.com> wrote:
> Hi Matteo,
>
> please find the screenshots attached to this email.
>
>
> Thank you in advance!
>
>
> PD: If is not pictured then values are by default.
>
> Best Regards,
> Sergio Muriel
>
>
> 
> From: Matteo Alessandroni 
> <matteo.alessandr...@tirasa.net><mailto:matteo.alessandr...@tirasa.net>
> Sent: Thursday, September 14, 2017 2:23 AM
> To: user@syncope.apache.org<mailto:user@syncope.apache.org>
> Subject: Re: Scripted SQL Pull Task Error
>
> Hi Sergio,
>
> At this point could you please attach a screenshot of your mapping and also 
> the Connector and Resource configuration?
>
> Regards,
> Matteo
>
> On 14/09/2017 00:02, 

Re: Scripted SQL Pull Task Error

2017-09-15 Thread Sergio Muriel
Hi Matteo,

please find the scripts attached to this email.

Thank you again!


Best Regards,
Sergio Muriel



From: Matteo Alessandroni <skylar...@apache.org>
Sent: Friday, September 15, 2017 2:25 AM
To: user@syncope.apache.org
Subject:

Hi Sergio,

could please add the "SakaiUserSearchScript.groovy" too?
I need to see whether the "eid" field is set correctly and does always return a 
value that will be mapped to "username".

Regards,
Matteo

On 2017-09-14 18:20, Sergio Muriel <sergio...@hotmail.com> wrote:
> Hi Matteo,
>
> please find the screenshots attached to this email.
>
>
> Thank you in advance!
>
>
> PD: If is not pictured then values are by default.
>
> Best Regards,
> Sergio Muriel
>
>
> 
> From: Matteo Alessandroni <matteo.alessandr...@tirasa.net>
> Sent: Thursday, September 14, 2017 2:23 AM
> To: user@syncope.apache.org
> Subject: Re: Scripted SQL Pull Task Error
>
> Hi Sergio,
>
> At this point could you please attach a screenshot of your mapping and also 
> the Connector and Resource configuration?
>
> Regards,
> Matteo
>
> On 14/09/2017 00:02, Sergio Muriel wrote:
>
> Hi Matteo,
>
>   *   "username" is mapped in my resource. The "Purpose" column for 
> "username" is set to the icon with both pull and push arrows. (That is Sync, 
> I believe).
>   *   All users have a valid non blank username value. Indeed, I checked with 
> a query, and it has been checked also by Sakai itself.
>
> So far I have the same problem. This is what the logs say:
>
> core-persistence.log shows this for each user creation attempt:
> 16:29:19.947 WARN  
> org.apache.syncope.core.persistence.jpa.validation.entity.EntityValidationListener
>  - Bean validation errors found: 
> [ConstraintViolationImpl{rootBean=JPAUser[null], propertyPath='username', 
> message='Blank username', leafBean=JPAUser[null], value=null}]
>
>
> core.log shows this for each user creation attempt:
> 16:26:28.884 ERROR 
> org.apache.syncope.core.provisioning.api.pushpull.SyncopeResultHandler - 
> Could not create USER f84440b0-3cc7-4d83-ae02-951c81faf2e22
> org.apache.syncope.core.persistence.api.attrvalue.validation.InvalidEntityException:
>  JPAUser [Standard]
> at 
> org.apache.syncope.core.persistence.jpa.validation.entity.EntityValidationListener.validate(EntityValidationListener.java:73)
>  ~[syncope-core-persistence-jpa-2.0.4.jar:2.0.4]
> at sun.reflect.GeneratedMethodAccessor517.invoke(Unknown Source) ~[?:?]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
> ~[?:1.8.0_71]
> at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71]
> at 
> org.apache.openjpa.event.BeanLifecycleCallbacks.makeCallback(BeanLifecycleCallbacks.java:85)
>  ~[openjpa-kernel-2.4.2.jar:2.4.2]
> at 
> org.apache.openjpa.persistence.PersistenceListenerAdapter.makeCallback(PersistenceListenerAdapter.java:71)
>  ~[openjpa-persistence-2.4.2.jar:2.4.2]
> at 
> org.apache.openjpa.persistence.PersistenceListenerAdapter.beforePersist(PersistenceListenerAdapter.java:85)
>  ~[openjpa-persistence-2.4.2.jar:2.4.2]
> at 
> org.apache.openjpa.event.LifecycleEventManager.fireEvent(LifecycleEventManager.java:404)
>  ~[openjpa-kernel-2.4.2.jar:2.4.2]
> at 
> org.apache.openjpa.event.LifecycleEventManager.fireEvent(LifecycleEventManager.java:308)
>  ~[openjpa-kernel-2.4.2.jar:2.4.2]
> at 
> org.apache.openjpa.kernel.BrokerImpl.fireLifecycleEvent(BrokerImpl.java:814) 
> ~[openjpa-kernel-2.4.2.jar:2.4.2]
> at 
> org.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:140)
>  ~[openjpa-kernel-2.4.2.jar:2.4.2]
> at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:252) 
> ~[openjpa-kernel-2.4.2.jar:2.4.2]
> at org.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:105) 
> ~[openjpa-kernel-2.4.2.jar:2.4.2]
> at org.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3508) 
> ~[openjpa-kernel-2.4.2.jar:2.4.2]
> at 
> org.apache.openjpa.kernel.DelegatingBroker.attach(DelegatingBroker.java:1213) 
> ~[openjpa-kernel-2.4.2.jar:2.4.2]
> at 
> org.apache.openjpa.persistence.EntityManagerImpl.merge(EntityManagerImpl.java:879)
>  ~[openjpa-persistence-2.4.2.jar:2.4.2]
> at 
> org.apache.syncope.core.persistence.jpa.dao.AbstractAnyDAO.save(AbstractAnyDAO.java:543)
>  ~[syncope-core-persistence-jpa-2.0.4.jar:2.0.4]
> at 
> org.apache.syncope.core.persistence.jpa.dao.JPAUserDAO.save(JPAUserDAO.java:437)
>  ~[syncope-core-persistence-jpa-2.0.4.jar:2.0.4]
> at 
> org.apache.syncope.core.persistence.jpa.dao.JPAUserDAO.save(JPAUserDAO.java:84)
>  ~[syncope-core-persistence

Re: Scripted SQL Pull Task Error

2017-09-13 Thread Sergio Muriel
moteEndpointImplServer.doWrite(WsRemoteEndpointImplServer.java:95)
 ~[tomcat-websocket.jar:8.5.16]
at 
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:494)
 ~[tomcat-websocket.jar:8.5.16]
at 
org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:309)
 ~[tomcat-websocket.jar:8.5.16]
... 19 more


Finally, core-connid.log shows this once in a while:
16:15:08.888 DEBUG Exception: Method: schema
java.lang.UnsupportedOperationException: SCHEMA script executor is null. 
Problem loading Schema script
at 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector.schema(ScriptedSQLConnector.java:356)
 ~[?:?]
at 
org.identityconnectors.framework.impl.api.local.operations.SchemaImpl.schema(SchemaImpl.java:59)
 ~[connector-framework-internal-1.4.2.0.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71]
at 
org.identityconnectors.framework.impl.api.local.operations.ConnectorAPIOperationRunnerProxy.invoke(ConnectorAPIOperationRunnerProxy.java:98)
 ~[connector-framework-internal-1.4.2.0.jar:?]
at com.sun.proxy.$Proxy278.schema(Unknown Source) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71]
at 
org.identityconnectors.framework.impl.api.local.operations.ThreadClassLoaderManagerProxy.invoke(ThreadClassLoaderManagerProxy.java:96)
 ~[connector-framework-internal-1.4.2.0.jar:?]
at com.sun.proxy.$Proxy278.schema(Unknown Source) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71]
at 
org.identityconnectors.framework.impl.api.DelegatingTimeoutProxy.invoke(DelegatingTimeoutProxy.java:99)
 ~[connector-framework-internal-1.4.2.0.jar:?]
at com.sun.proxy.$Proxy278.schema(Unknown Source) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_71]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_71]
at 
org.identityconnectors.framework.impl.api.LoggingProxy.invoke(LoggingProxy.java:83)
 ~[connector-framework-internal-1.4.2.0.jar:?]
at com.sun.proxy.$Proxy278.schema(Unknown Source) ~[?:?]
at 
org.identityconnectors.framework.impl.api.AbstractConnectorFacade.schema(AbstractConnectorFacade.java:145)
 ~[connector-framework-internal-1.4.2.0.jar:?]
at 
org.apache.syncope.core.provisioning.java.AsyncConnectorFacade.getObjectClassInfo(AsyncConnectorFacade.java:112)
 ~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
at 
org.apache.syncope.core.provisioning.java.AsyncConnectorFacade$$FastClassBySpringCGLIB$$886ae36a.invoke()
 ~[syncope-core-provisioning-java-2.0.4.jar:2.0.4]
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) 
~[spring-core-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at 
org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:738)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at 
org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:115)
 ~[spring-aop-4.3.9.RELEASE.jar:4.3.9.RELEASE]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
[?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
[?:1.8.0_71]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_71]



Help is very appreciated!


Best Regards,
Sergio Muriel



From: Matteo Alessandroni <skylar...@apache.org>
Sent: Wednesday, September 13, 2017 4:23 AM
To: user@syncope.apache.org
Subject: Re: Scripted SQL Pull Task Error

Hi Sergio,

There could be 2 possibilities for that error:
- there is no mapping for "username" in your resource "Edit Provision Rules" 
section or there is an incorrect mapping (e.g. "Purpose" column for "username" 
is set not to handle synchronization);
- one or more users in your external resource do not have a "username" value 
(it is blank) and Syncope requires it.
Please ch

Scripted SQL Pull Task Error

2017-09-12 Thread Sergio Muriel
Hi everyone,

following the advise from Francesco I decided to connect to my Sakai LMS 
instance starting from the given scripts at

https://github.com/Tirasa/ConnIdDBBundle/tree/master/scriptedsql/src/main/resources/samples


I'm trying to pull the users from there, so I customized both the Sync and 
Search scripts (because the user info is not in a single table). I run the pull 
task and I can see the running task icon spinning for several minutes 
(Dashboard, control tab); however, when it stops spinning I get no new users 
but a message like this for each user in my core-persistence.log:


18:43:19.304 WARN  
org.apache.syncope.core.persistence.jpa.validation.entity.EntityValidationListener
 - Bean validation errors found: 
[ConstraintViolationImpl{rootBean=JPAUser[null], propertyPath='username', 
message='Blank username', leafBean=JPAUser[null], value=null}]


What I find weird, is that I do see that most of the users have username 
attribute (in core-connid.log), like this one:


18:43:13.858 DEBUG Enter: {Uid=Attribute: {Name=__UID__, 
Value=[5165468435165165165165]}, ObjectClass=ObjectClass: __ACCOUNT__, 
Attributes=[Attribute: {Name=lastname, Value=[Register]}, Attribute: 
{Name=username, Value=[a...@123.org]}, Attribute: {Name=__NAME__, 
Value=[a...@123.org]}, Attribute: {Name=firstname, Value=[Scott]}, Attribute: 
{Name=__UID__, Value=[5165468435165165165165]}, Attribute: {Name=email, 
Value=[a...@123.org]}], Name=Attribute: {Name=__NAME__, Value=[a...@123.org]}} 
Method: handle

It should at least load the ones that are correct. Am I right?


Thank you for the help!

Best Regards,
Sergio Muriel


Pushing changes through soap web service

2017-08-30 Thread Sergio Muriel
Hi everyone!

I'm trying to push changes to the users on Sakai LMS by using a given SOAP web 
service:

https://qa10-mysql.nightly.sakaiproject.org/sakai-axis/SakaiScript.jws?wsdl


The operation I want to use is: changeUserName

Parameters  are:

  *   sessionid: The ID of the http session.
  *   eid: Entity ID, i.e. Student ID.
  *   firstname
  *   lastname


How can I configure the connector's Service Endpoint, Service name and 
SOAPAction URI Prefix?


And most important thing: How can I make  a matching rule for sessionid?


Thank you in advance for your help!


Best Regards,
Sergio Muriel


Re: Any tutorials?

2017-08-30 Thread Sergio Muriel
> Looks like you need a PostgreSQL database instance to connect to

Yep. I followed instructions and configured it with MySQL. I thought it was 
able to run with H2 in persistent mode, but apparently not.


> I'd say that the DEB packages would have been much more easy for you to set 
> up, at this point.
It might have been but I'm not on Deb distributions.


Anyways most important thing is that got a clean exception-free startup. :-)

Big thanks  for you!


Best Regards,
Sergio Muriel

From: Francesco Chicchiriccò <ilgro...@apache.org>
Sent: Tuesday, August 29, 2017 11:50 PM
To: user@syncope.apache.org
Subject: Re: Any tutorials?

On 29/08/2017 22:26, Sergio Muriel wrote:

Aha! I was having this exception:
Could not load JDBC driver class [org.postgresql.Driver]

Then I solved it with:
CATALINA_HOME/lib/postgresql-42.1.4.jar

Of course...

I restarted Tomcat but ran into this new exception:

org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check 
that the hostname and port are correct and that the postmaster is accepting 
TCP/IP connections.
[...]

Looks like I need to configure something else somewhere.

Looks like you need a PostgreSQL database instance to connect to:

1. install PostgreSQL (if you haven't done that so far)
2. create a database named 'syncope', owned by a user 'syncope' with password 
'syncope', as explained in

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


I'd say that the DEB packages would have been much more easy for you to set up, 
at this point.

Hope this finally solves.
Regards.


From: ilgrosso <ilgro...@apache.org><mailto:ilgro...@apache.org>
Sent: Tuesday, August 29, 2017 2:52 AM
To: user@syncope.apache.org<mailto:user@syncope.apache.org>
Subject: Re: Any tutorials?


>From my project root I ran:

mvn clean verify -Dconf.directory=/opt/syncope/conf
-Dbundles.directory=/opt/syncope/bundles -Dlog.directory=/opt/syncope/log

Then I copied the respective *.properties into /opt/syncope/conf
and the respective *.war into Tomcat (CATALINA_HOME/webapps)

Tried with both 8080 and 9080 on these files:

CATALINA_HOME\conf\server.xml (

Ok, please move step by step.

First, since you have 9080 configured on $CATALINA_HOME/conf/server.xml (but
why?), then it's ok to have that port also on

/opt/syncope/conf/console.properties
/opt/syncope/conf/enduser.properties

Now:

1. shut down Tomcat
2. tail -f (or xtail, better) on $CATALINA_HOME/logs/catalina.out and
/opt/syncope/log/*.log
3. startup Tomcat
4. watch the logs and see if any exception occurs

If any exception is raised, please report; if not, try to access

http://localhost:9080/syncope/

and see if any error is reported there.

If no error, then there is no reason why the Admin Console should not be
working; anyway, keep watching the logs and access

http://localhost:9080/syncope-console/

and see if any error is reported.

HTH
Regards.

--
View this message in context: 
http://syncope-user.1051894.n5.nabble.com/Any-tutorials-tp5709363p5709429.html

Sent from the syncope-user mailing list archive at Nabble.com.


--
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: Any tutorials?

2017-08-29 Thread Sergio Muriel
(ContainerBase.java:728) 
~[catalina.jar:8.5.16]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) 
~[catalina.jar:8.5.16]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:988) 
~[catalina.jar:8.5.16]
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1860) 
~[catalina.jar:8.5.16]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 
~[?:1.8.0_71]
at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
[?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
[?:1.8.0_71]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_71]
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[?:1.8.0_71]
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) ~[?:1.8.0_71]
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[?:1.8.0_71]
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) 
~[?:1.8.0_71]
at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[?:1.8.0_71]
at java.net.PlainSocketImpl.connect(Unknown Source) ~[?:1.8.0_71]
at java.net.SocksSocketImpl.connect(Unknown Source) ~[?:1.8.0_71]
at java.net.Socket.connect(Unknown Source) ~[?:1.8.0_71]
at org.postgresql.core.PGStream.(PGStream.java:68) 
~[postgresql-42.1.4.jar:42.1.4]
at 
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)
 ~[postgresql-42.1.4.jar:42.1.4]
... 70 more


Looks like I need to configure something else somewhere.

As always, help is very appreciated.


Best Regards,
Sergio Muriel


From: ilgrosso <ilgro...@apache.org>
Sent: Tuesday, August 29, 2017 2:52 AM
To: user@syncope.apache.org
Subject: Re: Any tutorials?


>From my project root I ran:

mvn clean verify -Dconf.directory=/opt/syncope/conf
-Dbundles.directory=/opt/syncope/bundles -Dlog.directory=/opt/syncope/log

Then I copied the respective *.properties into /opt/syncope/conf
and the respective *.war into Tomcat (CATALINA_HOME/webapps)

Tried with both 8080 and 9080 on these files:

CATALINA_HOME\conf\server.xml (

Ok, please move step by step.

First, since you have 9080 configured on $CATALINA_HOME/conf/server.xml (but
why?), then it's ok to have that port also on

/opt/syncope/conf/console.properties
/opt/syncope/conf/enduser.properties

Now:

1. shut down Tomcat
2. tail -f (or xtail, better) on $CATALINA_HOME/logs/catalina.out and
/opt/syncope/log/*.log
3. startup Tomcat
4. watch the logs and see if any exception occurs

If any exception is raised, please report; if not, try to access

http://localhost:9080/syncope/

and see if any error is reported there.

If no error, then there is no reason why the Admin Console should not be
working; anyway, keep watching the logs and access

http://localhost:9080/syncope-console/

and see if any error is reported.

HTH
Regards.

--
View this message in context: 
http://syncope-user.1051894.n5.nabble.com/Any-tutorials-tp5709363p5709429.html

Sent from the syncope-user mailing list archive at Nabble.com.


Re: Any tutorials?

2017-08-28 Thread Sergio Muriel
>From my project root I ran:

mvn clean verify -Dconf.directory=/opt/syncope/conf 
-Dbundles.directory=/opt/syncope/bundles -Dlog.directory=/opt/syncope/log

Then I copied the respective *.properties into /opt/syncope/conf
and the respective *.war into Tomcat (CATALINA_HOME/webapps)


Tried with both 8080 and 9080 on these files:

CATALINA_HOME\conf\server.xml (
Sent: Friday, August 25, 2017 1:36 AM
To: user@syncope.apache.org
Subject: Re: Any tutorials?

On 24/08/2017 21:29, Sergio Muriel wrote:

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.

It is not solved, because it is not an issue :-)

Simply, the configuration files assume that you are running Tomcat on port 
8080: if your port is different (9080 as I read above), you should simply go 
and change such settings in

/opt/syncope/conf/console.properties

and

/opt/syncope/conf/enduser.properties (if you also plan to use the Enduser UI)

then restart Tomcat.

FYI: http://syncope.apache.org/issue-tracking.html
Apache Syncope – Issue Management<http://syncope.apache.org/issue-tracking.html>
syncope.apache.org
Issue Management. Issues, bugs, and feature requests should be submitted to the 
following issue management system for this project.




Regards.

From: Francesco Chicchiriccò <ilgro...@apache.org><mailto:ilgro...@apache.org>
Sent: Thursday, August 24, 2017 2:26 AM
To: user@syncope.apache.org<mailto: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ò <ilgro...@apache.org><mailto:ilgro...@apache.org>
Sent: Tuesday, August 22, 2017 10:33 AM
To: user@syncope.apache.org<mailto: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ò <ilgro...@apache.org><mailto:ilgro...@apache.org>
Sent: Sunday, August 20, 2017 1:02 AM
To: user@syncope.apache.org<mailto: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.]"

Re: New blog post - Syncope Basics: Manage external DB

2017-08-25 Thread Sergio Muriel
Matteo, thank you so much for this tutorial!
It was much needed!!

On the other hand I'm having an issue with the last step (Advanced section). I 
removed the rows in MySQL2 external resource but it didn't create anything. It 
only gets populated with the ExportUsers task.
Any clue about this issue?


PD: I also posted this question on your blog.


Sergio

From: Adrian Gonzalez 
Sent: Thursday, August 24, 2017 4:30 AM
To: user@syncope.apache.org
Subject: Re: New blog post - Syncope Basics: Manage external DB

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: 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:<http://localhost:9080/syncope-console/>

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ò <ilgro...@apache.org>
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ò <ilgro...@apache.org><mailto:ilgro...@apache.org>
Sent: Tuesday, August 22, 2017 10:33 AM
To: user@syncope.apache.org<mailto: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ò <ilgro...@apache.org><mailto:ilgro...@apache.org>
Sent: Sunday, August 20, 2017 1:02 AM
To: user@syncope.apache.org<mailto: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ò <ilgro...@apache.org><mailto:ilgro...@apache.org>
> SENT: Saturday, August 19, 2017 7:39 AM
> TO: user@syncope.apache.org<mailto: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

Re: Any tutorials?

2017-08-23 Thread Sergio Muriel
Don't worry! Actually this solution for embedded mode works like a charm!! 
Thank you!!


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

Best Regards,
Sergio Muriel




From: Francesco Chicchiriccò <ilgro...@apache.org>
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ò <ilgro...@apache.org><mailto:ilgro...@apache.org>
Sent: Sunday, August 20, 2017 1:02 AM
To: user@syncope.apache.org<mailto: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ò <ilgro...@apache.org><mailto:ilgro...@apache.org>
> SENT: Saturday, August 19, 2017 7:39 AM
> TO: user@syncope.apache.org<mailto: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 core/pom.xml because the Getting Started page [1] suggests
>> to run it
>> from there:
>>
>> " .. then, from the enduser subdirectory, execute:
>> mvn -P embedded,all"
>
> Logically, the MySQL JDBC driver is used by the Core, not by the
> Enduser UI, so the correct procedure is to add the dependency to
> core/pom.xml, rebuild everything from the root directory via "mvn clean
> install" or "mvn -Pall clean install", then move back to the enduser
> subdirectory and start as reported by the Getting Started guide.
>
> Regards.
>
> On 19-ago-17, at 2:37, Sergio Muriel 
> <sergio...@hotmail.com><mailto:sergio...@hotmail.com> wrote:
>
>> Hi again Francesco,
>
>> 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 core/pom.xml because the Getting Started page [1] suggests
>> to run it
>> from there:
>
>> " .. then, from the enduser subdirectory, execute:
>> mvn -P embedded,all"
>
>

Re: Any tutorials?

2017-08-21 Thread Sergio Muriel
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ò <ilgro...@apache.org>
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ò <ilgro...@apache.org>
> 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 core/pom.xml because the Getting Started page [1] suggests
>> to run it
>> from there:
>>
>> " .. then, from the enduser subdirectory, execute:
>> mvn -P embedded,all"
>
> Logically, the MySQL JDBC driver is used by the Core, not by the
> Enduser UI, so the correct procedure is to add the dependency to
> core/pom.xml, rebuild everything from the root directory via "mvn clean
> install" or "mvn -Pall clean install", then move back to the enduser
> subdirectory and start as reported by the Getting Started guide.
>
> Regards.
>
> On 19-ago-17, at 2:37, Sergio Muriel <sergio...@hotmail.com> wrote:
>
>> Hi again Francesco,
>
>> 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 core/pom.xml because the Getting Started page [1] suggests
>> to run it
>> from there:
>
>> " .. then, from the enduser subdirectory, execute:
>> mvn -P embedded,all"
>
>> Is it okay?
>
>> [1] https://syncope.apache.org/docs/getting-started.html
Apache Syncope 2.0.4 - Getting 
Started<https://syncope.apache.org/docs/getting-started.html>
syncope.apache.org
Apache Syncope is an Open Source system for managing digital identities in 
enterprise environments, implemented in Java EE technology and released under 
the Apache 2 ...



>
> Apache Syncope 2.0.4 - Getting Started
> syncope.apache.org
> Apache Syncope is an Open Source system for managing digital identities
> in enterprise environments, implemented in Java EE technology and
> released under the Apache 2 ...
>
>> From: Sergio Muriel <sergio...@hotmail.com>
>> Sent: Friday, August 18, 2017 3:06 PM
>> To: user@syncope.apache.org
>> Subject: Re: Any tutorials?
>
>> Hi Francesco,
>
>> First point about AnyTypeClasses worked flawlessly. (Although I'm
>> still trying
>> to figure out why I cannot reuse those schemata pre-loaded there).
>
>> Second point about dependency still throws same error: "
>> InvalidExternalResource. JDBC Driver is not found on classpath." This
>> is what I
>> added (right before the first  occurrence in
>> core/pom.xml ) :
>
>> ....
>
>> 
>> mysql
>> mysql-connector-java
>> 5.1.42
>> 
>> 
>> com.microsoft.sqlserver
>> sqljdbc4
>> 4.0
>> 
>> 
>
>> Since I'm trying to connect to sqlserver as well.
>> Suggestions will be greatly appreciated.
>
>> Thank you!
>
>> Best Regards,
>> Sergio
>
>> From: Francesco Chicchiriccò <ilgro...@apache.org>
>> Sent: Friday, August 18, 2017 1:32 AM
>> To:

Re: Any tutorials?

2017-08-19 Thread Sergio Muriel
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:

  1.  Added the dependency to core/pom.xml
  2.  Rebuilt everything from the root directory via "mvn -Pall clean install".
  3.  Ran it from enduser via "mvn -P embedded,all"

I don't know what is wrong.

Best Regards,
Sergio

From: Francesco Chicchiriccò <ilgro...@apache.org>
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 core/pom.xml because the Getting Started page [1] suggests to run 
> it
> from there:
>
> " .. then, from the enduser subdirectory, execute:
> mvn -P embedded,all"

Logically, the MySQL JDBC driver is used by the Core, not by the Enduser UI, so 
the correct procedure is to add the dependency to core/pom.xml, rebuild 
everything from the root directory via "mvn clean install" or "mvn -Pall clean 
install", then move back to the enduser subdirectory and start as reported by 
the Getting Started guide.

Regards.

On 19-ago-17, at 2:37, Sergio Muriel <sergio...@hotmail.com> wrote:

> Hi again Francesco,

> 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 core/pom.xml because the Getting Started page [1] suggests to run 
> it
> from there:

> " .. then, from the enduser subdirectory, execute:
> mvn -P embedded,all"

> Is it okay?

> [1] https://syncope.apache.org/docs/getting-started.html
Apache Syncope 2.0.4 - Getting 
Started<https://syncope.apache.org/docs/getting-started.html>
syncope.apache.org
Apache Syncope is an Open Source system for managing digital identities in 
enterprise environments, implemented in Java EE technology and released under 
the Apache 2 ...




> From: Sergio Muriel <sergio...@hotmail.com>
> Sent: Friday, August 18, 2017 3:06 PM
> To: user@syncope.apache.org
> Subject: Re: Any tutorials?

> Hi Francesco,

> First point about AnyTypeClasses worked flawlessly. (Although I'm still trying
> to figure out why I cannot reuse those schemata pre-loaded there).

> Second point about dependency still throws same error: "
> InvalidExternalResource. JDBC Driver is not found on classpath." This is what 
> I
> added (right before the first  occurrence in core/pom.xml ) :

> 

> 
> mysql
> mysql-connector-java
> 5.1.42
> 
> 
> com.microsoft.sqlserver
> sqljdbc4
> 4.0
> 
> 

> Since I'm trying to connect to sqlserver as well.
> Suggestions will be greatly appreciated.

> Thank you!

> Best Regards,
> Sergio

> From: Francesco Chicchiriccò <ilgro...@apache.org>
> Sent: Friday, August 18, 2017 1:32 AM
> To: user@syncope.apache.org
> Subject: Re: Any tutorials?
> Hi Sergio,
> see my replies embedded below.

> Regards.

> On 17/08/2017 23:28, Sergio Muriel wrote:

>> Thank you Francesco.

>> I'm trying to accomplish what you say, however I'm having two issues at the
>> moment:

>>1. I log in to syncope-console/ as admin, click on Types -> 
>> AnyTypeClasses ->
>> New AnyTypeClass but I find no schema to add because all lists are empty.

> Of course, you need first to create new schemas that are not assigned yet to 
> any
> AnyTypeClass.

>>1. I was able to create a connector in Topology -> connid -> Add New 
>> Connector,
>>but when I try to create a resource for that connector it shows this error
>> message: InvalidExternalResource. JDBC Driver is not found on classpath.

> This happens because you are likely attempting to create a DBTable or
> ScriptedSQL connector for a DBMS (MySQL / MariaDB? PostgreSQL? other?), for
> which you'll need to include the related JDBC driver.

> Since it seems you're running the Maven project, just add the related 
> dependency
> to core/pom.xml (right before the first  occurrence):

> 
> mysql
> mysql-connector-java
> 5.1.42
> 

> for

Re: Any tutorials?

2017-08-18 Thread Sergio Muriel
Hi again Francesco,

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 core/pom.xml because the Getting Started page [1] suggests to run it 
from there:


" .. then, from the enduser subdirectory, execute:
mvn -P embedded,all"


Is it okay?


[1] https://syncope.apache.org/docs/getting-started.html



____
From: Sergio Muriel <sergio...@hotmail.com>
Sent: Friday, August 18, 2017 3:06 PM
To: user@syncope.apache.org
Subject: Re: Any tutorials?


Hi Francesco,

First point about AnyTypeClasses worked flawlessly. (Although I'm still trying 
to figure out why I cannot reuse those schemata pre-loaded there).

Second point about dependency still throws same error: 
"InvalidExternalResource. JDBC Driver is not found on classpath." This is what 
I added (right before the first  occurrence in core/pom.xml):


   


  mysql
  mysql-connector-java
  5.1.42


  com.microsoft.sqlserver
  sqljdbc4
  4.0

  


Since I'm trying to connect to sqlserver as well.
Suggestions will be greatly appreciated.

Thank you!

Best Regards,
Sergio

From: Francesco Chicchiriccò <ilgro...@apache.org>
Sent: Friday, August 18, 2017 1:32 AM
To: user@syncope.apache.org
Subject: Re: Any tutorials?

Hi Sergio,
see my replies embedded below.

Regards.

On 17/08/2017 23:28, Sergio Muriel wrote:

Thank you Francesco.


I'm trying to accomplish what you say, however I'm having two issues at the 
moment:


  1.  I log in to syncope-console/ as admin, click on Types -> AnyTypeClasses 
-> New AnyTypeClass but I find no schema to add because all lists are empty.

Of course, you need first to create new schemas that are not assigned yet to 
any AnyTypeClass.


  1.  I was able to create a connector in Topology -> connid -> Add New 
Connector, but when I try to create a resource for that connector it shows this 
error message: InvalidExternalResource. JDBC Driver is not found on classpath.

This happens because you are likely attempting to create a DBTable or 
ScriptedSQL connector for a DBMS (MySQL / MariaDB? PostgreSQL? other?), for 
which you'll need to include the related JDBC driver.

Since it seems you're running the Maven project, just add the related 
dependency to core/pom.xml (right before the first  occurrence):


  mysql
  mysql-connector-java
  5.1.42


for MySQL, or


  org.mariadb.jdbc
  mariadb-java-client
  1.6.1


for MariaDB, and so on.


I created my project with maven archetype and run it with

mvn -P embedded,all


Any clue of what I'm doing wrong here?

Your help is very appreciated.


Sergio


From: Francesco Chicchiriccò <ilgro...@apache.org><mailto:ilgro...@apache.org>
Sent: Friday, August 11, 2017 5:14 AM
To: user@syncope.apache.org<mailto:user@syncope.apache.org>
Subject: Re: Any tutorials?

On 10/08/2017 19:16, Sergio Muriel wrote:

Hi,

does anyone know about any easy to follow Syncope tutorials or documentation?

I have been reading the reference 
guide<http://syncope.apache.org/docs/reference-guide.html> but I find it hard 
to follow.


This is what I need to do: Synchronize db2db fields, web service to web service 
and database fields to web service and vice versa.

Hi Sergio, and welcome to Apache Syncope!

We don't have much "from 0 to ready" tutorials out there; you might want to 
read this post by Colm about pulling users from LDAP:

http://coheigea.blogspot.it/2016/08/pulling-users-and-groups-from-ldap-into.html

Also, someone started a primer a while ago

https://cwiki.apache.org/confluence/display/SYNCOPE/Apache+Syncope+2.0+Primer

but it's in the very early stages.

At a high level, for your own use case you'll need to:

1. define all the plain schemas you want to model for the Internal Storage
2. create one or more Connectors
3. for each Connector, create one or more External Resource where you define 
the mapping between Internal Storage's schemas and External Resource's 
attributes
4. for each Resource you want to pull users from, create a Pull Task

I'd suggest to start with one Connector / Resource (maybe for the DB you want 
to pull users from) and then proceed incrementally.

If the users you want to pull from the external DB fit in a single table, you 
can use the DBTable connector, otherwise you'll need the ScriptedSQL, which 
also requires to code / adjust some Groovy scripts to work.

Maybe it's also an idea for you to start with the Standalone Distribution, 
which is full of test data, and look at how things are configured there.

HTH
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: Any tutorials?

2017-08-18 Thread Sergio Muriel
Hi Francesco,

First point about AnyTypeClasses worked flawlessly. (Although I'm still trying 
to figure out why I cannot reuse those schemata pre-loaded there).

Second point about dependency still throws same error: 
"InvalidExternalResource. JDBC Driver is not found on classpath." This is what 
I added (right before the first  occurrence in core/pom.xml):


   


  mysql
  mysql-connector-java
  5.1.42


  com.microsoft.sqlserver
  sqljdbc4
  4.0

  


Since I'm trying to connect to sqlserver as well.
Suggestions will be greatly appreciated.

Thank you!

Best Regards,
Sergio

From: Francesco Chicchiriccò <ilgro...@apache.org>
Sent: Friday, August 18, 2017 1:32 AM
To: user@syncope.apache.org
Subject: Re: Any tutorials?

Hi Sergio,
see my replies embedded below.

Regards.

On 17/08/2017 23:28, Sergio Muriel wrote:

Thank you Francesco.


I'm trying to accomplish what you say, however I'm having two issues at the 
moment:


  1.  I log in to syncope-console/ as admin, click on Types -> AnyTypeClasses 
-> New AnyTypeClass but I find no schema to add because all lists are empty.

Of course, you need first to create new schemas that are not assigned yet to 
any AnyTypeClass.


  1.  I was able to create a connector in Topology -> connid -> Add New 
Connector, but when I try to create a resource for that connector it shows this 
error message: InvalidExternalResource. JDBC Driver is not found on classpath.

This happens because you are likely attempting to create a DBTable or 
ScriptedSQL connector for a DBMS (MySQL / MariaDB? PostgreSQL? other?), for 
which you'll need to include the related JDBC driver.

Since it seems you're running the Maven project, just add the related 
dependency to core/pom.xml (right before the first  occurrence):


  mysql
  mysql-connector-java
  5.1.42


for MySQL, or


  org.mariadb.jdbc
  mariadb-java-client
  1.6.1


for MariaDB, and so on.


I created my project with maven archetype and run it with

mvn -P embedded,all


Any clue of what I'm doing wrong here?

Your help is very appreciated.


Sergio


From: Francesco Chicchiriccò <ilgro...@apache.org><mailto:ilgro...@apache.org>
Sent: Friday, August 11, 2017 5:14 AM
To: user@syncope.apache.org<mailto:user@syncope.apache.org>
Subject: Re: Any tutorials?

On 10/08/2017 19:16, Sergio Muriel wrote:

Hi,

does anyone know about any easy to follow Syncope tutorials or documentation?

I have been reading the reference 
guide<http://syncope.apache.org/docs/reference-guide.html> but I find it hard 
to follow.


This is what I need to do: Synchronize db2db fields, web service to web service 
and database fields to web service and vice versa.

Hi Sergio, and welcome to Apache Syncope!

We don't have much "from 0 to ready" tutorials out there; you might want to 
read this post by Colm about pulling users from LDAP:

http://coheigea.blogspot.it/2016/08/pulling-users-and-groups-from-ldap-into.html

Also, someone started a primer a while ago

https://cwiki.apache.org/confluence/display/SYNCOPE/Apache+Syncope+2.0+Primer

but it's in the very early stages.

At a high level, for your own use case you'll need to:

1. define all the plain schemas you want to model for the Internal Storage
2. create one or more Connectors
3. for each Connector, create one or more External Resource where you define 
the mapping between Internal Storage's schemas and External Resource's 
attributes
4. for each Resource you want to pull users from, create a Pull Task

I'd suggest to start with one Connector / Resource (maybe for the DB you want 
to pull users from) and then proceed incrementally.

If the users you want to pull from the external DB fit in a single table, you 
can use the DBTable connector, otherwise you'll need the ScriptedSQL, which 
also requires to code / adjust some Groovy scripts to work.

Maybe it's also an idea for you to start with the Standalone Distribution, 
which is full of test data, and look at how things are configured there.

HTH
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: Any tutorials?

2017-08-17 Thread Sergio Muriel
Thank you Francesco.


I'm trying to accomplish what you say, however I'm having two issues at the 
moment:


  1.  I log in to syncope-console/ as admin, click on Types -> AnyTypeClasses 
-> New AnyTypeClass but I find no schema to add because all lists are empty.
  2.  I was able to create a connector in Topology -> connid -> Add New 
Connector, but when I try to create a resource for that connector it shows this 
error message: InvalidExternalResource. JDBC Driver is not found on classpath.


I created my project with maven archetype and run it with

mvn -P embedded,all


Any clue of what I'm doing wrong here?

Your help is very appreciated.


Sergio



From: Francesco Chicchiriccò <ilgro...@apache.org>
Sent: Friday, August 11, 2017 5:14 AM
To: user@syncope.apache.org
Subject: Re: Any tutorials?

On 10/08/2017 19:16, Sergio Muriel wrote:

Hi,

does anyone know about any easy to follow Syncope tutorials or documentation?

I have been reading the reference 
guide<http://syncope.apache.org/docs/reference-guide.html> but I find it hard 
to follow.


This is what I need to do: Synchronize db2db fields, web service to web service 
and database fields to web service and vice versa.

Hi Sergio, and welcome to Apache Syncope!

We don't have much "from 0 to ready" tutorials out there; you might want to 
read this post by Colm about pulling users from LDAP:

http://coheigea.blogspot.it/2016/08/pulling-users-and-groups-from-ldap-into.html

Also, someone started a primer a while ago

https://cwiki.apache.org/confluence/display/SYNCOPE/Apache+Syncope+2.0+Primer

but it's in the very early stages.

At a high level, for your own use case you'll need to:

1. define all the plain schemas you want to model for the Internal Storage
2. create one or more Connectors
3. for each Connector, create one or more External Resource where you define 
the mapping between Internal Storage's schemas and External Resource's 
attributes
4. for each Resource you want to pull users from, create a Pull Task

I'd suggest to start with one Connector / Resource (maybe for the DB you want 
to pull users from) and then proceed incrementally.

If the users you want to pull from the external DB fit in a single table, you 
can use the DBTable connector, otherwise you'll need the ScriptedSQL, which 
also requires to code / adjust some Groovy scripts to work.

Maybe it's also an idea for you to start with the Standalone Distribution, 
which is full of test data, and look at how things are configured there.

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



Any tutorials?

2017-08-10 Thread Sergio Muriel
Hi,

does anyone know about any easy to follow Syncope tutorials or documentation?

I have been reading the reference 
guide but I find it hard 
to follow.


This is what I need to do: Synchronize db2db fields, web service to web service 
and database fields to web service and vice versa.

Thank you for your answer.