11-26-2015 12:59 AM
Hi,
i am trying to create a simple POD but did not succeed in doing the same.
Version of the context service sdk used is 1.0.4-10002.
Code snippet used
Pod mypod = new Pod();
mypod.setFieldsets(new ArrayList<String>(Arrays.asList("cisco.base.pod")));
ClientResponse newPod = contextServiceClient.encryptAndCreate(mypod);
System.out.print("****************ID of new pod: " + SDKUtils.getIdFromResponse(newPod));
Error received
Exception in thread "main" java.lang.NoSuchMethodError: com.cisco.thunderhead.pod.Pod.getMediaType()Ljava/lang/String;
at com.cisco.thunderhead.rest.PodBean.<init>(PodBean.java:64)
at com.cisco.thunderhead.rest.ContextRestBeanUtils.convertSDKBeanToRestBean(ContextRestBeanUtils.java:21)
at com.cisco.thunderhead.client.ContextServiceEncryptionClient.inspectAndEncrypt(ContextServiceEncryptionClient.java:419)
at com.cisco.thunderhead.client.ContextServiceEncryptionClient.encryptBean(ContextServiceEncryptionClient.java:122)
at com.cisco.thunderhead.client.BaseEncryptionService.encryptAndCreate(BaseEncryptionService.java:111)
at com.cisco.thunderhead.client.ContextServiceClientImpl.create(ContextServiceClientImpl.java:339)
at com.cisco.thunderhead.client.ContextServiceClientImpl.encryptAndCreate(ContextServiceClientImpl.java:305)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
Any help to solve this issue is appreciated.
Thanks
Hari
Solved! Go to Solution.
11-29-2015 11:48 PM
Hi,
The problem is solved.
i used the "create" method instead of encryptAndCreate method (deprecated in 1.0.4.) and it works now.
Thanks
Hari.
11-29-2015 11:48 PM
Hi,
The problem is solved.
i used the "create" method instead of encryptAndCreate method (deprecated in 1.0.4.) and it works now.
Thanks
Hari.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide