Hello Adrien,

Sorry for the late reply, I was away for a few days.

I think this is happening because it is not usual to send profiles or event
session as sources or targets of event. Usually the profile is referenced
through the profileId property of the event.

But indeed you are encountering this problem because, upon deserialization,
it is expecting a CustomItem instead of a Profile object, and the
CustomItem doesn't support the systemProperties map.

If you don't need to, I would avoid sending the profile as source or
target, this would solve your problem.

Regards,
  Serge Huber.

Serge Huber
CTO & Co-Founder
T +41 22 361 3424
9 route des Jeunes | 1227 Acacias | Switzerland
jahia.com <http://www.jahia.com/>
SKYPE | LINKEDIN <https://www.linkedin.com/in/sergehuber> | TWITTER
<https://twitter.com/sergehuber> | VCARD
<http://www.jahia.com/vcard/HuberSerge.vcf>


> JOIN OUR COMMUNITY <http://www.jahia.com/> to evaluate, get trained and
to discover why Jahia is a leading User Experience Platform (UXP) for
Digital Transformation.


On Tue, Apr 26, 2022 at 4:25 PM OLIVA Adrien <[email protected]> wrote:

> Hi all,
>
> I try to get list of event through POST /cxs/events/search, but I
> experience issue in a particular case.
> With a plugin, I generate event with a Unomi Profile as event's target or
> source. But when I try to get back this event, I get jackson exception:
>
> Caused by:
> com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException:
> Unrecognized field "systemProperties" (class
> org.apache.unomi.api.CustomItem), not marked as ignorable (4 known
> properties: "properties", "scope", "itemType", "itemId"])
>  at [Source: UNKNOWN; line: -1, column: -1] (through reference chain:
> org.apache.unomi.api.Event["source"]->org.apache.unomi.api.CustomItem["systemProperties"])
>
>
> I use Unomi 1.6.0.
>
> You can find in attachment full stack trace when I run:
>
> curl -X POST --user karaf:karaf -H "Content-Type: application/json"
> http://localhost:8181/cxs/events/search -d@- <<EOF
> {
>     "offset": 0,
>     "limit": 20,
>     "condition": {
>         "type": "eventPropertyCondition",
>         "parameterValues": {
>             "propertyName": "scope",
>             "comparisonOperator": "equals",
>             "propertyValue": "SortEvent[]"
>         }
>     }
> }
> EOF
>
>
> I also attach event.json, which is an extract of event stored in
> ElasticSearch.
>
> Any of you has already seen this kind of issue?
> I did not find related ticket on Unomi Jira (but maybe I did not find it!).
>
> Is there any kind of additional configuration or "flag" needed to store
> profile in event's source?
>
> Thank you for your help.
>
> Regards.
>
> --
>
> Adrien Oliva
> Ingénieur Logiciel
>
>                 ≡
>      S E F A S
> UNE MARQUE DE DOCAPOSTE
>
> 6 rue de l’étang - 90000 Belfort
> Tel. : +33 (0)3 63 14 10 08 - E-mail : [email protected] 
> - www.docaposte.com
>
>
> Sefas est une marque de Docaposte, filiale du Groupe La Poste.
> Adoptez l’éco-attitude : n’imprimez que si cela vous semble
> nécessaire.
> Si vous recevez ce mail en dehors de vos heures de travail ou
> pendant vos congés, vous n’avez pas à y répondre immédiatement,
> sauf en cas d'urgence exceptionnelle.
>
>
>

Reply via email to