Menu

#1796 WBEMClient.modifyInstance cannot modify key properties

Function
closed
5
2010-01-05
2009-12-24
Ping Li
No

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"
});

Discussion

  • Ping Li

    Ping Li - 2009-12-24
     
  • RAVI GUMMADAVELLI

    hi Ping:

    Can you please tell what is the cim-client version and which cim-om you are using.

    Regards
    -Ravi Gummadavelli

     
  • RAVI GUMMADAVELLI

    Also can you please include the response for "ModifyInstance" request , in the cimxmlTracing

    Thanks
    -Ravi Gummadavelli

     
  • Ping Li

    Ping Li - 2009-12-31

    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)

     
  • RAVI GUMMADAVELLI

    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

     
  • Ping Li

    Ping Li - 2010-01-04

    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"
    });

     
  • RAVI GUMMADAVELLI

    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

     
  • Ping Li

    Ping Li - 2010-01-05
    • status: open --> closed
     
  • Ping Li

    Ping Li - 2010-01-05

    Cancel this defect as modifying Key properties is not allowed.

     
  • Dave Blaschke

    Dave Blaschke - 2010-01-05

    Thanks for working this, Ravi

     
  • Dave Blaschke

    Dave Blaschke - 2010-01-05
    • assigned_to: nobody --> rgummada
     
  • Dave Blaschke

    Dave Blaschke - 2010-01-05

    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."

     

Log in to post a comment.