Sun N1 SPS Java API TimeInterval Class not available, plans can't be run.

We have started developing a Java Application which uses the Java Sun N1 SPS API. We successfully implemented login, resolving of host and planids and now want to run a plan. The required arguments for the CLI to run a plan include timeout values. Those can't be defined with the SDK provided. In the SDK you can use the Interface TimeInterval and implement a class, however this class causes an conversion error inside non-touchable code.

Error:

com.raplix.rolloutexpress.ui.ConverterNotFoundException: No converter existsfor conversion:"com.foo.bar.TimeInterval"->"com.raplix.rolloutexpress.ui.converters.TimeInterval". (024013)

at com.raplix.rolloutexpress.ui.converters.PackageInfo.throwConverterNotFound(PackageInfo.java:122)

at com.raplix.rolloutexpress.ui.converters.SerialHandler.convert(SerialHandler.java:57)

at com.raplix.rolloutexpress.ui.UISubsystem.setArguments(UISubsystem.java:283)

at com.raplix.rolloutexpress.ui.UISubsystem.execute(UISubsystem.java:351)

at com.raplix.rolloutexpress.ui.api.CommandManagerImpl.innerExecute(CommandManagerImpl.java:259)

at com.raplix.rolloutexpress.ui.api.CommandManagerImpl.execute(CommandManagerImpl.java:170)

at com.foo.bar.JBossControlClient.runPlan(JBossControlClient.java:63)

at com.foo.bar.main(Main.java:17)

Here the code for invocation:

HostID[][] HostIDs ={{ this.HostID}};

Map arguments =new HashMap();

arguments.put("PID", this.PlanID);

arguments.put("tar", HostIDs);

arguments.put("pto" ,new TimeInterval(600));

arguments.put("nto" ,new TimeInterval(600));

arguments.put("f" , PlanParamFile);

TaskID = (TaskID) cm.execute("pe.p.run", arguments);

Here is our implementation of a class which uses the TimeInterval interface:

publicclass TimeIntervalimplements com.sun.n1.sps.model.util.TimeInterval{

privatedouble value;

public TimeInterval(double value){

this.value = value;

}

publicboolean isIndefinite(){

returnfalse;

}

publicdouble getValue(){

return value;

}

publicint getType(){

return 0;

}

}

[3457 byte] By [Andrea] at [2007-11-26 7:26:36]
# 1
my mistake.Found the classes where in the com.raplix. package.Thanks,Andrea
Andrea at 2007-7-6 19:15:44 > top of Java-index,Java Enterprise System,Java Enterprise System - General Discussion...