NutzCN Logo
问答 按入门操作,报org.nutz.json.JsonException: Unexpect EOF
发布于 2503天前 作者 ang 2615 次浏览 复制 上一个帖子 下一个帖子
标签:

MainModule类

package net.wendal.nutzbook;

import org.nutz.mvc.annotation.IocBy;
import org.nutz.mvc.annotation.Modules;
import org.nutz.mvc.annotation.SetupBy;
import org.nutz.mvc.ioc.provider.ComboIocProvider;

@Modules(scanPackage=true)
@IocBy(type=ComboIocProvider.class, args={"*js", "ioc/",
        // 这个package下所有带@IocBean注解的类,都会登记上
                            "*anno", "net.wendal.nutzbook",
                            "*tx", // 事务拦截 aop
                            "*async"}) // 异步执行aop
@SetupBy(value=MainSetup.class)
public class MainModule {

	
}

UserModule类

package net.wendal.nutzbook.module;

import org.nutz.dao.Dao;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Fail;
import org.nutz.mvc.annotation.Ok;

import net.wendal.nutzbook.bean.User;

@IocBean
@At("/user")
@Ok("json")
@Fail("http://500")
public class UserModule {

	@Inject
	protected Dao dao;
	
	@At
	public int count() {
		return dao.count(User.class);
		
	}
}

我是按步骤,目前到“登录方法”这一步

14 回复

daojs抄错了吧

怎么可能,我复制的

var ioc = {
        dataSource : {
            type : "com.alibaba.druid.pool.DruidDataSource",
            events : {
                create : "init",
                depose : 'close'
            },
            fields : {
                url : "jdbc:mysql://localhost:3306/nutzbook",
                username : "root",
                password : "123456",
                testWhileIdle : true, // 非常重要,预防mysql的8小时timeout问题
                //validationQuery : "select 1" , // Oracle的话需要改成 select 1 from dual
                maxActive : 100
            }
        },
        dao : {
            type : "org.nutz.dao.impl.NutDao",
            args : [{refer:"dataSource"}]
        }
};

报错信息贴一下

严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.json.JsonException: Unexpect EOF
	at org.nutz.mvc.LoadingException$FC$9a86caf9ff5d3b587784fcdf555a4a7d.invoke(LoadingException.java)
	at org.nutz.lang.born.AbstractConstructorBorning.call(AbstractConstructorBorning.java:25)
	at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:19)
	at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
	at org.nutz.lang.Mirror.born(Mirror.java:990)
	at org.nutz.lang.Lang.wrapThrow(Lang.java:200)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:135)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
	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:4950)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1700)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1690)
	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: org.nutz.json.JsonException: Unexpect EOF
	at org.nutz.json.impl.JsonTokenScan.nextChar(JsonCompileImplV2.java:358)
	at org.nutz.json.impl.JsonTokenScan.skipComment(JsonCompileImplV2.java:140)
	at org.nutz.json.impl.JsonTokenScan._nextToken(JsonCompileImplV2.java:85)
	at org.nutz.json.impl.JsonTokenScan.nextToken(JsonCompileImplV2.java:132)
	at org.nutz.json.impl.JsonTokenScan.readMap(JsonCompileImplV2.java:175)
	at org.nutz.json.impl.JsonTokenScan.read(JsonCompileImplV2.java:338)
	at org.nutz.json.impl.JsonCompileImplV2.parse(JsonCompileImplV2.java:26)
	at org.nutz.json.Json.fromJson(Json.java:42)
	at org.nutz.json.Json.parse(Json.java:77)
	at org.nutz.json.Json.fromJson(Json.java:58)
	at org.nutz.json.Json.fromJson(Json.java:163)
	at org.nutz.lang.Lang.map(Lang.java:1269)
	at org.nutz.mvc.view.DefaultViewMaker.make(DefaultViewMaker.java:72)
	at org.nutz.mvc.view.ViewZone.makeView(ViewZone.java:86)
	at org.nutz.mvc.impl.processor.ViewProcessor.evalView(ViewProcessor.java:89)
	at org.nutz.mvc.impl.processor.FailProcessor.init(FailProcessor.java:22)
	at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:44)
	at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:54)
	at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:201)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
	... 15 more

这个错误也太偏门了,网上都搜不到具体的解决方法

启动日志完整贴一下

一月 08, 2018 3:54:23 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:nutzbook' did not find a matching property.
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.82
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Sep 29 2017 12:23:15 UTC
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.82.0
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 10
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            10.0
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             G:\Program Files\Java\jdk
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_151-b12
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         G:\apache-tomcat-7.0.82
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         G:\apache-tomcat-7.0.82
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:59695
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=G:\apache-tomcat-7.0.82
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=G:\apache-tomcat-7.0.82
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=G:\apache-tomcat-7.0.82\webapps
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=G:\apache-tomcat-7.0.82\endorsed
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
一月 08, 2018 3:54:23 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: G:\Program Files\Java\jdk\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;G:/Program Files/Java/jdk/bin/server;G:/Program Files/Java/jdk/bin;G:/Program Files/Java/jdk/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;G:\MySQL\bin;G:\mysql-5.7.17-winx64\bin;C:\Users\Readitec\AppData\Local\Microsoft\WindowsApps;;C:\Users\Readitec\Desktop;;.
一月 08, 2018 3:54:23 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
一月 08, 2018 3:54:23 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
一月 08, 2018 3:54:23 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 473 ms
一月 08, 2018 3:54:23 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
一月 08, 2018 3:54:23 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.82
一月 08, 2018 3:54:25 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
18-01-08 15:54:25.097 INFO [localhost-startStop-1] Select SystemLog as Nutz.Log implement
18-01-08 15:54:25.101 INFO [localhost-startStop-1] NutFilter[nutz] starting ...
18-01-08 15:54:25.125 DEBUG [localhost-startStop-1] Locations count=9 time use 15ms
18-01-08 15:54:25.152 DEBUG [localhost-startStop-1] Locations count=14 time use 27ms
18-01-08 15:54:25.204 DEBUG [localhost-startStop-1] Using 95 castor for Castors
18-01-08 15:54:25.212 DEBUG [localhost-startStop-1] Loading by class org.nutz.mvc.impl.NutLoading
18-01-08 15:54:25.214 INFO [localhost-startStop-1] Nutz Version : 1.r.61.r2 2017-04-18 
18-01-08 15:54:25.214 INFO [localhost-startStop-1] Nutz.Mvc[nutz] is initializing ...
18-01-08 15:54:25.214 DEBUG [localhost-startStop-1] Web Container Information:
18-01-08 15:54:25.215 DEBUG [localhost-startStop-1]  - Default Charset : GBK
18-01-08 15:54:25.215 DEBUG [localhost-startStop-1]  - Current . path  : C:\Users\Readitec\Desktop\.
18-01-08 15:54:25.216 DEBUG [localhost-startStop-1]  - Java Version    : 1.8.0_151
18-01-08 15:54:25.216 DEBUG [localhost-startStop-1]  - File separator  : \
18-01-08 15:54:25.216 DEBUG [localhost-startStop-1]  - Timezone        : Asia/Shanghai
18-01-08 15:54:25.216 DEBUG [localhost-startStop-1]  - OS              : Windows 10 amd64
18-01-08 15:54:25.216 DEBUG [localhost-startStop-1]  - ServerInfo      : Apache Tomcat/7.0.82
18-01-08 15:54:25.216 DEBUG [localhost-startStop-1]  - Servlet API     : 3.0
18-01-08 15:54:25.217 DEBUG [localhost-startStop-1]  - ContextPath     : /nutzbook
18-01-08 15:54:25.217 DEBUG [localhost-startStop-1]  - context.tempdir : G:\apache-tomcat-7.0.82\work\Catalina\localhost\nutzbook
18-01-08 15:54:25.217 DEBUG [localhost-startStop-1]  - MainModule      : net.wendal.nutzbook.MainModule
18-01-08 15:54:25.217 DEBUG [localhost-startStop-1] >> app.root = G:/apache-tomcat-7.0.82/webapps/nutzbook
18-01-08 15:54:25.219 DEBUG [localhost-startStop-1] @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "net.wendal.nutzbook", "*tx", "*async"],init=[])
18-01-08 15:54:25.264 DEBUG [localhost-startStop-1] Found 1 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
18-01-08 15:54:25.264 DEBUG [localhost-startStop-1] loading [dao.js]
18-01-08 15:54:25.269 DEBUG [localhost-startStop-1] Loaded 2 bean define from path=[ioc/] --> [dataSource, dao]
18-01-08 15:54:25.279 DEBUG [localhost-startStop-1] Found 4 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
18-01-08 15:54:25.286 DEBUG [localhost-startStop-1] Found @IocBean : class net.wendal.nutzbook.module.UserModule
18-01-08 15:54:25.292 INFO [localhost-startStop-1] Found 1 classes in 1 base-packages!
beans = ["userModule"]
18-01-08 15:54:25.296 DEBUG [localhost-startStop-1] Loaded 5 bean define from reader --
[txREPEATABLE_READ, txSERIALIZABLE, txNONE, txREAD_UNCOMMITTED, txREAD_COMMITTED]
18-01-08 15:54:25.309 DEBUG [localhost-startStop-1] Load AopConfigure for anno=org.nutz.aop.interceptor.async.Async by type=org.nutz.aop.interceptor.async.AsyncAopIocLoader
18-01-08 15:54:25.311 INFO [localhost-startStop-1] NutIoc init begin ...
18-01-08 15:54:25.313 INFO [localhost-startStop-1] ... NutIoc init complete
18-01-08 15:54:25.315 INFO [localhost-startStop-1] Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
18-01-08 15:54:25.317 DEBUG [localhost-startStop-1] @Views(DefaultViewMaker.class)
18-01-08 15:54:25.320 DEBUG [localhost-startStop-1] @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
18-01-08 15:54:25.325 DEBUG [localhost-startStop-1] module class location 'file:/G:/apache-tomcat-7.0.82/webapps/nutzbook/WEB-INF/classes/'
18-01-08 15:54:25.325 DEBUG [localhost-startStop-1]  > scan 'net.wendal.nutzbook'
18-01-08 15:54:25.328 DEBUG [localhost-startStop-1] Found 4 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
18-01-08 15:54:25.329 DEBUG [localhost-startStop-1]    >> add 'net.wendal.nutzbook.module.UserModule'
18-01-08 15:54:25.344 INFO [localhost-startStop-1] Optional processor class not found, disabled : org.nutz.integration.shiro.NutShiroProcessor
18-01-08 15:54:25.352 INFO [localhost-startStop-1] Optional processor class not found, disabled : org.nutz.plugins.validation.ValidationProcessor
18-01-08 15:54:25.366 DEBUG [localhost-startStop-1] Eval FAIL!! : public int net.wendal.nutzbook.module.UserModule.count()
org.nutz.json.JsonException: Unexpect EOF
	at org.nutz.json.impl.JsonTokenScan.nextChar(JsonCompileImplV2.java:358)
	at org.nutz.json.impl.JsonTokenScan.skipComment(JsonCompileImplV2.java:140)
	at org.nutz.json.impl.JsonTokenScan._nextToken(JsonCompileImplV2.java:85)
	at org.nutz.json.impl.JsonTokenScan.nextToken(JsonCompileImplV2.java:132)
	at org.nutz.json.impl.JsonTokenScan.readMap(JsonCompileImplV2.java:175)
	at org.nutz.json.impl.JsonTokenScan.read(JsonCompileImplV2.java:338)
	at org.nutz.json.impl.JsonCompileImplV2.parse(JsonCompileImplV2.java:26)
	at org.nutz.json.Json.fromJson(Json.java:42)
	at org.nutz.json.Json.parse(Json.java:77)
	at org.nutz.json.Json.fromJson(Json.java:58)
	at org.nutz.json.Json.fromJson(Json.java:163)
	at org.nutz.lang.Lang.map(Lang.java:1269)
	at org.nutz.mvc.view.DefaultViewMaker.make(DefaultViewMaker.java:72)
	at org.nutz.mvc.view.ViewZone.makeView(ViewZone.java:86)
	at org.nutz.mvc.impl.processor.ViewProcessor.evalView(ViewProcessor.java:89)
	at org.nutz.mvc.impl.processor.FailProcessor.init(FailProcessor.java:22)
	at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:44)
	at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:54)
	at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:201)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
	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:4950)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1700)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1690)
	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)
18-01-08 15:54:25.368 ERROR [localhost-startStop-1] Error happend during start serivce!
org.nutz.json.JsonException: Unexpect EOF
	at org.nutz.json.impl.JsonTokenScan.nextChar(JsonCompileImplV2.java:358)
	at org.nutz.json.impl.JsonTokenScan.skipComment(JsonCompileImplV2.java:140)
	at org.nutz.json.impl.JsonTokenScan._nextToken(JsonCompileImplV2.java:85)
	at org.nutz.json.impl.JsonTokenScan.nextToken(JsonCompileImplV2.java:132)
	at org.nutz.json.impl.JsonTokenScan.readMap(JsonCompileImplV2.java:175)
	at org.nutz.json.impl.JsonTokenScan.read(JsonCompileImplV2.java:338)
	at org.nutz.json.impl.JsonCompileImplV2.parse(JsonCompileImplV2.java:26)
	at org.nutz.json.Json.fromJson(Json.java:42)
	at org.nutz.json.Json.parse(Json.java:77)
	at org.nutz.json.Json.fromJson(Json.java:58)
	at org.nutz.json.Json.fromJson(Json.java:163)
	at org.nutz.lang.Lang.map(Lang.java:1269)
	at org.nutz.mvc.view.DefaultViewMaker.make(DefaultViewMaker.java:72)
	at org.nutz.mvc.view.ViewZone.makeView(ViewZone.java:86)
	at org.nutz.mvc.impl.processor.ViewProcessor.evalView(ViewProcessor.java:89)
	at org.nutz.mvc.impl.processor.FailProcessor.init(FailProcessor.java:22)
	at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:44)
	at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:54)
	at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:201)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
	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:4950)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1700)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1690)
	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)
18-01-08 15:54:25.369 ERROR [localhost-startStop-1] try to depose ioc
18-01-08 15:54:25.369 INFO [localhost-startStop-1] org.nutz.ioc.impl.NutIoc@1887227486 is closing. startup date [18-01-08 15:54:25.311]
18-01-08 15:54:25.369 INFO [localhost-startStop-1] org.nutz.ioc.impl.NutIoc@1887227486 is deposed. startup date [18-01-08 15:54:25.311]
一月 08, 2018 3:54:25 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.json.JsonException: Unexpect EOF
	at org.nutz.mvc.LoadingException$FC$9a86caf9ff5d3b587784fcdf555a4a7d.invoke(LoadingException.java)
	at org.nutz.lang.born.AbstractConstructorBorning.call(AbstractConstructorBorning.java:25)
	at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:19)
	at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
	at org.nutz.lang.Mirror.born(Mirror.java:990)
	at org.nutz.lang.Lang.wrapThrow(Lang.java:200)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:135)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
	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:4950)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1700)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1690)
	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: org.nutz.json.JsonException: Unexpect EOF
	at org.nutz.json.impl.JsonTokenScan.nextChar(JsonCompileImplV2.java:358)
	at org.nutz.json.impl.JsonTokenScan.skipComment(JsonCompileImplV2.java:140)
	at org.nutz.json.impl.JsonTokenScan._nextToken(JsonCompileImplV2.java:85)
	at org.nutz.json.impl.JsonTokenScan.nextToken(JsonCompileImplV2.java:132)
	at org.nutz.json.impl.JsonTokenScan.readMap(JsonCompileImplV2.java:175)
	at org.nutz.json.impl.JsonTokenScan.read(JsonCompileImplV2.java:338)
	at org.nutz.json.impl.JsonCompileImplV2.parse(JsonCompileImplV2.java:26)
	at org.nutz.json.Json.fromJson(Json.java:42)
	at org.nutz.json.Json.parse(Json.java:77)
	at org.nutz.json.Json.fromJson(Json.java:58)
	at org.nutz.json.Json.fromJson(Json.java:163)
	at org.nutz.lang.Lang.map(Lang.java:1269)
	at org.nutz.mvc.view.DefaultViewMaker.make(DefaultViewMaker.java:72)
	at org.nutz.mvc.view.ViewZone.makeView(ViewZone.java:86)
	at org.nutz.mvc.impl.processor.ViewProcessor.evalView(ViewProcessor.java:89)
	at org.nutz.mvc.impl.processor.FailProcessor.init(FailProcessor.java:22)
	at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:44)
	at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:54)
	at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:201)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
	... 15 more

一月 08, 2018 3:54:25 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
一月 08, 2018 3:54:25 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/nutzbook] startup failed due to previous errors
一月 08, 2018 3:54:25 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory G:\apache-tomcat-7.0.82\webapps\docs
一月 08, 2018 3:54:26 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
一月 08, 2018 3:54:26 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory G:\apache-tomcat-7.0.82\webapps\docs has finished in 768 ms
一月 08, 2018 3:54:26 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory G:\apache-tomcat-7.0.82\webapps\examples
一月 08, 2018 3:54:27 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
一月 08, 2018 3:54:27 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
一月 08, 2018 3:54:27 下午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
一月 08, 2018 3:54:27 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@609ce8df')
一月 08, 2018 3:54:27 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory G:\apache-tomcat-7.0.82\webapps\examples has finished in 1,109 ms
一月 08, 2018 3:54:27 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory G:\apache-tomcat-7.0.82\webapps\host-manager
一月 08, 2018 3:54:27 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
一月 08, 2018 3:54:27 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory G:\apache-tomcat-7.0.82\webapps\host-manager has finished in 548 ms
一月 08, 2018 3:54:27 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory G:\apache-tomcat-7.0.82\webapps\manager
一月 08, 2018 3:54:28 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
一月 08, 2018 3:54:28 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory G:\apache-tomcat-7.0.82\webapps\manager has finished in 532 ms
一月 08, 2018 3:54:28 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory G:\apache-tomcat-7.0.82\webapps\ROOT
一月 08, 2018 3:54:28 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
一月 08, 2018 3:54:28 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory G:\apache-tomcat-7.0.82\webapps\ROOT has finished in 590 ms
一月 08, 2018 3:54:28 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
一月 08, 2018 3:54:28 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
一月 08, 2018 3:54:28 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 5564 ms

UserModule的count方法的注解写错了

另外, 请认真按说明做, 日志里面的GBK和tomcat 7,是不应该出现的东西

是的,UserModule类里注解:@Fail("http://500"),习惯性的多了双斜杠。不过你是从哪儿看出来的啊?

用Tomcat7是因为eclipse不支持Tomcat8。

eclipse不支持tomcat 8? 我用的是假的eclipse??

大神啊,我至于骗你嘛,servers下点击添加Apache里,最高就只有Apache Tomcat v7.0。我也正在找解决方法。之前就一直用的是7.
那个注解错误,你是从日志哪儿看出来的?

你的eclipse是多古老的版本? 开头第一章就说明了需要用的软件版本及配置方法,你是直接跳过去不看了吧?

日志里面已经写明了报错的类及方法名。

莫生气哈,这是eclipse缺少文件。我重装一次

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