Unsolved
This post is more than 5 years old
138 Posts
0
1254
EMC Smarts Java API - working with GA_StingDictionary class
Hello All.
I have problem to work with GA_StingDictionary class methods via invokeOperation from Java method.
Operations for class GA_StringDictionary:
clone_name
insert stringKey stringValue
remove stringKey
contains stringKey
find stringKey
dump
clear
get
put data
If i try to get Instances or execute "get" method from SmRemoteDomainManager class is work perfect but when i try to execute invokeOperation method on class GA_StingDictionary i get null exception.
And i cannot get Exception ) Just null return )
Anybody had this problem?
Code Example when i just try to run "dump" method.
public static void add2GA_String(SmRemoteDomainManager remoteDM,
String IpAddr, String ga_string_class, String ga_string_name, List mgr_list)
throws IOException, SmRemoteException, Exception {
String ErrMsg;
MR_AnyVal[] paramList = new MR_AnyVal[1];
paramList[0] = new MR_AnyValString(IpAddr);
paramList[1] = new MR_AnyValString("bla");
try {
log.debug("Run add2GA_String function, IpAddr: " + IpAddr + " class = " + ga_string_class + " name = " + ga_string_name + " mgr_list: " + mgr_list.toString());
//remoteDM.invokeOperation(ga_string_class, ga_string_name, "dump", null);
MR_AnyVal key = remoteDM.get(ga_string_class, ga_string_name, "keys"); // works perfect
remoteDM.invokeOperation(ga_string_class, ga_string_name, "insert", paramList); // fails with 0. wtf with this EMC Java API?
} catch (IOException ioe) {
ErrMsg = "IOException: Failed or interrupted I/O operation. " + ioe.getMessage();
log.error(ErrMsg, ioe);
throw ioe;
} catch (SmRemoteException sre) {
ErrMsg = "SmRemoteException: Exception in a remote InCharge Manager. " + sre.getMessage();
log.error(ErrMsg, sre);
throw sre;
} catch (Exception e) {
log.error(e.getMessage());
throw e;
}
}
Just get next error with 0:)
2013-09-18 16:20:13 ERROR XSmartsHandler:182 - 0
2013-09-18 16:20:13 WARN XSmartsServiceImpl:74 - 0
Hemulll
138 Posts
0
September 18th, 2013 20:00
Problem is solved:
Change parameters declaration to next format
MR_AnyVal[] prm = {new MR_AnyValString(IpAddr), new MR_AnyValString("bla")};
instead
MR_AnyVal[] paramList = new MR_AnyVal[1];
paramList[0] = new MR_AnyValString(IpAddr);
paramList[1] = new MR_AnyValString("bla");
The question why i didn't get normal exception test like in SMRemoteException :-)