restlet 遇到运行不了resources API错误

连接时候遇到

String url="http://192.168.1.136:8911/tcat/screenstart?delay="+i+"";


 @POST 
    @Path("screenstart")
    public String start(@FormParam("delay") String i) {
       log.info("resource的delay"+i);
        int delay = Integer.parseInt(i);
        System.out.println(delay+"delay没改变前的值");
        ScreenUtil.DELAY = delay;
        ScreenUtil.CLOSE_FLAG=true;
        System.out.println("CLOSE_FLAG等于ture时候delay="+delay);
        new RestThread().start();
        return "ok";
    }



警告: ResourceMethod[public java.lang.String com.teraee.tcat.rest.resource.TcatResource.start(java.lang.String), POST]: ResourceMethod[public java.lang.String com.teraee.tcat.rest.resource.TcatResource.start(java.lang.String), POST]: Can not invoke the resource method

java.lang.NullPointerException
at org.restlet.ext.jaxrs.internal.wrappers.params.ParameterList$FormOrQueryParamGetter.getParamValue(ParameterList.java:522)

你可能感兴趣的:(restlet 遇到运行不了resources API错误)