5
回答
部署nuby到tomcat报错
注册华为云得mate10,2.9折抢先购!>>>   

@Wendal 你好,想跟你请教个问题:

部署工程到tomcat报错,步骤如下:

1.eclipse导入工程,修改pom文件中db.url等为个人本地数据库

2.本地mysql创建nuby数据库

3.maven install生成war包

4.部署到tomcat,拷贝 mpsdk4j-1.a.24-SNAPSHOTS.jar到lib目录

tomcat启动报错:

严重: Exception starting filter NubyMVCFilter
org.nutz.mvc.LoadingException: org.nutz.ioc.IocException: For object [nutDao] - type:[class org.nutz.dao.impl.NutDao]
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:931)
at org.nutz.lang.Lang.wrapThrow(Lang.java:164)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:120)
at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
at org.nutz.mvc.NutFilter.init(NutFilter.java:78)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5452)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1653)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
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:744)
Caused by: org.nutz.ioc.IocException: For object [nutDao] - type:[class org.nutz.dao.impl.NutDao]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:201)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:212)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:139)
at org.elkan1788.extra.nuby.init.SetupMethod.init(SetupMethod.java:32)
at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:256)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:115)
... 18 more
Caused by: org.nutz.ioc.ObjectLoadException: Object 'nutDao' without define!
at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:140)
at org.nutz.ioc.loader.cached.CachedIocLoaderImpl.load(CachedIocLoaderImpl.java:47)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:169)
... 23 more


举报
尹茂
发帖于3年前 5回/444阅
共有5个答案 最后回答: 3年前
Caused by: java.lang.NoClassDefFoundError: org/elkan1788/osc/weixin/mp/core/WxDefaultHandler
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_45]
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[na:1.7.0_45]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.7.0_45]
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2944) ~[catalina.jar:7.0.52]
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1208) ~[catalina.jar:7.0.52]
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) ~[catalina.jar:7.0.52]
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569) ~[catalina.jar:7.0.52]
at org.nutz.lang.Lang.loadClass(Lang.java:1796) ~[nutz-1.b.52.jar:na]
at org.nutz.resource.Scans.rs2class(Scans.java:370) ~[nutz-1.b.52.jar:na]
at org.nutz.resource.Scans.scanPackage(Scans.java:262) ~[nutz-1.b.52.jar:na]
at org.nutz.resource.Scans.scanPackage(Scans.java:247) ~[nutz-1.b.52.jar:na]
at org.nutz.ioc.loader.annotation.AnnotationIocLoader.<init>(AnnotationIocLoader.java:54) ~[nutz-1.b.52.jar:na]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_45]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) ~[na:1.7.0_45]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.7.0_45]
at java.lang.reflect.Constructor.newInstance(Constructor.java:526) ~[na:1.7.0_45]
at org.nutz.lang.born.DynamicConstructorBorning.born(DynamicConstructorBorning.java:19) ~[nutz-1.b.52.jar:na]

... 25 common frames omitted


有这个错为什么? @Wendal

--- 共有 2 条评论 ---
wendal@凡梦星尘 把jar发布到maven中央库嘛,这样就省事多了 3年前 回复
wendal源码的lib目录下有个jar, 把它拷贝到tomcat的lib目录下 3年前 回复

再问个问题:@Wendal

严重: Exception starting filter NubyMVCFilter
org.nutz.mvc.LoadingException: org.nutz.ioc.IocException: create ioc bean fail name=setService ioc define:
{
   "type" :"org.elkan1788.extra.nuby.service.SettingsService",
   "singleton" :true,
   "events" :{
   },
   "args" :[],
   "fields" :[{
      "name" :"wxapi",
      "value" :{
         "type" :"refer",
         "value" :"wxapi"
      },
      "optional" :false
   }, {
      "name" :"mp",
      "value" :{
         "type" :"refer",
         "value" :"mp"
      },
      "optional" :false
   }, {
      "name" :"qn",
      "value" :{
         "type" :"refer",
         "value" :"qn"
      },
      "optional" :false
   }, {
      "name" :"dao",
      "value" :{
         "type" :"refer",
         "value" :"dao"
      },
      "optional" :false
   }],
   "scope" :"app"
}
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:931)
at org.nutz.lang.Lang.wrapThrow(Lang.java:164)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:120)
at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
at org.nutz.mvc.NutFilter.init(NutFilter.java:78)
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:4809)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1229)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
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:744)
Caused by: org.nutz.ioc.IocException: create ioc bean fail name=setService ioc define:

顶部