NutzCN Logo
问答 nutzbook进行到3.1步骤出错了
发布于 3037天前 作者 qq_4eed6280 1834 次浏览 复制 上一个帖子 下一个帖子
标签:

一直说找不到表
错误如下

八月 29, 2016 5:44:10 上午 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.
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/8.0.28
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Oct 7 2015 18:25:21 UTC
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         8.0.28.0
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 7
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.1
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          x86
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             J:\Java18\jdk1.8.0_91\jre
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_91-b14
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         J:\java_work\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         J:\soft_1\tomcat8028\apache-tomcat-8.0.28
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=J:\java_work\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=J:\soft_1\tomcat8028\apache-tomcat-8.0.28
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=J:\java_work\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=J:\soft_1\tomcat8028\apache-tomcat-8.0.28\endorsed
八月 29, 2016 5:44:10 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
八月 29, 2016 5:44:10 上午 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: J:\Java18\jdk1.8.0_91\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;J:/Java18/jdk1.8.0_91/bin/../jre/bin/client;J:/Java18/jdk1.8.0_91/bin/../jre/bin;J:/Java18/jdk1.8.0_91/bin/../jre/lib/i386;J:\Java18\jdk1.8.0_91\bin;J:\javaSoft\apache-maven-3.3.9\bin;C:\ProgramData\Oracle\Java\javapath;D:\Python27\;D:\Python27\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\QuickTime\QTSystem\;d:\Program Files\Git\cmd;C:\Windows\system32;;J:\java_work\eclipse-jee-mars-2-win32\eclipse;;.
八月 29, 2016 5:44:10 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
八月 29, 2016 5:44:11 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
八月 29, 2016 5:44:11 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
八月 29, 2016 5:44:11 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
八月 29, 2016 5:44:11 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 791 ms
八月 29, 2016 5:44:11 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
八月 29, 2016 5:44:11 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.28
八月 29, 2016 5:44:11 上午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [136] milliseconds.
八月 29, 2016 5:44:12 上午 org.apache.jasper.servlet.TldScanner scanJars
信息: 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.
2016-8-29 5:44:12.340 WARN [localhost-startStop-1] !!You are using default SystemLog! Don't use it in Production environment!!
2016-8-29 5:44:12.347 INFO [localhost-startStop-1] NutFilter[nutz] starting ...
2016-8-29 5:44:12.433 DEBUG [localhost-startStop-1] Locations for Scans:
[FileSystemResourceLocation [root=J:\java_work\eclipse-jee-mars-2-win32\eclipse], JarResourceLocation [jarPath=J:\soft_1\tomcat8028\apache-tomcat-8.0.28\bin\bootstrap.jar], JarResourceLocation [jarPath=J:\soft_1\tomcat8028\apache-tomcat-8.0.28\bin\tomcat-juli.jar], JarResourceLocation [jarPath=J:\java_work\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutzbook\WEB-INF\lib\nutz-1.r.57.r3.jar]]
2016-8-29 5:44:12.605 DEBUG [localhost-startStop-1] Locations for Scans:
[FileSystemResourceLocation [root=J:\java_work\eclipse-jee-mars-2-win32\eclipse], JarResourceLocation [jarPath=J:\soft_1\tomcat8028\apache-tomcat-8.0.28\bin\bootstrap.jar], JarResourceLocation [jarPath=J:\java_work\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutzbook\WEB-INF\lib\druid-1.0.16.jar], JarResourceLocation [jarPath=J:\java_work\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutzbook\WEB-INF\lib\mysql-connector-java-5.1.37.jar], FileSystemResourceLocation [root=J:\java_work\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutzbook\WEB-INF\classes], JarResourceLocation [jarPath=J:\soft_1\tomcat8028\apache-tomcat-8.0.28\bin\tomcat-juli.jar], JarResourceLocation [jarPath=J:\java_work\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutzbook\WEB-INF\lib\nutz-1.r.57.r3.jar]]
2016-8-29 5:44:12.611 DEBUG [localhost-startStop-1] MainModule: <net.wendal.nutzbook.MainModule>
2016-8-29 5:44:12.623 DEBUG [localhost-startStop-1] Loading by class org.nutz.mvc.impl.NutLoading
2016-8-29 5:44:12.627 INFO [localhost-startStop-1] Nutz Version : 1.r.57.r3 
2016-8-29 5:44:12.627 INFO [localhost-startStop-1] Nutz.Mvc[nutz] is initializing ...
2016-8-29 5:44:12.627 DEBUG [localhost-startStop-1] Web Container Information:
2016-8-29 5:44:12.629 DEBUG [localhost-startStop-1]  - Default Charset : UTF-8
2016-8-29 5:44:12.629 DEBUG [localhost-startStop-1]  - Current . path  : J:\java_work\eclipse-jee-mars-2-win32\eclipse\.
2016-8-29 5:44:12.629 DEBUG [localhost-startStop-1]  - Java Version    : 1.8.0_91
2016-8-29 5:44:12.630 DEBUG [localhost-startStop-1]  - File separator  : \
2016-8-29 5:44:12.630 DEBUG [localhost-startStop-1]  - Timezone        : Asia/Shanghai
2016-8-29 5:44:12.630 DEBUG [localhost-startStop-1]  - OS              : Windows 7 x86
2016-8-29 5:44:12.631 DEBUG [localhost-startStop-1]  - ServerInfo      : Apache Tomcat/8.0.28
2016-8-29 5:44:12.631 DEBUG [localhost-startStop-1]  - Servlet API     : 3.1
2016-8-29 5:44:12.631 DEBUG [localhost-startStop-1]  - ContextPath     : /nutzbook
2016-8-29 5:44:12.631 DEBUG [localhost-startStop-1]  - context.tempdir : J:\java_work\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\nutzbook
2016-8-29 5:44:12.633 DEBUG [localhost-startStop-1] MainModule: <net.wendal.nutzbook.MainModule>
2016-8-29 5:44:12.634 DEBUG [localhost-startStop-1] >> app.root = J:/java_work/work/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/nutzbook
2016-8-29 5:44:12.733 DEBUG [localhost-startStop-1] Using 94 castor for Castors
2016-8-29 5:44:12.735 DEBUG [localhost-startStop-1] @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "net.wendal.nutzbook", "*tx"],init=[])
2016-8-29 5:44:12.777 DEBUG [localhost-startStop-1] Found 1 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
2016-8-29 5:44:12.777 DEBUG [localhost-startStop-1] loading ioc js config from [dao.js]
2016-8-29 5:44:12.784 DEBUG [localhost-startStop-1] Loaded 2 bean define from path=[ioc/] --> [dataSource, dao]
2016-8-29 5:44:12.786 DEBUG [localhost-startStop-1] Found 3 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
2016-8-29 5:44:12.795 WARN [localhost-startStop-1] NONE Annotation-Class found!! Check your ioc configure!! packages=[net.wendal.nutzbook]
2016-8-29 5:44:12.796 DEBUG [localhost-startStop-1] Loaded 5 bean define from reader --
[txREPEATABLE_READ, txSERIALIZABLE, txNONE, txREAD_UNCOMMITTED, txREAD_COMMITTED]
2016-8-29 5:44:12.801 INFO [localhost-startStop-1] NutIoc init begin ...
2016-8-29 5:44:12.805 INFO [localhost-startStop-1] ... NutIoc init complete
2016-8-29 5:44:12.806 DEBUG [localhost-startStop-1] MainModule: <net.wendal.nutzbook.MainModule>
2016-8-29 5:44:12.810 INFO [localhost-startStop-1] Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2016-8-29 5:44:12.813 DEBUG [localhost-startStop-1] @Views(DefaultViewMaker.class)
2016-8-29 5:44:12.823 DEBUG [localhost-startStop-1] @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2016-8-29 5:44:12.835 DEBUG [localhost-startStop-1] module class location 'file:/J:/java_work/work/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/nutzbook/WEB-INF/classes/'
2016-8-29 5:44:12.835 DEBUG [localhost-startStop-1]  > scan 'net.wendal.nutzbook'
2016-8-29 5:44:12.837 DEBUG [localhost-startStop-1] Found 3 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
2016-8-29 5:44:12.837 WARN [localhost-startStop-1] None module classes found!!!
2016-8-29 5:44:12.837 WARN [localhost-startStop-1] None @At found in any modules class!!
2016-8-29 5:44:12.839 DEBUG [localhost-startStop-1] @Localization not define
2016-8-29 5:44:12.840 INFO [localhost-startStop-1] Setup application...
2016-8-29 5:44:12.841 DEBUG [localhost-startStop-1] Get 'dao'<interface org.nutz.dao.Dao>
2016-8-29 5:44:12.844 DEBUG [localhost-startStop-1] Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
2016-8-29 5:44:12.845 DEBUG [localhost-startStop-1] 	 >> Load definition name=dao
2016-8-29 5:44:12.846 DEBUG [localhost-startStop-1] Loading define for name=dao
2016-8-29 5:44:12.854 DEBUG [localhost-startStop-1] Found IocObject(dao) in JsonLoader(paths=[ioc/])
2016-8-29 5:44:12.854 DEBUG [localhost-startStop-1] 	 >> Make...'dao'<interface org.nutz.dao.Dao>
2016-8-29 5:44:12.875 DEBUG [localhost-startStop-1] Load class org.nutz.dao.impl.NutDao without AOP
2016-8-29 5:44:12.876 DEBUG [localhost-startStop-1] Save object 'dao' to [app] 
2016-8-29 5:44:12.879 DEBUG [localhost-startStop-1] Get 'dataSource'<>
2016-8-29 5:44:12.880 DEBUG [localhost-startStop-1] 	 >> Load definition name=dataSource
2016-8-29 5:44:12.880 DEBUG [localhost-startStop-1] Loading define for name=dataSource
2016-8-29 5:44:12.894 DEBUG [localhost-startStop-1] Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
2016-8-29 5:44:12.894 DEBUG [localhost-startStop-1] 	 >> Make...'dataSource'<>
2016-8-29 5:44:12.926 DEBUG [localhost-startStop-1] Load class com.alibaba.druid.pool.DruidDataSource without AOP
2016-8-29 5:44:12.926 DEBUG [localhost-startStop-1] Save object 'dataSource' to [app] 
八月 29, 2016 5:44:13 上午 com.alibaba.druid.pool.DruidDataSource info
信息: {dataSource-1} inited
2016-8-29 5:44:13.9 DEBUG [localhost-startStop-1] Get 'dataSource'<>
2016-8-29 5:44:13.22 DEBUG [localhost-startStop-1] NutDao[_selfId=0] init ...
2016-8-29 5:44:13.60 INFO [localhost-startStop-1] Init file-pool by: C:\Users\TGL/.nutz/tmp/dao/ [200000]
2016-8-29 5:44:13.61 DEBUG [localhost-startStop-1] file-pool.home: 'C:\Users\TGL\.nutz\tmp\dao'
2016-8-29 5:44:13.62 INFO [localhost-startStop-1] file-pool.cursor: 0
2016-8-29 5:44:13.72 DEBUG [localhost-startStop-1] Jdbcs init complete
2016-8-29 5:44:13.72 INFO [localhost-startStop-1] Get Connection from DataSource for JdbcExpert, if I lock at here, check your database server and configure
2016-8-29 5:44:13.353 DEBUG [localhost-startStop-1] JDBC Driver --> mysql-connector-java-5.1.37 ( Revision: 09940f05b4c98150f352e787a2549f11a2e9da93 )
2016-8-29 5:44:13.354 DEBUG [localhost-startStop-1] JDBC Name   --> MySQL Connector Java
2016-8-29 5:44:13.354 DEBUG [localhost-startStop-1] JDBC URL    --> jdbc:mysql://127.0.0.1:3306/nutzbook
2016-8-29 5:44:13.362 DEBUG [localhost-startStop-1] Mysql : character_set_client=utf8
2016-8-29 5:44:13.363 DEBUG [localhost-startStop-1] Mysql : character_set_connection=utf8
2016-8-29 5:44:13.363 DEBUG [localhost-startStop-1] Mysql : character_set_database=utf8
2016-8-29 5:44:13.363 DEBUG [localhost-startStop-1] Mysql : character_set_filesystem=binary
2016-8-29 5:44:13.363 DEBUG [localhost-startStop-1] Mysql : character_set_results=
2016-8-29 5:44:13.363 DEBUG [localhost-startStop-1] Mysql : character_set_server=utf8
2016-8-29 5:44:13.364 DEBUG [localhost-startStop-1] Mysql : character_set_system=utf8
2016-8-29 5:44:13.364 DEBUG [localhost-startStop-1] Mysql : character_sets_dir=C:\Program Files\MySQL\MySQL Server 5.6\share\charsets\
2016-8-29 5:44:13.364 DEBUG [localhost-startStop-1] Mysql : database=nutzbook
2016-8-29 5:44:13.365 DEBUG [localhost-startStop-1] Mysql : user=root@localhost
2016-8-29 5:44:13.382 DEBUG [localhost-startStop-1] Database info --> MYSQL:[MySQL - 5.6.32-log]
2016-8-29 5:44:13.388 DEBUG [localhost-startStop-1] Found 3 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
2016-8-29 5:44:13.424 WARN [localhost-startStop-1] No @Table found, fallback to use table name='user' for type 'net.wendal.nutzbook.bean.User'
2016-8-29 5:44:13.475 DEBUG [localhost-startStop-1] Table 'user' doesn't exist!
2016-8-29 5:44:13.485 DEBUG [localhost-startStop-1] SELECT COUNT(*) FROM user 
2016-8-29 5:44:13.487 DEBUG [localhost-startStop-1] SQLException
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'nutzbook.user' doesn't exist
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
	at com.mysql.jdbc.Util.getInstance(Util.java:387)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2504)
	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1370)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:143)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:199)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:45)
	at org.nutz.dao.impl.DaoSupport$DaoExec.invoke(DaoSupport.java:334)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:59)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:257)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:289)
	at org.nutz.dao.impl.NutDao.func(NutDao.java:740)
	at org.nutz.dao.impl.NutDao.func(NutDao.java:721)
	at org.nutz.dao.impl.NutDao._count(NutDao.java:708)
	at org.nutz.dao.impl.NutDao.count(NutDao.java:671)
	at net.wendal.nutzbook.MainSetup.init(MainSetup.java:26)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:276)
	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: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:4583)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	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:745)
2016-8-29 5:44:13.488 ERROR [localhost-startStop-1] Error happend during start serivce!
org.nutz.dao.DaoException: !Nutz SQL Error: 'SELECT COUNT(*) FROM user '
PreparedStatement: 
'SELECT COUNT(*) FROM user '
CaseMessage=Table 'nutzbook.user' doesn't exist
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:96)
	at org.nutz.dao.impl.DaoSupport$DaoExec.invoke(DaoSupport.java:334)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:59)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:257)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:289)
	at org.nutz.dao.impl.NutDao.func(NutDao.java:740)
	at org.nutz.dao.impl.NutDao.func(NutDao.java:721)
	at org.nutz.dao.impl.NutDao._count(NutDao.java:708)
	at org.nutz.dao.impl.NutDao.count(NutDao.java:671)
	at net.wendal.nutzbook.MainSetup.init(MainSetup.java:26)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:276)
	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: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:4583)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	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:745)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'nutzbook.user' doesn't exist
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
	at com.mysql.jdbc.Util.getInstance(Util.java:387)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2504)
	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1370)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:143)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:199)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:45)
	... 26 more
2016-8-29 5:44:13.490 INFO [localhost-startStop-1] org.nutz.ioc.impl.NutIoc@9673638 is closing. startup date [16-08-29 05:44:12.801]
2016-8-29 5:44:13.490 DEBUG [localhost-startStop-1] Depose object 'dao' ...
2016-8-29 5:44:13.491 DEBUG [localhost-startStop-1] Depose object 'dataSource' ...
2016-8-29 5:44:13.490 ERROR [localhost-startStop-1] try to depose ioc
八月 29, 2016 5:44:13 上午 com.alibaba.druid.pool.DruidDataSource info
信息: {dataSource-1} closed
2016-8-29 5:44:13.497 INFO [localhost-startStop-1] org.nutz.ioc.impl.NutIoc@9673638 is deposed. startup date [16-08-29 05:44:12.801]
八月 29, 2016 5:44:13 上午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.dao.DaoException: !Nutz SQL Error: 'SELECT COUNT(*) FROM user '
PreparedStatement: 
'SELECT COUNT(*) FROM user '
CaseMessage=Table 'nutzbook.user' doesn't exist
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	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:990)
	at org.nutz.lang.Lang.wrapThrow(Lang.java:169)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:134)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	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:4583)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	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:745)
Caused by: org.nutz.dao.DaoException: !Nutz SQL Error: 'SELECT COUNT(*) FROM user '
PreparedStatement: 
'SELECT COUNT(*) FROM user '
CaseMessage=Table 'nutzbook.user' doesn't exist
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:96)
	at org.nutz.dao.impl.DaoSupport$DaoExec.invoke(DaoSupport.java:334)
	at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:59)
	at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:257)
	at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:289)
	at org.nutz.dao.impl.NutDao.func(NutDao.java:740)
	at org.nutz.dao.impl.NutDao.func(NutDao.java:721)
	at org.nutz.dao.impl.NutDao._count(NutDao.java:708)
	at org.nutz.dao.impl.NutDao.count(NutDao.java:671)
	at net.wendal.nutzbook.MainSetup.init(MainSetup.java:26)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:276)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:120)
	... 15 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'nutzbook.user' doesn't exist
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
	at com.mysql.jdbc.Util.getInstance(Util.java:387)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2504)
	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1370)
	at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:143)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:199)
	at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:45)
	... 26 more

八月 29, 2016 5:44:13 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
八月 29, 2016 5:44:13 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/nutzbook] startup failed due to previous errors
八月 29, 2016 5:44:13 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
警告: The web application [nutzbook] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
八月 29, 2016 5:44:13 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
警告: The web application [nutzbook] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
八月 29, 2016 5:44:13 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [nutzbook] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
八月 29, 2016 5:44:13 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
八月 29, 2016 5:44:13 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
八月 29, 2016 5:44:13 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 2449 ms

dao.js

var ioc = {
        dataSource : {
            type : "com.alibaba.druid.pool.DruidDataSource",
            events : {
                create : "init",
                depose : 'close'
            },
            fields : {
                url : "jdbc:mysql://127.0.0.1:3306/nutzbook",
                username : "root",
                password : "root",
                testWhileIdle : true,
                validationQuery : "select 1" ,
                maxActive : 100
            }
        },
        dao : {
            type : "org.nutz.dao.impl.NutDao",
            args : [{refer:"dataSource"}]
        }
};

MainSetup.java

package net.wendal.nutzbook;

import java.util.Date;

import org.nutz.dao.Dao;
import org.nutz.dao.util.Daos;
import org.nutz.ioc.Ioc;
import org.nutz.mvc.NutConfig;
import org.nutz.mvc.Setup;

import net.wendal.nutzbook.bean.User;

public class MainSetup implements Setup{

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

	@Override
	public void init(NutConfig conf) {
		Ioc ioc=conf.getIoc();
		Dao dao=ioc.get(Dao.class);
		Daos.createTablesInPackage(dao, "net.wendal.nutzbook", false);
		if(dao.count(User.class)==0){
			User user=new User();
			user.setName("admin");
			user.setPassword("123456");
			user.setCreateTime(new Date());
			user.setUpdateTime(new Date());
			dao.insert(user);
		}
	}

}

MainModule.java

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;
@SetupBy(value=MainSetup.class)
@IocBy(type=ComboIocProvider.class, args={"*js", "ioc/",
        "*anno", "net.wendal.nutzbook","*tx"})
@Modules(scanPackage=true)
public class MainModule {

}

2 回复

User类没加@Table("t_user")

来自炫酷的 NutzCN

@wendal 谢谢,搞定!!!

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