On 24/02/23 17:35, Lionel SCHWARZ wrote:
----- Le 24 Fév 23, à 15:55, Lionel SCHWARZ lionel.schw...@in2p3.fr a écrit :

----- Le 20 Fév 23, à 10:55, Francesco Chicchiriccò ilgro...@apache.org a écrit
:

Propagation works smoothly but during pull, I get the following error:

org.apache.syncope.core.provisioning.java.pushpull.InboundMatcher - Could not
match {Uid=Attribute: {Name=__UID__, Value=[1288]}, ObjectClass=ObjectClass:
IDMSERVICE, DeltaType=CREATE_OR_UPDATE, Token=SyncToken: ,
Object={Uid=Attribute: {Name=__UID__, Value=[1288]}, ObjectClass=ObjectClass:
IDMSERVICE, Attributes=[Attribute: {Name=__NAME__, Value=[idnum_service]},
Attribute: {Name=__UID__, Value=[1288]}], Name=Attribute: {Name=__NAME__,
Value=[idnum_service]}}, PreviousUid=null} with any existing SERVICE
java.lang.NullPointerException: null
at
org.apache.syncope.core.provisioning.api.jexl.JexlUtils.addFieldsToContext(JexlUtils.java:124)
~[syncope-core-provisioning-api-3.0.1.jar:3.0.1]
        at
        
org.apache.syncope.core.provisioning.java.data.JEXLItemTransformerImpl.lambda$beforePull$1(JEXLItemTransformerImpl.java:179)
        ~[syncope-core-provisioning-java-3.0.1.jar:3.0.1]
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
        at
        
org.apache.syncope.core.provisioning.java.data.JEXLItemTransformerImpl.beforePull(JEXLItemTransformerImpl.java:176)
        ~[syncope-core-provisioning-java-3.0.1.jar:3.0.1]
        at
        
org.apache.syncope.core.provisioning.java.pushpull.InboundMatcher.matchByConnObjectKeyValue(InboundMatcher.java:230)
        ~[syncope-core-provisioning-java-3.0.1.jar:3.0.1]
        at
        
org.apache.syncope.core.provisioning.java.pushpull.InboundMatcher.match(InboundMatcher.java:420)
        ~[syncope-core-provisioning-java-3.0.1.jar:3.0.1]
Looking at the code, I see that "null" is sent as an argument here:
https://github.com/apache/syncope/blob/syncope-3.0.1/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/InboundMatcher.java#L232
which seems to lead to the NPE

Nice spot, Lionel!

Fixed by:

https://github.com/apache/syncope/commit/71fa807fc666d2b5c9291ad6c2ea9386000a9cb4

The fix will be released with Syncope 3.0.3.

Meanwhile you should be able to backport it by copying the class

https://github.com/apache/syncope/blob/3_0_X/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/jexl/JexlUtils.java

into your local Maven project.

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/

Reply via email to