Hi All,
I tried to update an existing Variable table, but I end with java nullpointexception at SaveObject function, Am I missing something?
code:
private void jobvar() throws IOException{private void jobvar() throws IOException{ UC4ObjectName name =new UC4ObjectName("VARA.TST.BCK"); OpenObject open = new OpenObject(name); uc4.sendRequestAndWait(open); UC4Object getobj =open.getUC4Object(); Variable var1= (Variable) getobj; var1.add("server2","month","11:00","Backup","",""); SaveObject save = new SaveObject(var1); uc4.sendRequestAndWait(save); uc4.sendRequestAndWait(new CloseObject(var1)); }
error:
Exception in thread "main" java.lang.NullPointerExceptionException in thread "main" java.lang.NullPointerException at com.dhl.ca.GoAutomic.jobvar(GoAutomic.java:71) at com.dhl.ca.GoAutomic.demo(GoAutomic.java:31) at com.dhl.ca.GoAutomic.main(GoAutomic.java:26)