I tried to modify the key property CIM_SharedSecret.RemoteID from "UserID" to "louise", but failed. Analyzing the cimxmlTracing log, I found the <KEYBINDING NAME="RemoteID"> item was changed to "louise", that was why the provider couldn't find the target instance to be modified.
I attached the cimxmlTracing log.
Here's the code snippet of modifyInstance:
WBEMClient cimclient;
CIMObjectPath secretCOP;
...
CIMProperty usernameProp = new CIMProperty("RemoteID",
CIMDataType.STRING_T,
"louise", true, false, null);
CIMInstance secretInstance = new CIMInstance(secretCOP,
new CIMProperty[] {
usernameProp
});
cimclient.modifyInstance(secretInstance,
new String[] {
"RemoteID"
});
hi Ping:
Can you please tell what is the cim-client version and which cim-om you are using.
Regards
-Ravi Gummadavelli
Also can you please include the response for "ModifyInstance" request , in the cimxmlTracing
Thanks
-Ravi Gummadavelli
Cim Client: 2.1.0
CIMOM: OpenPegasus
An Exception was thrown, instead of a normal cimxml response:
Caused by: WBEMException: CIM_ERR_FAILED (CIM_ERR_FAILED: Dispatcher returned null pointer for updateInstance in modifyInstance)
at org.sblim.cimclient.internal.http.HttpHeader.examineTrailer(HttpHeader.java:429)
at org.sblim.cimclient.internal.http.io.ChunkedInputStream.read(ChunkedInputStream.java:111)
at org.sblim.cimclient.internal.http.io.BoundedInputStream.read(BoundedInputStream.java:93)
at java.io.FilterInputStream.read(FilterInputStream.java:134)
at org.sblim.cimclient.internal.http.io.KeepAliveInputStream.read(KeepAliveInputStream.java:70)
at org.sblim.cimclient.internal.http.io.KeepAliveInputStream.read(KeepAliveInputStream.java:65)
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:352)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:250)
at java.io.InputStreamReader.read(InputStreamReader.java:212)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.scanName(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanAttribute(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.sblim.cimclient.internal.wbem.CloseableIteratorSAX.<init>(CloseableIteratorSAX.java:71)
at org.sblim.cimclient.internal.wbem.WBEMClientCIMXML.getIterator(WBEMClientCIMXML.java:1577)
at org.sblim.cimclient.internal.wbem.WBEMClientCIMXML.modifyInstance(WBEMClientCIMXML.java:1091)
hi Ping,
"Dispatcher returned null pointer for updateInstance in modifyInstance" is returned by the cim-om, and cim-client is throwing WBEMException: CIM_ERR_FAILED for this error.
Does it happen on any "modifyInstance()" call with any cim-om/version, or just this instance you are trying to modify and with the cim-om/version you are using? can you please let me know how I can recreate this scenario.
thanks and regards
-Ravi Gummadavelli
CIMOM: any
CIM Client: any higher than 2.1.0
CIM Instance: any that is modifiable
To recreate, try to modify a key property.
Here's the code I use. Pls check whether the usage is correct.
WBEMClient cimclient;
CIMObjectPath secretCOP;
...
CIMProperty usernameProp = new CIMProperty("RemoteID",
CIMDataType.STRING_T,
"louise", true, false,
null);
CIMInstance secretInstance = new CIMInstance(secretCOP,
new CIMProperty[] {
usernameProp
});
cimclient.modifyInstance(secretInstance,
new String[]
{
"RemoteID"
});
Hi Ping:
per CIM Infrastructure specification DSP0004, modifying Key properties is not allowed.( Usage Rule: Keys are written once at object instantiation and MUST NOT be modified thereafter.)
( suggested method If a key has to change is, to create a new and delete the old.)
I do not know as to why the provider in this case is returning "Dispatcher returned null pointer for updateInstance in modifyInstance"
Thanks and Regards
-Ravi Gummadavelli
Cancel this defect as modifying Key properties is not allowed.
Thanks for working this, Ravi
Just to clarify a bit, the following is an excerpt from v1.3.1 of DSP0200 pertaining to modifyInstance (section 5.3.2.8):
"If a property to be modified as previously defined cannot be modified because it is a key property, non-writable, or cannot be modified at this time for any other reason, the server shall reject the request."