NutzCN Logo
问答 偶用了定时器报错
发布于 3173天前 作者 CXW0504 2632 次浏览 复制 上一个帖子 下一个帖子
标签:
org.nutz.mvc.LoadingException: org.nutz.ioc.IocException: Object '@confName' without define! For object [@confName] - type:[] FAIL to create Ioc Bean name=[nutQuartzCronJobFactory]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:17)
	at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
	at org.nutz.lang.Mirror.born(Mirror.java:988)
	at org.nutz.lang.Lang.wrapThrow(Lang.java:165)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:134)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:87)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
	at com.hgd.action.filter.NUTZHGDfilter.init(NUTZHGDfilter.java:29)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4659)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5281)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.nutz.ioc.IocException: Object '@confName' without define! For object [@confName] - type:[] FAIL to create Ioc Bean name=[nutQuartzCronJobFactory]
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:147)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:204)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:229)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:148)
	at com.hgd.MainSetup.init(MainSetup.java:61)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:276)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:120)
	... 16 more
Caused by: org.nutz.ioc.IocException: Object '@confName' without define! For object [@confName] - type:[]
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:211)
	at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:31)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:135)
	... 22 more
Caused by: org.nutz.ioc.ObjectLoadException: Object '@confName' without define!
	at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:154)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:176)
	... 26 more
12 回复

@confName是什么鬼

@wendal

var ioc = {
   "scheduler" :{
      "type" :"org.quartz.Scheduler",
      "factory" :"org.quartz.impl.StdSchedulerFactory#getDefaultScheduler",
      "events" :{
         "create" :"start",
         "depose" :"shutdown"
      },
      "fields" :{
         "jobFactory" :{
            "refer" :"jobFactory"
         }
      }
   },
   "jobFactory" :{
      "type" :"com.hgd.task.quartz.NutQuartzJobFactory",
      "args" :[{
         "refer" :"$ioc"
      }]
   },
   "nutQuartzCronJobFactory" :{
      "type" :"com.hgd.task.quartz.NutQuartzCronJobFactory",
      "events" :{
         "create" :"init"
      },
      "fields" :{
         "scheduler" :{
            "refer" :"scheduler"
         },
         "conff" :{
            "refer" :"conf"
         }
      }
   }
};

@cxw0504 "conff" :{
"refer" :"@confName"
} github上的代码

  1. 没有看到@confName
  2. 上面的配置文件里面有个conff
  3. 最新的quartz插件不需要写quartz.js

@wendal 我以前使用nutz book的那个可是绑定了nutz5.2

来自汪星球

换最新插件,删掉quartz.js

@wendal 在哪里

来自汪星球

@wendal 官网插件,看过不后悔那太旧了。。。

来自汪星球

@wendal [这里](直接项目README
请直接看看项目的README,不会让你失望的!!

https://github.com/nutzam/nutzmore/tree/master/nutz-integration-quartz)

来自汪星球

添加回复
请先登陆
回到顶部