cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create trigger personalization trail Can't unmarshall error

0 Kudos

I'm on the part "Creating a new trigger" on the trail "Personalization Trail" under:

 https://help.hybris.com/6.7.0/hcd/d493b645afb74c439a15fc6fbc78c8f9.html#copyd493b645afb74c439a15fc6f...

When trying to create a new trigger without userGroupUid to verify that the validator works with the the following command as in the trail:

 curl --insecure --verbose --header "Authorization: Bearer cd12848b-5f21-433a-a33c-9d91753b647e" --header "Content-Type: application/json" https://localhost:9002/personalizationwebservices/v1/catalogs/electronicsContentCatalog/catalogVersi... --request POST --data '{"type" : "userGroupTriggerData","code" : "newUserGroupTrigger"}'

I got the following error and don't know how to fix it. Does anyone have an idea? Thanks!:

 *  issuer: C=DE; ST=yDevelopers; L=yDevelopers; CN=yDevelopers
 *  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
 > POST /personalizationwebservices/v1/catalogs/electronicsContentCatalog/catalogVersions/Staged/customizations/Banner/variations/variationForUserGroup/triggers HTTP/1.1
 > Host: localhost:9002
 > User-Agent: curl/7.61.1
 > Accept: */*
 > Authorization: Bearer cd12848b-5f21-433a-a33c-9d91753b647e
 > Content-Type: application/json
 > Content-Length: 6
 >
 * upload completely sent off: 6 out of 6 bytes
 < HTTP/1.1 400
 < X-Frame-Options: SAMEORIGIN
 < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 < Pragma: no-cache
 < Expires: 0
 < Strict-Transport-Security: max-age=16070400 ; includeSubDomains
 < X-XSS-Protection: 1; mode=block
 < X-Content-Type-Options: nosniff
 < Content-Type: application/json;charset=UTF-8
 < Transfer-Encoding: chunked
 < Date: Fri, 18 Jan 2019 08:08:49 GMT
 < Connection: close
 <
 {
    "errors" : [ {
       "message" : "Can't unmarshall input to class: class de.hybris.platform.personalizationfacades.data.TriggerData",
       "type" : "HttpMessageNotReadableError"
    } ]
 }* Closing connection 0
 * TLSv1.2 (OUT), TLS alert, close notify (256):
 Note: Unnecessary use of -X or --request, POST is already inferred.
 * Bad URL, colon is first character
 * Closing connection -1
 curl: (3) Bad URL, colon is first character
 Note: Unnecessary use of -X or --request, POST is already inferred.
 * Rebuilt URL to: userGroupTriggerData,code/
 * Could not resolve host: userGroupTriggerData,code
 * Closing connection 1
 curl: (6) Could not resolve host: userGroupTriggerData,code
 Note: Unnecessary use of -X or --request, POST is already inferred.
 * Bad URL, colon is first character
 * Closing connection -1
 curl: (3) Bad URL, colon is first character
 curl: (3) [globbing] unmatched close brace/bracket in column 20

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

I do not have ready answers for you but a few questions to be able to better understand your problem.

When trying to create a new trigger without userGroupUid

Have you been able to create a new trigger with all required fields? Is is working properly and the error occures only when testing validation or it appears in other circumstances as well?

And just to confirm, have you successfully finished the previous step and you are able to get the trigger data? https://help.hybris.com/6.7.0/hcd/0522e2aaf1854322a5a6b13ca793f1b1.html#loio0522e2aaf1854322a5a6b13c...
former_member747843
Active Participant
0 Kudos

Hi
This error is thrown when data in POST are incorrect (e.g. not correct json format) and cannot be converted to object.
Take a closer look at this part of curl ('{"type" : "userGroupTriggerData","code" : "newUserGroupTrigger"}') e.g. if all data was copied , check apostrophes ,quotation marks.
You can also try to send this request by different client.

former_member747843
Active Participant
0 Kudos

This error is also thrown when "type" attribute is incorrect (there is no matching class)