cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
540
Views
0
Helpful
1
Replies

Unable to create a POD

vharishankar
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

vharishankar
Level 1
Level 1

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.


View solution in original post

1 Reply 1

vharishankar
Level 1
Level 1

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.