NutzCN Logo
问答 构建nutz项目,不知道为什么找不到类,明明存在,卡住了
发布于 2425天前 作者 qq_e79520c3 1924 次浏览 复制 上一个帖子 下一个帖子
标签:
五月 03, 2018 11:25:51 上午 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.<init>(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: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:4700)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5340)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	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:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: net.wendal.nutzbook.MainModule
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at org.nutz.lang.Lang.loadClass(Lang.java:2022)
	at org.nutz.mvc.config.AbstractNutConfig.getMainModule(AbstractNutConfig.java:127)
	... 16 more



package net.wendal.nutzbook;

import org.nutz.mvc.annotation.Modules;

@Modules(scanPackage=true)
public class MainModule {

}



  <display-name>nutzbook</display-name>
    <filter>
      <filter-name>nutz</filter-name>
      <filter-class>org.nutz.mvc.NutFilter</filter-class>
      <init-param>
          <param-name>modules</param-name>
          <param-value>net.wendal.nutzbook.MainModule</param-value>
      </init-param>
  </filter>
  <filter-mapping>
      <filter-name>nutz</filter-name>
      <url-pattern>/*</url-pattern>
  </filter-mapping>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
</web-app>
2 回复

要么编译问题,要么写错单词,检查一下吧

好的,弄好了,编译问题

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