From: SourceForge.net <no...@so...> - 2010-04-30 17:41:50
|
Bugs item #2994776, was opened at 2010-04-30 09:52 Message generated for change (Comment added) made by blaschke-oss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=712784&aid=2994776&group_id=128809 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Java Client (JSR48) Group: Usability Status: Open Resolution: None Priority: 5 Private: No Submitted By: chrisreich (chrisreich) >Assigned to: Dave Blaschke (blaschke-oss) Summary: http 401 gives CIM_ERR_FAILED instead of CIM_ERR_ACCESS_DENI Initial Comment: When connecing to HDS CIMOM with wrong username/pw CIMClient (2.1.4) returns general CIM_ERR_FAILED instead of WBEMException: CIM_ERR_ACCESS_DENIED (HTTP 401 - Unauthorized) Stacktrace: 2010-04-30 15:51:42.345+01:00 HWN099993E Exception received while trying to connect to http://127.0.0.1:15988 due to CIM_ERR_FAILED @(-9223372036854775000;[-9223372036854774910,0,1];-9223372036854774882;DiskManagerThread-4 - testOneCIMOMConnection([CIMOM=http://127.0.0.1:15988, interop, system, ******])) WBEMException: CIM_ERR_FAILED at org.sblim.cimclient.internal.wbem.WBEMClientCIMXML.enumerateInstanceNames(WBEMClientCIMXML.java:997) at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source) ... Caused by: java.lang.NullPointerException at org.sblim.cimclient.internal.http.HttpClient.getResponseCode(HttpClient.java) at org.sblim.cimclient.internal.http.HttpUrlConnection.getResponseCode(HttpUrlConnection.java:233) at org.sblim.cimclient.internal.wbem.WBEMClientCIMXML.transmitRequest(WBEMClientCIMXML.java:1718) at org.sblim.cimclient.internal.wbem.WBEMClientCIMXML.enumerateInstanceNames(WBEMClientCIMXML.java:981) The HTTP Trace is: POST /cimom HTTP/1.1 Connection: Keep-alive Content-type: application/xml; charset="utf-8" Content-Language: de-DE CIMMethod: EnumerateInstanceNames CIMOperation: MethodCall Content-length: 370 CIMProtocolVersion: 1.0 TE: trailers CIMObject: interop Accept-Language: de-DE, en-US, * Host: 127.0.0.1 Cache-Control: no-cache Accept: text/html, text/xml, application/xml <?xml version="1.0" encoding="UTF-8"?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"><MESSAGE ID="900894" PROTOCOLVERSION="1.0"><SIMPLEREQ><IMETHODCALL NAME="EnumerateInstanceNames"><LOCALNAMESPACEPATH><NAMESPACE NAME="interop"/></LOCALNAMESPACEPATH><IPARAMVALUE NAME="ClassName"><CLASSNAME NAME="CIM_RegisteredProfile"/></IPARAMVALUE></IMETHODCALL></SIMPLEREQ></MESSAGE></CIM> HTTP/1.1 401 Unauthorized Transfer-Encoding: chunked CIMRoleAuthenticate: com.hitachi.hds.wbem.security.AuthenticationProvider WWW-Authenticate: Basic realm="wbem@" 0 POST /cimom HTTP/1.1 Connection: Keep-alive Content-type: application/xml; charset="utf-8" Content-Language: de-DE CIMMethod: EnumerateInstanceNames CIMOperation: MethodCall Authorization: Basic c3lzdGVtOmZhbHNlcHc= Content-length: 370 CIMProtocolVersion: 1.0 TE: trailers CIMObject: interop Accept-Language: de-DE, en-US, * Host: 127.0.0.1 Cache-Control: no-cache Accept: text/html, text/xml, application/xml <?xml version="1.0" encoding="UTF-8"?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"><MESSAGE ID="900894" PROTOCOLVERSION="1.0"><SIMPLEREQ><IMETHODCALL NAME="EnumerateInstanceNames"><LOCALNAMESPACEPATH><NAMESPACE NAME="interop"/></LOCALNAMESPACEPATH><IPARAMVALUE NAME="ClassName"><CLASSNAME NAME="CIM_RegisteredProfile"/></IPARAMVALUE></IMETHODCALL></SIMPLEREQ></MESSAGE></CIM> HTTP/1.1 401 Unauthorized Transfer-Encoding: chunked 0 It looks like the CIMOM does not add authenticate HTTP header again in 401 response when request includes user/password. Don't know if this follows correct http protocol, but CIM Client should return the main error (401) and not some details that might be wrong. ---------------------------------------------------------------------- >Comment By: Dave Blaschke (blaschke-oss) Date: 2010-04-30 12:41 Message: WBEMClientCIMXML.transmitRequest() has not yet gotten to the point where it will throw the CIM_ERR_ACCESS_DENIED because a null pointer occurs within HttpClient.getResponseCode() ... unfortunately, it is a large (~250 LOC) routine and there is no line number in the stack trace. Is this an oversight? Any way you can debug thru that routine to see where null pointer is accessed? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=712784&aid=2994776&group_id=128809 |