cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1864
Views
0
Helpful
8
Replies

Error on client.init

Frederic Doyle
Cisco Employee
Cisco Employee

My program was working before and now I get this :

2016-06-06 16:37:30 INFO  Import$Arguments:353 - Arguments- Flush: false, Directory: C:\Users\frdoyle\pods, Connection String: eyJhcHBsaWNhdGlvblR5cGUiOiJjdXN0b20iLCJkaXNjb3ZlcnlVcmwiOiJkaXNjb3ZlcnkucmNpYWQuY2lzY29jY3NlcnZpY2UuY29tIiwiaWRlbnRpdHlCcm9rZXJVc

mwiOiJpZGJyb2tlci53ZWJleC5jb20iLCJmbXNVcmwiOiJoZXJjdWxlcy1hLndieDIuY29tIiwiY29sbGFiTWFuYWdlbWVudFVybCI6Imh0dHBzOi8vYWRtaW4uY2lzY29zcGFyay5jb20iL

CJjbHVzdGVyIjp7ImNsdXN0ZXJJZCI6IjJkYzZjMjRmLTliMTEtNDEyZS05ZWQ4LTJlZjI3Y2E4Njk5MiIsImNsdXN0ZXJOYW1lIjoiY3VzdG9tLWNvbnRleHQtMTU1Mjc1QjlGQkQifSwiY

3JlZGVudGlhbHMiOnsibmFtZSI6ImZ1c2lvbi1tZ21udC01NTQ0MmEwOC0yZjAwLTRiOTMtYjFlYy0wN2U5NGFjODUyODYiLCJwYXNzd29yZCI6ImFhQkIxMiQxZjE3MjlmMy0yMGU2LTRiM

jQtOGM3Ny0xNTUxMWJmMWQ2YmQiLCJvcmdJZCI6IjFjMTEzOTY5LTdmZGQtNDg4Zi04MDY4LTNiNDMyNDRhMWI0NCIsImxvY2F0aW9uIjoiaHR0cHM6Ly9pZGVudGl0eS53ZWJleC5jb20vb

3JnYW5pemF0aW9uLzFjMTEzOTY5LTdmZGQtNDg4Zi04MDY4LTNiNDMyNDRhMWI0NC92MS9NYWNoaW5lcy9mYzczM2QwOC0xNDExLTQxODItYjg4Ny1iZTM4N2UzNDA4MzgiLCJtYWNoaW5lQ

WNjb3VudExvY2F0aW9uIjoiaHR0cHM6Ly9pZGV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NiNDMyNDRhMWI0NC92MS9NYWNoaW5lcy84Yzc5NzNjOC1jYWM5LTRjNmMtYTk1OC1lZ

WNkYzNiYmVmOWUiLCJpZCI6IjhjNzk3M2M4LWNhYzktNGM2Yy1hOTU4LWVlY2RjM2JiZWY5ZSIsImNpc1V1aWQiOiI4Yzc5NzNjOC1jYWM5LTRjNmMtYTk1OC1lZWNkYzNiYmVmOWUiLCJjb

GllbnRJZCI6IkNkYWU5ZTJhYzViNmZiODAwYTU2Yjk3MGU4MzZjMGM1Y2E4NGNhOTZkMWEzZmE2ODFmOGI0YzdhZTM1ZTVhZmI4IiwiY2xpZW50U2VjcmV0IjoiYzEzOGJkNWJiZTkxM2FhY

mE3MTViNGZhNDY2ZjEwZWEwZDUzZGU3YWVlNDBkODM0MWEyMjgxZjkyZDM4ZmYzZCJ9fQ==

2016-06-06 16:37:30 INFO  ConnectorFactory:219 - Current path :C:\Users\frdoyle\workspace\CSImport\.

2016-06-06 16:37:30 INFO  ConnectorFactory:317 - loadConfigurations path :C:\Users\frdoyle\workspace\CSImport\connector.property

2016-06-06 16:37:32 INFO  ConnectorFactory:254 - Loading extensions from jarPath :C:\Users\frdoyle\workspace\CSImport\plugin\context-service-sdk-extension-1.0.7.jar

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:62 - loading new implClass in ConnectorProxyInvocationHandler = com.cisco.thunderhead.connector.impl.ManagementConnectorImpl@e95595b

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:67 - Getting cached init params and connector state

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:76 - Getting attaching update listener and setting connector state

2016-06-06 16:37:33 INFO  SoftwareUpdateImpl:57 - Setting connector state from previous version

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:121 - Ignoring initializing new connector because cached parameters are empty

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:88 - Swapping versions

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:91 - Versions are swapped

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:62 - loading new implClass in ConnectorProxyInvocationHandler = com.cisco.thunderhead.connector.impl.RegisteringApplicationImpl@25a7fedf

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:67 - Getting cached init params and connector state

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:76 - Getting attaching update listener and setting connector state

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:121 - Ignoring initializing new connector because cached parameters are empty

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:88 - Swapping versions

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:91 - Versions are swapped

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:62 - loading new implClass in ConnectorProxyInvocationHandler = com.cisco.thunderhead.client.ContextServiceClientImpl@7c281eb8

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:67 - Getting cached init params and connector state

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:76 - Getting attaching update listener and setting connector state

2016-06-06 16:37:33 INFO  SoftwareUpdateImpl:57 - Setting connector state from previous version

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:121 - Ignoring initializing new connector because cached parameters are empty

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:88 - Swapping versions

2016-06-06 16:37:33 INFO  ConnectorProxyInvocationHandler:91 - Versions are swapped

2016-06-06 16:37:33 INFO  ConnectorFactory:289 - ConnectorFactory.resetPluginManager - completed oldPluginManager shutdown

2016-06-06 16:37:33 INFO  ConnectorFactory:291 - ConnectorFactory.resetPluginManager - done

ContextServiceClient version :  1.0.7-10011

2016-06-06 16:37:42 INFO  GsonMessageBodyHandler:171 - Unable to unmarshal bean: {"applicationType":"custom","discoveryUrl":"discovery.rciad.ciscoccservice.com","identityBrokerUÿÿÿ› ŽˆšY œ›ÚÙ\‹?ÙX™^ ˜ÛÛH‹ ™›\Õ\› Žˆš \˜Ý[ \ËXK?Øž ‹˜ÛÛH‹ ˜ÛÛ  X“X[˜YÙ[Y[? \› Žˆš    ΋ËØY Z[‹˜Ú\ØÛÜÜ \šË˜ÛÛH‹ÿÿÂ&6ÇW7FW"#§²&6ÇW7FW$–B#¢#&F3f3#FbÓ–#  ÓC &RÓ–VC‚Ó&Vc#v6 ƒc““""Â&6ÇW7FW$æ ÖR#¢&7W7FöÒÖ6öçFW‡BÓ SS#sT#”d$B'ÒÂ&ÿÿýÉ•‘•¹Ñ¥…±Ìˆé쉹…µ”ˆè‰™ÕÍ¥½¸µµ?µ¹Ð´ÔÔÐÐÉ„Àà´É˜ÀÀ´Ñˆä̵ˆÅ•Œ´ÀÝ”äÑ…ŒàÔÈà؈°‰Á…ÍÍݽÉ?ˆè‰……     ÄÈ?ŘÄÜÈå˜Ì´ÈÁ”شшÏÿþ4-8c77-15511bf1d6bd","orgId":"1c113969-7fdd-488f-8068-3b43244a1b44","location":"https://identity.webex.com/ÿÿÿÜ™Ø[š^˜] [Û‹ÌXÌLLÎMŽKMÙ™  M   ‹N

Ž LØ? Ì?

LX?

ÝŒKÓXXÚ [™\ËÙ˜ÍÌÌÙ   LM LKM N ‹XŽ

ËX™LÎ

ÙLÍ   Î ‹ ›XXÚ [™PÿÿÖ66÷VçDÆö6 F–öâ#¢&‡GG 3¢òö–FVçF—G’çvV&W‚æ6öÒö÷&v æ—¦ F–öâó 3  3“c’ÓvfFBÓCƒ†bÓƒ c‚Ó6#C3#CF  #CB÷c ôÖ 6†–æW2öfÿÿüÜÌÍ?Àà´ÄÐÄÄ´ÐÄàȵˆààܵ‰”ÌàÝ”ÌÐÀàÌàˆ°‰¥?ˆè‰™ŒÜÌÍ?Àà´ÄÐÄÄ´ÐÄàȵˆààܵ‰”ÌàÝ”ÌÐÀàÌàˆ°‰?¥ÍUÕ¥?ˆè‰™ŒÜÌÍ?Àà´ÄÐÄÄ´ÐÄïÿü2-b887-be387e340838","clientId":"Cdae9e2ac5b6fb800a56b970e836c0c5ca84ca96d1a3fa681f8b4c7ae35e5afb8","clientÿÿÿÙXÜ™] Žˆ˜ÌLÎ ™

X˜™NLLØXX˜MÌMX? ˜M

?™ŒL XL

LÙ MØYYM    Í XLŒŽ YŽL™ Î ™ŒÙ ŸK ˜Ü™Y [? X[ Ó X“[Ù HŽžÈ›˜[YHŽˆ™?\ÿÿö–öâÖÖvÖçBÖ “ss vVBÓ“332ÓC “BÖ&#“2Ó““c  VVS–&C "Â'  77v÷&B#¢&  $# "F ƒC3ƒ“F Ó f3rÓCC–2Óƒ SRÖSCs3ƒcS&&cV""Â&÷ÿÿù?%?ˆèˆÅŒÄÄÌäØä´Ý™‘?´ÐàᘴàÀØà´ÍˆÐÌÈÐфňÐЈ°‰±½?…Ñ¥½¸ˆè‰¡ÑÑÁÌè¼½¥‘•¹Ñ¥Ñä¹Ý•‰•à¹?½´½½É?…¹¥é…Ñ¥½¸¼ÅŒÄÄÌäØä´Ý™Ÿÿüd-488f-8068-3b43244a1b44/v1/Machines/8c7973c8-cac9-4c6c-a958-eecdc3bbef9e","machineAccountLocation":"https:ÿÿÿËÚY [? ] K?ÙX™^ ˜ÛÛKÛÜ™Ø[š^˜] [Û‹ÌXÌLLÎMŽKMÙ™  M   ‹N

Ž LØ? Ì?

LX?

ÝŒKÓXXÚ [™\ËÎ ÍÎMÌØÎ XØXÎKM ͘ËXNMN YYÿÿÖ6F36&&Vc–R"Â&–B#¢#†3s“s63‚Ö6 3’ÓF3f2Ö “S‚ÖVV6F36&&Vc–R"Â&6—5WV–B#¢#†3s“s63‚Ö6 3’ÓF3f2Ö “S‚ÖVV6F36&&Vc–R"Â&6ÿÿñ¥•¹Ñ%?ˆè‰

‘…”å”É…ŒÕˆÙ™ˆàÀÁ„ÔÙˆäÜÁ”àÌÙŒÁŒÕ?„àÑ?„äÙ?Å„Í™„ØàŘáˆÑŒÝ…”ÌÕ”Õ…™ˆàˆ°‰?±¥•¹ÑM•?ɕЈ艌ÄÌá‰?Õ‰‰”äÄÍ……?ÿþa715b4fa466f10ea0d53de7aee40d8341a2281f92d38ff3d"}} to type: com.cisco.thunderhead.ConnectionData

1 Accepted Solution

Accepted Solutions

ok adding the filed worked , I did this :

Field numPolice = new Field("IA_NumeroPolice", ElementClassification.PII, ElementDataType.STRING, false, null);

        try {

            csClient.create(numPolice);

        } catch (Exception e) {

            System.out.println("\n *** Unable to create field: " + e.getMessage() + " ***");

        }

I know it works since it's failling now complaining that I'm trying to insert a field that already exist.

But when I'm trying to use it it says :

2016-06-06 19:23:59 ERROR ContextServiceClientImpl:323 - ApiError with errorType: invalidData, errorData: dataElements, errorMessage: Non-existing field (IA_NumeroPolice) specified in data elements, but not in fieldsets:[cisco.base.customer].

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

    at java.lang.reflect.Constructor.newInstance(Unknown Source)

View solution in original post

8 Replies 8

wadegong
Level 1
Level 1

It seems your connectionData is corrupted. Yours should be

eyJhcHBsaWNhdGlvblR5cGUiOiJjdXN0b20iLCJkaXNjb3ZlcnlVcmwiOiJkaXNjb3ZlcnkucmNpYWQuY2lzY29jY3NlcnZpY2UuY29tIiwiaWRlbnRpdHlCcm9rZXJVcmwiOiJpZGJyb2tlci53ZWJleC5jb20iLCJmbXNVcmwiOiJoZXJjdWxlcy1hLndieDIuY29tIiwiY29sbGFiTWFuYWdlbWVudFVybCI6Imh0dHBzOi8vYWRtaW4uY2lzY29zcGFyay5jb20iLCJjbHVzdGVyIjp7ImNsdXN0ZXJJZCI6IjJkYzZjMjRmLTliMTEtNDEyZS05ZWQ4LTJlZjI3Y2E4Njk5MiIsImNsdXN0ZXJOYW1lIjoiY3VzdG9tLWNvbnRleHQtMTU1Mjc1QjlGQkQifSwiY3JlZGVudGlhbHMiOnsibmFtZSI6ImZ1c2lvbi1tZ21udC01NTQ0MmEwOC0yZjAwLTRiOTMtYjFlYy0wN2U5NGFjODUyOD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iLCJvcmdJZCI6IjFjMTEzOTY5LTdmZGQtNDg4Zi04MDY4LTNiNDMyNDRhMWI0NCIsImxvY2F0aW9uIjoiaHR0cHM6Ly9pZGVudGl0eS53ZWJleC5jb20vb3JnYW5pemF0aW9uLzFjMTEzOTY5LTdmZGQtNDg4Zi04MDY4LTNiNDMyNDRhMWI0NC92MS9NYWNoaW5lcy84Yzc5NzNjOC1jYWM5LTRjNmMtYTk1OC1lZWNkYzNiYmVmOWUiLCJtYWNoaW5lQWNjb3VudExvY2F0aW9uIjoiaHR0cHM6Ly9pZGVudGl0eS53ZWJleC5jb20vb3JnYW5pemF0aW9uLzFjMTEzOTY5LTdmZGQtNDg4Zi04MDY4LTNiNDMyNDRhMWI0NC92MS9NYWNoaW5lcy84Yzc5NzNjOC1jYWM5LTRjNmMtYTk1OC1lZWNkYzNiYmVmOWUiLCJpZCI6IjhjNzk3M2M4LWNhYzktNGM2Yy1hOTU4LWVlY2RjM2JiZWY5ZSIsImNpc1V1aWQiOiI4Yzc5NzNjOC1jYWM5LTRjNmMtYTk1OC1lZWNkYzNiYmVmOWUiLCJjbGllbnRJZCI6IkNkYWU5ZTJhYzViNmZiODAwYTU2Yjk3MGU4MzZjMGM1Y2E4NGNhOTZkMWEzZmE2ODFmOGI0YzdhZTM1ZTVhZmI4IiwiY2xpZW50U2VjcmV0IjoiYzEzOGJkNWJiZTkxM2FhYmE3MTViNGZhNDY2ZjEwZWEwZDUzZGU3YWVlNDBkODM0MWEyMjgxZjkyZDM4ZmYzZCJ9fQ==

Without any space or tab characters. The question is how you store and retrieve the connectionData for your app and pass it to context service SDK?

you were right ... as usual.

I am passing connection data through Debug arguments in Eclipse.  It was working this morning but apparently I did something different this afternoon.

I have hardcoded the connection data in my code and now it's working.

But I discover something I was not aware of.  I was creating my customer and I got this error :

2016-06-06 18:11:26 ERROR Import:107 - Exception while creatingCustomer key: 76066410-1841-11e6-9d55-f38512983078, refUrl: null, created: null, lastUpdated: null, workgroups: {}, fieldsets: [cisco.base.customer], dataElements: [dataElement key and value: *****:*****, type: string, dataElement key and value: *****:*****, type: string, dataElement key and value: *****:*****, type: string, dataElement key and value: *****:*****, type: string],

ApiError with errorType: invalidData, errorData: dataElements, errorMessage: Non-existing field (Context_Nom) specified in data elements, but not in fieldsets:[cisco.base.customer].

Apparently I cannot add any fields,  I taught it was possible to add proprietary field in customer, request and pod, I didnt know we were limited to specific field name. 

Do you have all the list of whats possible.  My customer was asking to add Police number (insurance) to the customer info, also I have tried to set my field name in French but looks like I cant.  Am I doing something wrong?

thanks

Fred

You can find out all the Cisco default fields and you add custom fields and fieldsets through CC API. I suggest you read our SDK Guide, esp. the sections: "Base Field Sets and Fields"(https://context-service-downloads.rciad.ciscoccservice.com/doc/latest/SDKGuide/#base-field-sets-and-fields), "Custom Fields and Field Sets"(https://context-service-downloads.rciad.ciscoccservice.com/doc/latest/SDKGuide/#custom-fields-and-field-sets) , "Defining New Fields" (https://context-service-downloads.rciad.ciscoccservice.com/doc/latest/SDKGuide/#defining-new-fields) and "Creating New Field Sets (https://context-service-downloads.rciad.ciscoccservice.com/doc/latest/SDKGuide/#creating-new-field-sets). Guide also have sample code as well.

Thanks,  I should have seen that,  I admit that I have jump that section

thanks for your help

Fred

ok adding the filed worked , I did this :

Field numPolice = new Field("IA_NumeroPolice", ElementClassification.PII, ElementDataType.STRING, false, null);

        try {

            csClient.create(numPolice);

        } catch (Exception e) {

            System.out.println("\n *** Unable to create field: " + e.getMessage() + " ***");

        }

I know it works since it's failling now complaining that I'm trying to insert a field that already exist.

But when I'm trying to use it it says :

2016-06-06 19:23:59 ERROR ContextServiceClientImpl:323 - ApiError with errorType: invalidData, errorData: dataElements, errorMessage: Non-existing field (IA_NumeroPolice) specified in data elements, but not in fieldsets:[cisco.base.customer].

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

    at java.lang.reflect.Constructor.newInstance(Unknown Source)

ok adding the filed worked , I did this :

Field numPolice = new Field("IA_NumeroPolice", ElementClassification.PII, ElementDataType.STRING, false, null);

        try {

            csClient.create(numPolice);

        } catch (Exception e) {

            System.out.println("\n *** Unable to create field: " + e.getMessage() + " ***");

        }

I know it works since it's failling now complaining that I'm trying to insert a field that already exist.

But when I'm trying to use it it says :

2016-06-06 19:23:59 ERROR ContextServiceClientImpl:323 - ApiError with errorType: invalidData, errorData: dataElements, errorMessage: Non-existing field (IA_NumeroPolice) specified in data elements, but not in fieldsets:[cisco.base.customer].

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

    at java.lang.reflect.Constructor.newInstance(Unknown Source)

working!

I figure it out ... need to create the set also

Great.