Play Framework Greenscript,NullPointerException

时间:2011-11-02 23:13:51

标签: java playframework greenscript

playframework 1.2.3,greenscript 1.2.6k

访问页面时,我在GreenScriptPlugin.java的第174行得到NullPointerException

第174行是以下示例中的最后一行(JobsPlugin.executor ...):

    @Override
    public void afterApplicationStart() {
        Properties p = Play.configuration;
        for (ResourceType type: ResourceType.values()) {
            final Minimizer m = type == ResourceType.JS ? jsM_ : cssM_;
            String s = fetchProp_(p, String.format("greenscript%s.cache.check", type.getExtension()));
            int i = "never".equalsIgnoreCase(s) ? -1 : Time.parseDuration(s); 
            if (-1 != i) {
                Job<Object> j = new Job<Object>() {
                    @Override
                    public void doJob() {
                        m.checkCache();
                    }
                };
                JobsPlugin.executor.scheduleWithFixedDelay(j, i, i, TimeUnit.SECONDS);
            }
        }
    }

1 个答案:

答案 0 :(得分:1)

发现谷歌应用引擎有自己的错误导致了这一点。在此之后修复了greenscript按预期工作