NutzCN Logo
问答 第一季视频代码打好了,输入密码和账号按登录按钮就会报错
发布于 2390天前 作者 qq_c2f129d2 1387 次浏览 复制 上一个帖子 下一个帖子
标签:
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.86
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Apr 9 2018 20:16:54 UTC
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.86.0
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 8
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.2
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             C:\Program Files\Java\jre7
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.7.0_45-b18
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\endorsed
五月 01, 2018 1:51:31 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
五月 01, 2018 1:51:31 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: Loaded APR based Apache Tomcat Native library 1.2.16 using APR version 1.6.3.
五月 01, 2018 1:51:31 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
五月 01, 2018 1:51:32 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized (OpenSSL 1.0.2m  2 Nov 2017)
五月 01, 2018 1:51:33 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-8080"]
五月 01, 2018 1:51:33 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-apr-8089"]
五月 01, 2018 1:51:33 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1853 ms
五月 01, 2018 1:51:33 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
五月 01, 2018 1:51:33 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.86
五月 01, 2018 1:51:33 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\conf\Catalina\localhost\DongTaiss.xml
五月 01, 2018 1:51:33 下午 org.apache.catalina.startup.SetContextPropertiesRule begin
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:DongTaiss' did not find a matching property.
五月 01, 2018 1:51:34 下午 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.
2018-05-01 13:51:34 WARN [localhost-startStop-1] !!You are using default SystemLog! Don't use it in Production environment!!
2018-05-01 13:51:34 INFO [localhost-startStop-1] Nutz is licensed under the Apache License, Version 2.0 .
Report bugs : https://github.com/nutzam/nutz/issues
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] Locations for Scans:
[JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\bin\tomcat-juli.jar], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\bin\bootstrap.jar], FileSystemResourceLocation [root=G:\eclipse\eclipse-jee-mars-2-win32-x86_64\eclipse-jee-mars-2-win32-x86_64\eclipse\.], JarResourceLocation [jarPath=file:/F:/apache-tomcat-7.0.86-windows-x64/apache-tomcat-7.0.86/wtpwebapps/DongTaiss/WEB-INF/lib/nutz-1.b.45_X.jar]]
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] Locations for Scans:
[JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps\DongTaiss\WEB-INF\lib\h2-1.3.154.jar], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps\DongTaiss\WEB-INF\lib\nutz-1.b.45_X.jar], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps\DongTaiss\WEB-INF\lib\druid-0.2.2.jar], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\bin\tomcat-juli.jar], FileSystemResourceLocation [root=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps\DongTaiss\WEB-INF\classes], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\bin\bootstrap.jar], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps\DongTaiss\WEB-INF\lib\mysql-connector-java-5.1.46.jar], FileSystemResourceLocation [root=G:\eclipse\eclipse-jee-mars-2-win32-x86_64\eclipse-jee-mars-2-win32-x86_64\eclipse\.], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps\DongTaiss\WEB-INF\lib\commons-logging-1.1.1.jar], JarResourceLocation [jarPath=file:/F:/apache-tomcat-7.0.86-windows-x64/apache-tomcat-7.0.86/wtpwebapps/DongTaiss/WEB-INF/lib/nutz-1.b.45_X.jar]]
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] MainModule: <net.wendal.nutz.MainModule>
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] Loading by class org.nutz.mvc.impl.NutLoading
2018-05-01 13:51:34 INFO [localhost-startStop-1] Nutz Version : 1.b.45 
2018-05-01 13:51:34 INFO [localhost-startStop-1] Nutz.Mvc[DongTaiss] is initializing ...
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] Web Container Information:
2018-05-01 13:51:34 DEBUG [localhost-startStop-1]  - Default Charset : UTF-8
2018-05-01 13:51:34 DEBUG [localhost-startStop-1]  - Current . path  : G:\eclipse\eclipse-jee-mars-2-win32-x86_64\eclipse-jee-mars-2-win32-x86_64\eclipse\.
2018-05-01 13:51:34 DEBUG [localhost-startStop-1]  - Java Version    : 1.7.0_45
2018-05-01 13:51:34 DEBUG [localhost-startStop-1]  - File separator  : \
2018-05-01 13:51:34 DEBUG [localhost-startStop-1]  - Timezone        : Asia/Shanghai
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] MainModule: <net.wendal.nutz.MainModule>
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] >> app.root = F:/apache-tomcat-7.0.86-windows-x64/apache-tomcat-7.0.86/wtpwebapps/DongTaiss
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] @IocBy(org.nutz.mvc.ioc.provider.ComboIocProvider)
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] Found 1 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] Loaded 2 bean define from path=[ioc/]
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] Found 4 resource by src( net/wendal/nutz/ ) , regex( ^.+[.]class$ )
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] Found a Class with Ioc-Annotation : class net.wendal.nutz.module.UserModule
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] Processed Ioc Class : class net.wendal.nutz.module.UserModule as [userModule]
2018-05-01 13:51:34 DEBUG [localhost-startStop-1] Found 81 resource by src( org/nutz/castor/castor/ ) , regex( ^.+[.]class$ )
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Using 80 castor for Castors
2018-05-01 13:51:35 INFO [localhost-startStop-1] Scan complete ! Found 1 classes in 1 base-packages!
beans = ["userModule"]
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] MainModule: <net.wendal.nutz.MainModule>
2018-05-01 13:51:35 INFO [localhost-startStop-1] Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] @Views(DefaultViewMaker)
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] module class location 'file:/F:/apache-tomcat-7.0.86-windows-x64/apache-tomcat-7.0.86/wtpwebapps/DongTaiss/WEB-INF/classes/'
2018-05-01 13:51:35 DEBUG [localhost-startStop-1]  > scan 'net.wendal.nutz'
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Found 4 resource by src( net/wendal/nutz/ ) , regex( ^.+[.]class$ )
2018-05-01 13:51:35 DEBUG [localhost-startStop-1]    >> add 'net.wendal.nutz.module.UserModule'
2018-05-01 13:51:35 DEBUG [localhost-startStop-1]    '/usr/login'                >> login(...) : boolean | @Ok(json) @Fail(json) | by 0 Filters | (I:UTF-8/O:UTF-8)
2018-05-01 13:51:35 DEBUG [localhost-startStop-1]    '/usr/logout'               >> logout(...) : void | @Ok(>>:/) @Fail(json) | by 0 Filters | (I:UTF-8/O:UTF-8)
2018-05-01 13:51:35 DEBUG [localhost-startStop-1]    '/usr/ping'                 >> ping(...) : Object | @Ok(json) @Fail(json) | by 0 Filters | (I:UTF-8/O:UTF-8)
2018-05-01 13:51:35 DEBUG [localhost-startStop-1]    '/usr/me'                   >> me(...) : User | @Ok(json) @Fail(json) | by 0 Filters | (I:UTF-8/O:UTF-8)
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] @Localization not define
2018-05-01 13:51:35 INFO [localhost-startStop-1] Setup application...
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] config ioc=/*NutIoc*/
{
loader:/*ComboIocLoader*/
{
   "map" :{
      "dataSource" :{
         "type" :"com.alibaba.druid.pool.DruidDataSource",
         "fields" :{
            "driverClassName" :"org.h2.Driver",
            "url" :"jdbc:h2:nutz"
         },
         "events" :{
            "depose" :"close"
         }
      },
      "dao" :{
         "type" :"org.nutz.dao.impl.NutDao",
         "args" :[{
            "refer" :"dataSource"
         }]
      }
   }
 

   "map" :{
      "userModule" :{
         "type" :"net.wendal.nutz.module.UserModule",
         "singleton" :true,
         "events" :{
         },
         "args" :[],
         "fields" :[{
            "name" :"dao",
            "value" :{
               "type" :"refer",
               "value" :"dao"
            }
         }],
         "scope" :"app"
      }
   }
 
}
}
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Get 'dao'<interface org.nutz.dao.Dao>
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] 	 >> Load definition
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Loading define for name=dao
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Found IocObject(dao) in IocLoader(JsonLoader@282463820)
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] 	 >> Make...'dao'<interface org.nutz.dao.Dao>
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] class org.nutz.dao.impl.NutDao , no config to enable AOP.
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Save object 'dao' to [app] 
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Get 'dataSource'<null>
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] 	 >> Load definition
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Loading define for name=dataSource
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Found IocObject(dataSource) in IocLoader(JsonLoader@282463820)
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] 	 >> Make...'dataSource'<null>
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] class com.alibaba.druid.pool.DruidDataSource , no config to enable AOP.
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Save object 'dataSource' to [app] 
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Get 'dataSource'<null>
2018-05-01 13:51:35 INFO [localhost-startStop-1] Init file-pool by: ~/.nutz/tmp/dao/ [2000]
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] file-pool.home: 'C:\Users\xujian\.nutz\tmp\dao'
2018-05-01 13:51:35 INFO [localhost-startStop-1] file-pool.cursor: 0
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Jdbcs init complete
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Database info --> H2:[H2 - 1.3.154 (2011-04-04)]
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Found 4 resource by src( net/wendal/nutz/ ) , regex( ^.+[.]class$ )
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] Table 'tb_user' doesn't exist!
2018-05-01 13:51:35 DEBUG [localhost-startStop-1] SELECT COUNT(*) FROM tb_user 
2018-05-01 13:51:35 INFO [localhost-startStop-1] Nutz.Mvc[DongTaiss] is up in 1190ms
五月 01, 2018 1:51:35 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deployment of configuration descriptor F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\conf\Catalina\localhost\DongTaiss.xml has finished in 2,647 ms
五月 01, 2018 1:51:35 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\docs
五月 01, 2018 1:51:35 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\docs has finished in 55 ms
五月 01, 2018 1:51:35 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\examples
五月 01, 2018 1:51:36 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
五月 01, 2018 1:51:36 下午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
五月 01, 2018 1:51:36 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('StockTicker', 'async.Stockticker@409642cc')
五月 01, 2018 1:51:36 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@17211aeb')
五月 01, 2018 1:51:36 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\examples has finished in 355 ms
五月 01, 2018 1:51:36 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\host-manager
五月 01, 2018 1:51:36 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\host-manager has finished in 137 ms
五月 01, 2018 1:51:36 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\manager
五月 01, 2018 1:51:36 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\manager has finished in 60 ms
五月 01, 2018 1:51:36 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\ROOT
五月 01, 2018 1:51:36 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\ROOT has finished in 58 ms
五月 01, 2018 1:51:36 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8080"]
五月 01, 2018 1:51:36 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8089"]
五月 01, 2018 1:51:36 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 3407 ms
2018-05-01 13:52:09 DEBUG [http-apr-8080-exec-8] find mapping (DEFT&[]) for path '/usr/login'
2018-05-01 13:52:09 DEBUG [http-apr-8080-exec-8] Get 'userModule'<class net.wendal.nutz.module.UserModule>
2018-05-01 13:52:09 DEBUG [http-apr-8080-exec-8] 	 >> Load definition
2018-05-01 13:52:09 DEBUG [http-apr-8080-exec-8] Found IocObject(userModule) in IocLoader(AnnotationIocLoader@1906058326)
2018-05-01 13:52:09 DEBUG [http-apr-8080-exec-8] 	 >> Make...'userModule'<class net.wendal.nutz.module.UserModule>
2018-05-01 13:52:09 DEBUG [http-apr-8080-exec-8] class net.wendal.nutz.module.UserModule , no config to enable AOP.
2018-05-01 13:52:09 DEBUG [http-apr-8080-exec-8] Save object 'userModule' to [app] 
2018-05-01 13:52:09 DEBUG [http-apr-8080-exec-8] Get 'dao'<null>
2018-05-01 13:52:09 DEBUG [http-apr-8080-exec-8] Handle URL[/usr/login] by Method[public boolean net.wendal.nutz.module.UserModule.login(java.lang.String,java.lang.String,javax.servlet.http.HttpSession)]
2018-05-01 13:52:09 DEBUG [http-apr-8080-exec-8] SELECT * FROM tb_user  WHERE name=? AND passwd=?
    |     1 |      2 |
    |-------|--------|
    | admin | 123456 |
  For example:> "SELECT * FROM tb_user  WHERE name='admin' AND passwd='123456'"
2018-05-01 13:52:09 DEBUG [http-apr-8080-exec-8] SQLException
org.h2.jdbc.JdbcSQLException: Column "PASSWD" not found; SQL statement:
SELECT * FROM tb_user  WHERE name=? AND passwd=? [42122-154]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
	at org.h2.message.DbException.get(DbException.java:167)
	at org.h2.message.DbException.get(DbException.java:144)
	at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:134)
	at org.h2.expression.Comparison.optimize(Comparison.java:154)
	at org.h2.expression.ConditionAndOr.optimize(ConditionAndOr.java:127)
	at org.h2.command.dml.Select.prepare(Select.java:797)
	at org.h2.command.Parser.prepare(Parser.java:202)
	at org.h2.command.Parser.prepareCommand(Parser.java:214)
	at org.h2.engine.Session.prepareLocal(Session.java:426)
	at org.h2.engine.Session.prepareCommand(Session.java:374)
	at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1100)
	at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:71)
	at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:608)
	at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:231)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:113)
	at org.nutz.dao.impl.DaoSupport$DaoExec.invoke(DaoSupport.java:221)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:30)
	at org.nutz.dao.impl.DaoSupport$DaoExec.run(DaoSupport.java:211)
	at org.nutz.trans.Trans.exec(Trans.java:123)
	at org.nutz.trans.Trans.exec(Trans.java:81)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:184)
	at org.nutz.dao.impl.NutDao.fetch(NutDao.java:469)
	at net.wendal.nutz.module.UserModule.login(UserModule.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:22)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:40)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:85)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:36)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:66)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:30)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2555)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2544)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Unknown Source)
2018-05-01 13:52:09 ERROR [http-apr-8080-exec-8] Catch handle error URI=http://localhost:8080/DongTaiss/usr/login
org.h2.jdbc.JdbcSQLException: Column "PASSWD" not found; SQL statement:
SELECT * FROM tb_user  WHERE name=? AND passwd=? [42122-154]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
	at org.h2.message.DbException.get(DbException.java:167)
	at org.h2.message.DbException.get(DbException.java:144)
	at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:134)
	at org.h2.expression.Comparison.optimize(Comparison.java:154)
	at org.h2.expression.ConditionAndOr.optimize(ConditionAndOr.java:127)
	at org.h2.command.dml.Select.prepare(Select.java:797)
	at org.h2.command.Parser.prepare(Parser.java:202)
	at org.h2.command.Parser.prepareCommand(Parser.java:214)
	at org.h2.engine.Session.prepareLocal(Session.java:426)
	at org.h2.engine.Session.prepareCommand(Session.java:374)
	at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1100)
	at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:71)
	at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:608)
	at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:231)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:113)
	at org.nutz.dao.impl.DaoSupport$DaoExec.invoke(DaoSupport.java:221)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:30)
	at org.nutz.dao.impl.DaoSupport$DaoExec.run(DaoSupport.java:211)
	at org.nutz.trans.Trans.exec(Trans.java:123)
	at org.nutz.trans.Trans.exec(Trans.java:81)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:184)
	at org.nutz.dao.impl.NutDao.fetch(NutDao.java:469)
	at net.wendal.nutz.module.UserModule.login(UserModule.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:22)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:40)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:85)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:36)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:66)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:30)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2555)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2544)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Unknown Source)

7 回复

建错表了?字段名对不上的样子

怎么样才能看到数据库里的表啊,我先看看建表有没有成功

现在建表插入好像没有问题了,但是在网页输入正确的账号和密码的时候还是会跳出登录失败的提示框

五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.86
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Apr 9 2018 20:16:54 UTC
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.86.0
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 8
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.2
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             C:\Program Files\Java\jre7
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.7.0_45-b18
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\endorsed
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
五月 01, 2018 2:42:39 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: Loaded APR based Apache Tomcat Native library 1.2.16 using APR version 1.6.3.
五月 01, 2018 2:42:39 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
五月 01, 2018 2:42:39 下午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized (OpenSSL 1.0.2m  2 Nov 2017)
五月 01, 2018 2:42:39 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-apr-8080"]
五月 01, 2018 2:42:39 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-apr-8089"]
五月 01, 2018 2:42:39 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1849 ms
五月 01, 2018 2:42:40 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
五月 01, 2018 2:42:40 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.86
五月 01, 2018 2:42:40 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\conf\Catalina\localhost\DongTaiss.xml
五月 01, 2018 2:42:40 下午 org.apache.catalina.startup.SetContextPropertiesRule begin
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:DongTaiss' did not find a matching property.
五月 01, 2018 2:42:41 下午 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.
2018-05-01 14:42:41 WARN [localhost-startStop-1] !!You are using default SystemLog! Don't use it in Production environment!!
2018-05-01 14:42:41 INFO [localhost-startStop-1] Nutz is licensed under the Apache License, Version 2.0 .
Report bugs : https://github.com/nutzam/nutz/issues
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Locations for Scans:
[JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\bin\tomcat-juli.jar], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\bin\bootstrap.jar], FileSystemResourceLocation [root=G:\eclipse\eclipse-jee-mars-2-win32-x86_64\eclipse-jee-mars-2-win32-x86_64\eclipse\.], JarResourceLocation [jarPath=file:/F:/apache-tomcat-7.0.86-windows-x64/apache-tomcat-7.0.86/wtpwebapps/DongTaiss/WEB-INF/lib/nutz-1.b.45_X.jar]]
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Locations for Scans:
[JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps\DongTaiss\WEB-INF\lib\h2-1.3.154.jar], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps\DongTaiss\WEB-INF\lib\nutz-1.b.45_X.jar], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps\DongTaiss\WEB-INF\lib\druid-0.2.2.jar], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\bin\tomcat-juli.jar], FileSystemResourceLocation [root=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps\DongTaiss\WEB-INF\classes], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\bin\bootstrap.jar], FileSystemResourceLocation [root=G:\eclipse\eclipse-jee-mars-2-win32-x86_64\eclipse-jee-mars-2-win32-x86_64\eclipse\.], JarResourceLocation [jarPath=F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\wtpwebapps\DongTaiss\WEB-INF\lib\commons-logging-1.1.1.jar], JarResourceLocation [jarPath=file:/F:/apache-tomcat-7.0.86-windows-x64/apache-tomcat-7.0.86/wtpwebapps/DongTaiss/WEB-INF/lib/nutz-1.b.45_X.jar]]
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] MainModule: <net.wendal.nutz.MainModule>
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Loading by class org.nutz.mvc.impl.NutLoading
2018-05-01 14:42:41 INFO [localhost-startStop-1] Nutz Version : 1.b.45 
2018-05-01 14:42:41 INFO [localhost-startStop-1] Nutz.Mvc[DongTaiss] is initializing ...
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Web Container Information:
2018-05-01 14:42:41 DEBUG [localhost-startStop-1]  - Default Charset : UTF-8
2018-05-01 14:42:41 DEBUG [localhost-startStop-1]  - Current . path  : G:\eclipse\eclipse-jee-mars-2-win32-x86_64\eclipse-jee-mars-2-win32-x86_64\eclipse\.
2018-05-01 14:42:41 DEBUG [localhost-startStop-1]  - Java Version    : 1.7.0_45
2018-05-01 14:42:41 DEBUG [localhost-startStop-1]  - File separator  : \
2018-05-01 14:42:41 DEBUG [localhost-startStop-1]  - Timezone        : Asia/Shanghai
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] MainModule: <net.wendal.nutz.MainModule>
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] >> app.root = F:/apache-tomcat-7.0.86-windows-x64/apache-tomcat-7.0.86/wtpwebapps/DongTaiss
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] @IocBy(org.nutz.mvc.ioc.provider.ComboIocProvider)
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Found 1 resource by src( ioc ) , regex( ^(.+[.])(js|json)$ )
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Loaded 2 bean define from path=[ioc]
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Found 4 resource by src( net/wendal/nutz/ ) , regex( ^.+[.]class$ )
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Found a Class with Ioc-Annotation : class net.wendal.nutz.module.UserModule
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Processed Ioc Class : class net.wendal.nutz.module.UserModule as [userModule]
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Found 81 resource by src( org/nutz/castor/castor/ ) , regex( ^.+[.]class$ )
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Using 80 castor for Castors
2018-05-01 14:42:41 INFO [localhost-startStop-1] Scan complete ! Found 1 classes in 1 base-packages!
beans = ["userModule"]
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] MainModule: <net.wendal.nutz.MainModule>
2018-05-01 14:42:41 INFO [localhost-startStop-1] Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] @Views(DefaultViewMaker)
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] module class location 'file:/F:/apache-tomcat-7.0.86-windows-x64/apache-tomcat-7.0.86/wtpwebapps/DongTaiss/WEB-INF/classes/'
2018-05-01 14:42:41 DEBUG [localhost-startStop-1]  > scan 'net.wendal.nutz'
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] Found 4 resource by src( net/wendal/nutz/ ) , regex( ^.+[.]class$ )
2018-05-01 14:42:41 DEBUG [localhost-startStop-1]    >> add 'net.wendal.nutz.module.UserModule'
2018-05-01 14:42:41 DEBUG [localhost-startStop-1]    '/usr/login'                >> login(...) : boolean | @Ok(json) @Fail(json) | by 0 Filters | (I:UTF-8/O:UTF-8)
2018-05-01 14:42:41 DEBUG [localhost-startStop-1]    '/usr/logout'               >> logout(...) : void | @Ok(>>:/) @Fail(json) | by 0 Filters | (I:UTF-8/O:UTF-8)
2018-05-01 14:42:41 DEBUG [localhost-startStop-1]    '/usr/me'                   >> me(...) : User | @Ok(json) @Fail(json) | by 0 Filters | (I:UTF-8/O:UTF-8)
2018-05-01 14:42:41 DEBUG [localhost-startStop-1]    '/usr/ping'                 >> ping(...) : Object | @Ok(json) @Fail(json) | by 0 Filters | (I:UTF-8/O:UTF-8)
2018-05-01 14:42:41 DEBUG [localhost-startStop-1] @Localization not define
2018-05-01 14:42:41 INFO [localhost-startStop-1] Setup application...
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] config ioc=/*NutIoc*/
{
loader:/*ComboIocLoader*/
{
   "map" :{
      "dataSource" :{
         "type" :"com.alibaba.druid.pool.DruidDataSource",
         "fields" :{
            "driverClassName" :"org.h2.Driver",
            "url" :"jdbc:h2:nutz"
         },
         "events" :{
            "depose" :"close"
         }
      },
      "dao" :{
         "type" :"org.nutz.dao.impl.NutDao",
         "args" :[{
            "refer" :"dataSource"
         }]
      }
   }
 

   "map" :{
      "userModule" :{
         "type" :"net.wendal.nutz.module.UserModule",
         "singleton" :true,
         "events" :{
         },
         "args" :[],
         "fields" :[{
            "name" :"dao",
            "value" :{
               "type" :"refer",
               "value" :"dao"
            }
         }],
         "scope" :"app"
      }
   }
 
}
}
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Get 'dao'<interface org.nutz.dao.Dao>
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] 	 >> Load definition
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Loading define for name=dao
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Found IocObject(dao) in IocLoader(JsonLoader@1479003639)
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] 	 >> Make...'dao'<interface org.nutz.dao.Dao>
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] class org.nutz.dao.impl.NutDao , no config to enable AOP.
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Save object 'dao' to [app] 
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Get 'dataSource'<null>
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] 	 >> Load definition
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Loading define for name=dataSource
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Found IocObject(dataSource) in IocLoader(JsonLoader@1479003639)
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] 	 >> Make...'dataSource'<null>
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] class com.alibaba.druid.pool.DruidDataSource , no config to enable AOP.
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Save object 'dataSource' to [app] 
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Get 'dataSource'<null>
2018-05-01 14:42:42 INFO [localhost-startStop-1] Init file-pool by: ~/.nutz/tmp/dao/ [2000]
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] file-pool.home: 'C:\Users\xujian\.nutz\tmp\dao'
2018-05-01 14:42:42 INFO [localhost-startStop-1] file-pool.cursor: 0
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Jdbcs init complete
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Database info --> H2:[H2 - 1.3.154 (2011-04-04)]
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Found 4 resource by src( net/wendal/nutz/ ) , regex( ^.+[.]class$ )
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Table 'tb_user2' doesn't exist!
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] Table 'tb_user2' doesn't exist!
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] CREATE TABLE tb_user2(
id SERIAL,
name VARCHAR(50),
passwd VARCHAR(50),
CONSTRAINT tb_user2_pkey PRIMARY KEY (id)
)
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] SELECT COUNT(*) FROM tb_user2 
------------------0
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] SELECT COUNT(*) FROM tb_user2 
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] INSERT INTO tb_user2(name,passwd) VALUES(?,?) 
    |     1 |       2 |
    |-------|---------|
    | admin | 123456  |
  For example:> "INSERT INTO tb_user2(name,passwd) VALUES('admin','123456 ') "
2018-05-01 14:42:42 DEBUG [localhost-startStop-1] SELECT MAX(id) AS id FROM tb_user2
2018-05-01 14:42:42 INFO [localhost-startStop-1] Nutz.Mvc[DongTaiss] is up in 1299ms
五月 01, 2018 2:42:42 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deployment of configuration descriptor F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\conf\Catalina\localhost\DongTaiss.xml has finished in 2,708 ms
五月 01, 2018 2:42:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\docs
五月 01, 2018 2:42:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\docs has finished in 93 ms
五月 01, 2018 2:42:42 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\examples
五月 01, 2018 2:42:43 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
五月 01, 2018 2:42:43 下午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
五月 01, 2018 2:42:43 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('StockTicker', 'async.Stockticker@48c87b2')
五月 01, 2018 2:42:43 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@4bb526fb')
五月 01, 2018 2:42:43 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\examples has finished in 363 ms
五月 01, 2018 2:42:43 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\host-manager
五月 01, 2018 2:42:43 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\host-manager has finished in 155 ms
五月 01, 2018 2:42:43 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\manager
五月 01, 2018 2:42:43 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\manager has finished in 77 ms
五月 01, 2018 2:42:43 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\ROOT
五月 01, 2018 2:42:43 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory F:\apache-tomcat-7.0.86-windows-x64\apache-tomcat-7.0.86\webapps\ROOT has finished in 79 ms
五月 01, 2018 2:42:43 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-apr-8080"]
五月 01, 2018 2:42:43 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-apr-8089"]
五月 01, 2018 2:42:43 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 3604 ms
2018-05-01 14:43:23 DEBUG [http-apr-8080-exec-7] find mapping (DEFT&[]) for path '/usr/login'
2018-05-01 14:43:23 DEBUG [http-apr-8080-exec-7] Get 'userModule'<class net.wendal.nutz.module.UserModule>
2018-05-01 14:43:23 DEBUG [http-apr-8080-exec-7] 	 >> Load definition
2018-05-01 14:43:23 DEBUG [http-apr-8080-exec-7] Found IocObject(userModule) in IocLoader(AnnotationIocLoader@1538251704)
2018-05-01 14:43:23 DEBUG [http-apr-8080-exec-7] 	 >> Make...'userModule'<class net.wendal.nutz.module.UserModule>
2018-05-01 14:43:23 DEBUG [http-apr-8080-exec-7] class net.wendal.nutz.module.UserModule , no config to enable AOP.
2018-05-01 14:43:23 DEBUG [http-apr-8080-exec-7] Save object 'userModule' to [app] 
2018-05-01 14:43:23 DEBUG [http-apr-8080-exec-7] Get 'dao'<null>
2018-05-01 14:43:23 DEBUG [http-apr-8080-exec-7] Handle URL[/usr/login] by Method[public boolean net.wendal.nutz.module.UserModule.login(java.lang.String,java.lang.String,javax.servlet.http.HttpSession)]
admin123456---------
2018-05-01 14:43:23 DEBUG [http-apr-8080-exec-7] SELECT * FROM tb_user2  WHERE name=? AND passwd=?
    |     1 |      2 |
    |-------|--------|
    | admin | 123456 |
  For example:> "SELECT * FROM tb_user2  WHERE name='admin' AND passwd='123456'"

是不是插入user的语句写错了

package net.wendal.nutz;


import org.nutz.dao.Dao;
import org.nutz.dao.entity.annotation.Table;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.nutz.mvc.NutConfig;
import org.nutz.mvc.Setup;
import org.nutz.resource.Scans;

import net.wendal.nutz.bean.User;

public class WendalSetup implements Setup{
	
	private static final Log log = Logs.get();

	@Override
	public void init(NutConfig config) {
		// TODO Auto-generated method stub
		log.debug("config ioc=" + config.getIoc());
		
		Dao dao = config.getIoc().get(Dao.class);
		for (Class<?> klass : Scans.me().scanPackage("net.wendal.nutz")) {
			if (null != klass.getAnnotation(Table.class)) 
				dao.create(klass, false);
		}
		System.out.println("------------------"+dao.count(User.class));
		if(dao.count(User.class) == 0){
			 User admin =new User();
			 admin.setName("admin");
			 admin.setPasswd("123456 ");
			 dao.insert(admin);
		}
	}

	@Override
	public void destroy(NutConfig config) {
		// TODO Auto-generated method stub
		
	}

}
admin.setPasswd("123456 ");

你多敲的空格,所以不匹配了

可以找找eclipse目录的nutz.db文件,把它删掉,或者改一下jdbcUrl,将nutz改成nutz2,就能重新初始化了

现在行了。。感谢大佬

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