NutzCN Logo
问答 我完全按照指导去做的还是ClassNotFoundException的错误
发布于 2697天前 作者 qq_1f9f8282 1850 次浏览 复制 上一个帖子 下一个帖子
标签:

六月 28, 2017 3:16:09 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter [nutz]
org.nutz.mvc.NutConfigException: java.lang.ClassNotFoundException: net.wendal.nutzbook.MainModule
at org.nutz.mvc.config.AbstractNutConfig.getMainModule(AbstractNutConfig.java:134)
at org.nutz.mvc.config.AbstractNutConfig.createLoading(AbstractNutConfig.java:51)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:18)
at org.nutz.mvc.NutFilter._init(NutFilter.java:87)
at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4590)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5233)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: net.wendal.nutzbook.MainModule
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.nutz.lang.Lang.loadClass(Lang.java:2022)
at org.nutz.mvc.config.AbstractNutConfig.getMainModule(AbstractNutConfig.java:127)
... 16 more

六月 28, 2017 3:16:09 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
六月 28, 2017 3:16:09 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/nutzbook] startup failed due to previous errors
六月 28, 2017 3:16:09 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
六月 28, 2017 3:16:09 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
六月 28, 2017 3:16:09 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 4364 ms

4 回复

你建的类名也是 net.wendal.nutzbook.MainModule 吗?

是的

package net.wendal.nutzbook;

import org.nutz.mvc.annotation.Modules;

@Modules(scanPackage=true)
public class MainModule {

}

是不是没编译成功?? 看看target目录或者classes目录下有没有这个类的class文件

好像是的,谢谢

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