Menu

getInstance method of Provider is not called

Help
aathif
2011-06-27
2013-04-16
  • aathif

    aathif - 2011-06-27

    HI, I seem to have  a weird problem. I have registered a server for a sample CIM Class, which is also displayed on the CIMWorkshop tool. When I click on the 'Show Instances' menu the Instance Editor opens up & the instances are displayed except for thier properties and their values.
    What I noticed from the console log is that the enumerateInstanceNames method of my provider was called. But the getInstance method is not getting called.
    The log for enumerateInstanceNames ..

    Unsecure pswd provider: allowing authentication for root
    Http: client authenticated: root
    Content-Type : text/xml;charset=UTF-8
    Connection : Keep-Alive
    Host : 10.100.2.104:5988
    CIMProtocolVersion : 1.0
    Content-Length : 417
    Accept : text/xml, application/xml
    CIMOperation : MethodCall
    User-Agent : WBEM Services WBEM API 1.0.0
    Authorization : Basic cm9vdDpyb290X3Bhc3N3ZA==
    CIMMethod : EnumerateInstanceNames
    Date : Mon, 27 Jun 2011 12:53:30 GMT
    CIMObject : root%2Fcimv2
    Unsecure pswd provider: allowing authentication for root
    Http: client authenticated: root
    Provider: SRTProvider
    Need to get provider named SRTProvider
    getting protocol
    Protocol: java
    Need to get provider protocol adapter java
    Getting provider adapter interface
    Got adapter interface org.wbemservices.wbem.cimom.adapters.provider.java.JavaPro
    viderAdapter$WrappedProviderAdapter@174318a
    isAuthorizable returned false
    Provider: SRTProvider
    Need to get provider named SRTProvider
    getting protocol
    Protocol: java
    Need to get provider protocol adapter java
    Getting provider adapter interface
    Got adapter interface org.wbemservices.wbem.cimom.adapters.provider.java.JavaPro
    viderAdapter$WrappedProviderAdapter@174318a
    

    And for the getInstance -

    Content-Type : text/xml;charset=UTF-8
    Connection : Keep-Alive
    Host : 10.100.2.104:5988
    CIMProtocolVersion : 1.0
    Content-Length : 613
    Accept : text/xml, application/xml
    CIMOperation : MethodCall
    User-Agent : WBEM Services WBEM API 1.0.0
    Authorization : Basic cm9vdDpyb290X3Bhc3N3ZA==
    CIMMethod : GetInstance
    Date : Mon, 27 Jun 2011 12:53:30 GMT
    CIMObject : root%2Fcimv2
    Unsecure pswd provider: allowing authentication for root
    Http: client authenticated: root
    Got exception
    java.lang.NullPointerException
            at org.wbemservices.wbem.cimom.CIMOMImpl.intgetClass(CIMOMImpl.java:2331
    )
    

    Iam unsure why my Providers getInstance is not being called here/

     
  • aathif

    aathif - 2011-06-28

    Hi,
    It was a mistake in my provider code. The enumerateInstanceNames method was not setting the keys in the CimObjectPath to be returned. I used the CIMobjectPath.setKeys method to set the keys and it is working fine now :)

     

Log in to post a comment.