我试图将新的作业流添加到TWSz AD但我收到错误: AWSJCS011E发生了内部错误。错误如下:" java.lang.NullPointerException"。
我的代码如下所示:
JobStream jobStream = new JobStream();
jobStream.setName("DM#JAVA#COND");
jobStream.setDescription("Auto Test");
jobStream.setGroup(false);
jobStream.setOwnerName("USER");
jobStream.setPriority(1);
DateTimeFormatter formatter = DateTimeFormat.forPattern("dd-MM-yyyy");
DateTime dateTime = DateTime.parse("17-04-2018",formatter);
jobStream.setValidFrom(dateTime.toDate());
Job job001 = new Job();
job001.setName("1");
job001.setPriority(1);
ZOSJobDefinition job001ZOSDef = new ZOSJobDefinition();
job001ZOSDef.setFlowTargetKey(new FlowTargetKey("BEGN"));
job001ZOSDef.setTaskType(TaskTypes.ZOS_GENERAL_TASK);
job001ZOSDef.setJclName("START");
job001ZOSDef.setAutoSubmit(true);
job001ZOSDef.setAutoRelease(true);
job001ZOSDef.setNormalElapsedTime(1000L);
job001ZOSDef.setHighestOkReturnCode(0);
job001.setJobDefinition(job001ZOSDef);
jobStream.getJobs().add(job001);
model.addTWSObject(jobStream, null);
代码与手动代码类似。
答案 0 :(得分:0)
问题出在TWS SDK上,当我用9.3替换9.2时,一切都开始工作了。