NutzCN Logo
问答 大神这个是什么问题啊貌似是dao.js错了 但是又不知道哪里错了 正在学习的路上
发布于 555天前 作者 十戒 460 次浏览 复制 上一个帖子 下一个帖子
标签:

17-03-14 11:22:15.880 ERROR [localhost-startStop-1] Error happend during start serivce!
org.nutz.ioc.IocException: [dao] # For object [dao] - type:[interface org.nutz.dao.Dao]
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:218)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:146)
at nutz.setup.NutzSetup.init(NutzSetup.java:22)
at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:277)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
at org.nutz.mvc.ActionHandler.(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.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5633)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.nutz.ioc.ObjectLoadException: Object 'dao' without define!
at org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:174)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:180)
... 20 more

var ioc = {
dataSource : {
type : "com.alibaba.druid.pool.DruidDataSource",
events : {
create : "init",
depose : 'close'
},
fields : {
url : "jdbc:mysql://127.0.0.1:3306/test",
username : "root",
password : "123",
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"}]
}
};

12 回复

启动日志发一下

2017-3-14 11:33:6.286 DEBUG [localhost-startStop-1] Found 0 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
2017-3-14 11:33:6.287 DEBUG [localhost-startStop-1] Loaded 5 bean define from reader --
[txREPEATABLE_READ, txREAD_COMMITTED, txNONE, txSERIALIZABLE, txREAD_UNCOMMITTED]
2017-3-14 11:33:6.292 DEBUG [localhost-startStop-1] Load AopConfigure for anno=org.nutz.aop.interceptor.async.Async by type=org.nutz.aop.interceptor.async.AsyncAopIocLoader
2017-3-14 11:33:6.296 INFO [localhost-startStop-1] NutIoc init begin ...
2017-3-14 11:33:6.300 INFO [localhost-startStop-1] ... NutIoc init complete
2017-3-14 11:33:6.306 INFO [localhost-startStop-1] Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2017-3-14 11:33:6.309 DEBUG [localhost-startStop-1] @Views(DefaultViewMaker.class)
2017-3-14 11:33:6.320 DEBUG [localhost-startStop-1] @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2017-3-14 11:33:6.335 DEBUG [localhost-startStop-1] module class location 'file:/D:/java/work/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/nutz/WEB-INF/classes/'
2017-3-14 11:33:6.335 DEBUG [localhost-startStop-1] > scan 'nutz.setup'
2017-3-14 11:33:6.339 DEBUG [localhost-startStop-1] Found 2 resource by src( nutz/setup/ ) , regex( ^.+[.]class$ )
2017-3-14 11:33:6.343 DEBUG [localhost-startStop-1] @Localization not define
2017-3-14 11:33:6.344 INFO [localhost-startStop-1] Setup application...
2017-3-14 11:33:6.346 DEBUG [localhost-startStop-1] Get 'dao'<interface org.nutz.dao.Dao>
2017-3-14 11:33:6.346 DEBUG [localhost-startStop-1] Get '$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2017-3-14 11:33:6.348 DEBUG [localhost-startStop-1] >> Load definition name=$aop_async
2017-3-14 11:33:6.355 DEBUG [localhost-startStop-1] Found IocObject($aop_async) in AsyncAopIocLoader@18724493
2017-3-14 11:33:6.355 DEBUG [localhost-startStop-1] >> Make...'$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2017-3-14 11:33:6.358 DEBUG [localhost-startStop-1] Save object '$aop_async' to [app]
2017-3-14 11:33:6.367 DEBUG [localhost-startStop-1] Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
2017-3-14 11:33:6.368 DEBUG [localhost-startStop-1] >> Load definition name=dao
2017-3-14 11:33:6.368 DEBUG [localhost-startStop-1] Loading define for name=dao
2017-3-14 11:33:6.375 DEBUG [localhost-startStop-1] Found IocObject(dao) in JsonLoader(paths=[ioc/])
2017-3-14 11:33:6.376 DEBUG [localhost-startStop-1] >> Make...'dao'<interface org.nutz.dao.Dao>
2017-3-14 11:33:6.397 DEBUG [localhost-startStop-1] Load class org.nutz.dao.impl.NutDao without AOP
2017-3-14 11:33:6.397 DEBUG [localhost-startStop-1] Save object 'dao' to [app]
2017-3-14 11:33:6.399 DEBUG [localhost-startStop-1] Get 'dataSource'<>
2017-3-14 11:33:6.399 DEBUG [localhost-startStop-1] >> Load definition name=dataSource
2017-3-14 11:33:6.399 DEBUG [localhost-startStop-1] Loading define for name=dataSource
2017-3-14 11:33:6.409 DEBUG [localhost-startStop-1] Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
2017-3-14 11:33:6.410 DEBUG [localhost-startStop-1] >> Make...'dataSource'<>
2017-3-14 11:33:6.426 DEBUG [localhost-startStop-1] Load class com.alibaba.druid.pool.DruidDataSource without AOP
2017-3-14 11:33:6.426 DEBUG [localhost-startStop-1] Save object 'dataSource' to [app]
2017-3-14 11:33:6.488 DEBUG [localhost-startStop-1] Remove object 'dataSource' from [app]
2017-3-14 11:33:6.489 DEBUG [localhost-startStop-1] Remove object 'dao' from [app]

按照那个30分钟把项目跑起来 那个里面写的

前面还有日志,贴完整啊.

按 "回复"按钮旁边的 "插入代码或日志片段" 啊啊啊啊啊

2017-3-14 11:33:5.612 INFO [localhost-startStop-1] Select SystemLog as Nutz.Log implement
2017-3-14 11:33:5.621 INFO [localhost-startStop-1] NutFilter[nutz] starting ...
2017-3-14 11:33:5.884 DEBUG [localhost-startStop-1] Locations for Scans:
[Dir[path=D:\java\eclipse], Jar[path=D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\nutz-1.r.60.jar], Jar[path=D:\java\tomcat7\bin\bootstrap.jar], Jar[path=D:\java\tomcat7\bin\tomcat-juli.jar], Jar[path=D:\java\jdk7\lib\tools.jar]]
2017-3-14 11:33:6.36 DEBUG [localhost-startStop-1] Locations for Scans:
{D:\java\eclipse=Dir[path=D:\java\eclipse], D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\nutz-1.r.60.jar=Jar[path=D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\nutz-1.r.60.jar], D:\java\tomcat7\bin\bootstrap.jar=Jar[path=D:\java\tomcat7\bin\bootstrap.jar], D:\java\tomcat7\bin\tomcat-juli.jar=Jar[path=D:\java\tomcat7\bin\tomcat-juli.jar], D:\java\jdk7\lib\tools.jar=Jar[path=D:\java\jdk7\lib\tools.jar], D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\classes=Dir[path=D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\classes], D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\h2-1.3.154.jar=Jar[path=D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\h2-1.3.154.jar], D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\druid-0.2.2.jar=Jar[path=D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\druid-0.2.2.jar], D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\commons-logging-1.1.1.jar=Jar[path=D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\commons-logging-1.1.1.jar]}
2017-3-14 11:33:6.178 DEBUG [localhost-startStop-1] Using 95 castor for Castors
2017-3-14 11:33:6.201 DEBUG [localhost-startStop-1] Loading by class org.nutz.mvc.impl.NutLoading
2017-3-14 11:33:6.204 INFO [localhost-startStop-1] Nutz Version : 1.r.60 
2017-3-14 11:33:6.205 INFO [localhost-startStop-1] Nutz.Mvc[nutz] is initializing ...
2017-3-14 11:33:6.205 DEBUG [localhost-startStop-1] Web Container Information:
2017-3-14 11:33:6.207 DEBUG [localhost-startStop-1]  - Default Charset : UTF-8
2017-3-14 11:33:6.207 DEBUG [localhost-startStop-1]  - Current . path  : D:\java\eclipse\.
2017-3-14 11:33:6.208 DEBUG [localhost-startStop-1]  - Java Version    : 1.7.0_80
2017-3-14 11:33:6.208 DEBUG [localhost-startStop-1]  - File separator  : \
2017-3-14 11:33:6.208 DEBUG [localhost-startStop-1]  - Timezone        : Asia/Shanghai
2017-3-14 11:33:6.209 DEBUG [localhost-startStop-1]  - OS              : Windows 7 amd64
2017-3-14 11:33:6.209 DEBUG [localhost-startStop-1]  - ServerInfo      : Apache Tomcat/7.0.70
2017-3-14 11:33:6.209 DEBUG [localhost-startStop-1]  - Servlet API     : 3.0
2017-3-14 11:33:6.210 DEBUG [localhost-startStop-1]  - ContextPath     : /nutz
2017-3-14 11:33:6.211 DEBUG [localhost-startStop-1]  - context.tempdir : D:\java\work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\nutz
2017-3-14 11:33:6.211 DEBUG [localhost-startStop-1]  - MainModule      : nutz.setup.MainModule
2017-3-14 11:33:6.213 DEBUG [localhost-startStop-1] >> app.root = D:/java/work/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/nutz
2017-3-14 11:33:6.218 DEBUG [localhost-startStop-1] @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "net.wendal.nutzbook", "*tx", "*async"],init=[])
2017-3-14 11:33:6.271 DEBUG [localhost-startStop-1] Found 1 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
2017-3-14 11:33:6.272 DEBUG [localhost-startStop-1] loading ioc js config from [dao.js]
2017-3-14 11:33:6.280 DEBUG [localhost-startStop-1] Loaded 2 bean define from path=[ioc/] --> [dataSource, dao]
17-03-14 11:33:06.286 WARN [localhost-startStop-1] NONE Annotation-Class found!! Check your ioc configure!! packages=[net.wendal.nutzbook]
17-03-14 11:33:06.340 WARN [localhost-startStop-1] None module classes found!!!
17-03-14 11:33:06.341 WARN [localhost-startStop-1] None @At found in any modules class!!
2017-3-14 11:33:6.286 DEBUG [localhost-startStop-1] Found 0 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
2017-3-14 11:33:6.287 DEBUG [localhost-startStop-1] Loaded 5 bean define from reader --
[txREPEATABLE_READ, txREAD_COMMITTED, txNONE, txSERIALIZABLE, txREAD_UNCOMMITTED]
2017-3-14 11:33:6.292 DEBUG [localhost-startStop-1] Load AopConfigure for anno=org.nutz.aop.interceptor.async.Async by type=org.nutz.aop.interceptor.async.AsyncAopIocLoader
2017-3-14 11:33:6.296 INFO [localhost-startStop-1] NutIoc init begin ...
2017-3-14 11:33:6.300 INFO [localhost-startStop-1] ... NutIoc init complete
2017-3-14 11:33:6.306 INFO [localhost-startStop-1] Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2017-3-14 11:33:6.309 DEBUG [localhost-startStop-1] @Views(DefaultViewMaker.class)
2017-3-14 11:33:6.320 DEBUG [localhost-startStop-1] @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2017-3-14 11:33:6.335 DEBUG [localhost-startStop-1] module class location 'file:/D:/java/work/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/nutz/WEB-INF/classes/'
2017-3-14 11:33:6.335 DEBUG [localhost-startStop-1]  > scan 'nutz.setup'
2017-3-14 11:33:6.339 DEBUG [localhost-startStop-1] Found 2 resource by src( nutz/setup/ ) , regex( ^.+[.]class$ )
2017-3-14 11:33:6.343 DEBUG [localhost-startStop-1] @Localization not define
2017-3-14 11:33:6.344 INFO [localhost-startStop-1] Setup application...
2017-3-14 11:33:6.346 DEBUG [localhost-startStop-1] Get 'dao'<interface org.nutz.dao.Dao>
2017-3-14 11:33:6.346 DEBUG [localhost-startStop-1] Get '$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2017-3-14 11:33:6.348 DEBUG [localhost-startStop-1] 	 >> Load definition name=$aop_async
2017-3-14 11:33:6.355 DEBUG [localhost-startStop-1] Found IocObject($aop_async) in AsyncAopIocLoader@18724493
2017-3-14 11:33:6.355 DEBUG [localhost-startStop-1] 	 >> Make...'$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2017-3-14 11:33:6.358 DEBUG [localhost-startStop-1] Save object '$aop_async' to [app] 
2017-3-14 11:33:6.367 DEBUG [localhost-startStop-1] Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
2017-3-14 11:33:6.368 DEBUG [localhost-startStop-1] 	 >> Load definition name=dao
2017-3-14 11:33:6.368 DEBUG [localhost-startStop-1] Loading define for name=dao
2017-3-14 11:33:6.375 DEBUG [localhost-startStop-1] Found IocObject(dao) in JsonLoader(paths=[ioc/])
2017-3-14 11:33:6.376 DEBUG [localhost-startStop-1] 	 >> Make...'dao'<interface org.nutz.dao.Dao>
2017-3-14 11:33:6.397 DEBUG [localhost-startStop-1] Load class org.nutz.dao.impl.NutDao without AOP
2017-3-14 11:33:6.397 DEBUG [localhost-startStop-1] Save object 'dao' to [app] 
2017-3-14 11:33:6.399 DEBUG [localhost-startStop-1] Get 'dataSource'<>
2017-3-14 11:33:6.399 DEBUG [localhost-startStop-1] 	 >> Load definition name=dataSource
2017-3-14 11:33:6.399 DEBUG [localhost-startStop-1] Loading define for name=dataSource
2017-3-14 11:33:6.409 DEBUG [localhost-startStop-1] Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
2017-3-14 11:33:6.410 DEBUG [localhost-startStop-1] 	 >> Make...'dataSource'<>
2017-3-14 11:33:6.426 DEBUG [localhost-startStop-1] Load class com.alibaba.druid.pool.DruidDataSource without AOP
2017-3-14 11:33:6.426 DEBUG [localhost-startStop-1] Save object 'dataSource' to [app] 
2017-3-14 11:33:6.488 DEBUG [localhost-startStop-1] Remove object 'dataSource' from [app] 
2017-3-14 11:33:6.489 DEBUG [localhost-startStop-1] Remove object 'dao' from [app] 

为啥我还是觉得贴少了东西?? "Remove object 'dao' from" 后面应该有东西呢, 完整贴,全部贴!!

话说这个druid版本好老啊 D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\druid-0.2.2.jar

换最新的 1.0.27

三月 14, 2017 11:43:08 上午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:nutz' did not find a matching property.
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/7.0.70
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Jun 15 2016 16:27:45 UTC
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 7.0.70.0
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: D:\java\jdk7\jre
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.7.0_80-b15
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: D:\java\tomcat7
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Xms256M
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Xmx1024M
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -XX:PermSize=64M
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -XX:MaxPermSize=128M
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\java\tomcat7
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\java\tomcat7\endorsed
三月 14, 2017 11:43:08 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
三月 14, 2017 11:43:08 上午 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: D:\java\jdk7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/java/jdk7/bin/../jre/bin/server;D:/java/jdk7/bin/../jre/bin;D:/java/jdk7/bin/../jre/lib/amd64;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\java\jdk7\bin;D:\java\eclipse;;.
三月 14, 2017 11:43:09 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
三月 14, 2017 11:43:09 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
三月 14, 2017 11:43:09 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1367 ms
三月 14, 2017 11:43:09 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
三月 14, 2017 11:43:09 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.70
三月 14, 2017 11:43:10 上午 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.
2017-3-14 11:43:11.11 INFO [localhost-startStop-1] Select SystemLog as Nutz.Log implement
2017-3-14 11:43:11.20 INFO [localhost-startStop-1] NutFilter[nutz] starting ...
2017-3-14 11:43:11.281 DEBUG [localhost-startStop-1] Locations for Scans:
[Dir[path=D:\java\eclipse], Jar[path=D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\nutz-1.r.60.jar], Jar[path=D:\java\tomcat7\bin\bootstrap.jar], Jar[path=D:\java\tomcat7\bin\tomcat-juli.jar], Jar[path=D:\java\jdk7\lib\tools.jar]]
2017-3-14 11:43:11.389 DEBUG [localhost-startStop-1] Locations for Scans:
{D:\java\eclipse=Dir[path=D:\java\eclipse], D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\nutz-1.r.60.jar=Jar[path=D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\nutz-1.r.60.jar], D:\java\tomcat7\bin\bootstrap.jar=Jar[path=D:\java\tomcat7\bin\bootstrap.jar], D:\java\tomcat7\bin\tomcat-juli.jar=Jar[path=D:\java\tomcat7\bin\tomcat-juli.jar], D:\java\jdk7\lib\tools.jar=Jar[path=D:\java\jdk7\lib\tools.jar], D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\classes=Dir[path=D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\classes], D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\h2-1.3.154.jar=Jar[path=D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\h2-1.3.154.jar], D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\druid-0.2.2.jar=Jar[path=D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\druid-0.2.2.jar], D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\commons-logging-1.1.1.jar=Jar[path=D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\nutz\WEB-INF\lib\commons-logging-1.1.1.jar]}
2017-3-14 11:43:11.501 DEBUG [localhost-startStop-1] Using 95 castor for Castors
2017-3-14 11:43:11.523 DEBUG [localhost-startStop-1] Loading by class org.nutz.mvc.impl.NutLoading
2017-3-14 11:43:11.527 INFO [localhost-startStop-1] Nutz Version : 1.r.60
2017-3-14 11:43:11.527 INFO [localhost-startStop-1] Nutz.Mvc[nutz] is initializing ...
2017-3-14 11:43:11.527 DEBUG [localhost-startStop-1] Web Container Information:
2017-3-14 11:43:11.529 DEBUG [localhost-startStop-1] - Default Charset : UTF-8
2017-3-14 11:43:11.530 DEBUG [localhost-startStop-1] - Current . path : D:\java\eclipse.
2017-3-14 11:43:11.530 DEBUG [localhost-startStop-1] - Java Version : 1.7.0_80
2017-3-14 11:43:11.530 DEBUG [localhost-startStop-1] - File separator : \
2017-3-14 11:43:11.531 DEBUG [localhost-startStop-1] - Timezone : Asia/Shanghai
2017-3-14 11:43:11.531 DEBUG [localhost-startStop-1] - OS : Windows 7 amd64
2017-3-14 11:43:11.531 DEBUG [localhost-startStop-1] - ServerInfo : Apache Tomcat/7.0.70
2017-3-14 11:43:11.532 DEBUG [localhost-startStop-1] - Servlet API : 3.0
2017-3-14 11:43:11.533 DEBUG [localhost-startStop-1] - ContextPath : /nutz
2017-3-14 11:43:11.533 DEBUG [localhost-startStop-1] - context.tempdir : D:\java\work.metadata.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\nutz
2017-3-14 11:43:11.534 DEBUG [localhost-startStop-1] - MainModule : nutz.setup.MainModule
2017-3-14 11:43:11.535 DEBUG [localhost-startStop-1] >> app.root = D:/java/work/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/nutz
2017-3-14 11:43:11.540 DEBUG [localhost-startStop-1] @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "net.wendal.nutzbook", "*tx", "*async"],init=[])
17-03-14 11:43:11.595 WARN [localhost-startStop-1] NONE Annotation-Class found!! Check your ioc configure!! packages=[net.wendal.nutzbook]
17-03-14 11:43:11.647 WARN [localhost-startStop-1] None module classes found!!!
17-03-14 11:43:11.648 WARN [localhost-startStop-1] None @At found in any modules class!!
2017-3-14 11:43:11.579 DEBUG [localhost-startStop-1] Found 1 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
2017-3-14 11:43:11.580 DEBUG [localhost-startStop-1] loading ioc js config from [dao.js]
2017-3-14 11:43:11.587 DEBUG [localhost-startStop-1] Loaded 2 bean define from path=[ioc/] --> [dataSource, dao]
2017-3-14 11:43:11.595 DEBUG [localhost-startStop-1] Found 0 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
2017-3-14 11:43:11.597 DEBUG [localhost-startStop-1] Loaded 5 bean define from reader --
[txREPEATABLE_READ, txREAD_COMMITTED, txNONE, txSERIALIZABLE, txREAD_UNCOMMITTED]
2017-3-14 11:43:11.600 DEBUG [localhost-startStop-1] Load AopConfigure for anno=org.nutz.aop.interceptor.async.Async by type=org.nutz.aop.interceptor.async.AsyncAopIocLoader
2017-3-14 11:43:11.604 INFO [localhost-startStop-1] NutIoc init begin ...
2017-3-14 11:43:11.608 INFO [localhost-startStop-1] ... NutIoc init complete
2017-3-14 11:43:11.614 INFO [localhost-startStop-1] Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2017-3-14 11:43:11.618 DEBUG [localhost-startStop-1] @Views(DefaultViewMaker.class)
2017-3-14 11:43:11.628 DEBUG [localhost-startStop-1] @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2017-3-14 11:43:11.642 DEBUG [localhost-startStop-1] module class location 'file:/D:/java/work/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/nutz/WEB-INF/classes/'
2017-3-14 11:43:11.643 DEBUG [localhost-startStop-1] > scan 'nutz.setup'
2017-3-14 11:43:11.646 DEBUG [localhost-startStop-1] Found 2 resource by src( nutz/setup/ ) , regex( ^.+[.]class$ )
2017-3-14 11:43:11.649 DEBUG [localhost-startStop-1] @Localization not define
2017-3-14 11:43:11.650 INFO [localhost-startStop-1] Setup application...
2017-3-14 11:43:11.652 DEBUG [localhost-startStop-1] Get 'dao'<interface org.nutz.dao.Dao>
2017-3-14 11:43:11.652 DEBUG [localhost-startStop-1] Get '$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2017-3-14 11:43:11.654 DEBUG [localhost-startStop-1] >> Load definition name=$aop_async
2017-3-14 11:43:11.662 DEBUG [localhost-startStop-1] Found IocObject($aop_async) in AsyncAopIocLoader@438580455
2017-3-14 11:43:11.662 DEBUG [localhost-startStop-1] >> Make...'$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2017-3-14 11:43:11.664 DEBUG [localhost-startStop-1] Save object '$aop_async' to [app]
2017-3-14 11:43:11.674 DEBUG [localhost-startStop-1] Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
2017-3-14 11:43:11.674 DEBUG [localhost-startStop-1] >> Load definition name=dao
2017-3-14 11:43:11.674 DEBUG [localhost-startStop-1] Loading define for name=dao
2017-3-14 11:43:11.679 DEBUG [localhost-startStop-1] Found IocObject(dao) in JsonLoader(paths=[ioc/])
2017-3-14 11:43:11.680 DEBUG [localhost-startStop-1] >> Make...'dao'<interface org.nutz.dao.Dao>
2017-3-14 11:43:11.702 DEBUG [localhost-startStop-1] Load class org.nutz.dao.impl.NutDao without AOP
2017-3-14 11:43:11.703 DEBUG [localhost-startStop-1] Save object 'dao' to [app]
2017-3-14 11:43:11.704 DEBUG [localhost-startStop-1] Get 'dataSource'<>
2017-3-14 11:43:11.705 DEBUG [localhost-startStop-1] >> Load definition name=dataSource
2017-3-14 11:43:11.705 DEBUG [localhost-startStop-1] Loading define for name=dataSource
2017-3-14 11:43:11.716 DEBUG [localhost-startStop-1] Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
2017-3-14 11:43:11.716 DEBUG [localhost-startStop-1] >> Make...'dataSource'<>
2017-3-14 11:43:11.733 DEBUG [localhost-startStop-1] Load class com.alibaba.druid.pool.DruidDataSource without AOP
2017-3-14 11:43:11.734 DEBUG [localhost-startStop-1] Save object 'dataSource' to [app]
2017-3-14 11:43:11.784 DEBUG [localhost-startStop-1] Remove object 'dataSource' from [app]
17-03-14 11:43:11.786 ERROR [localhost-startStop-1] Error happend during start serivce!
org.nutz.ioc.IocException: [dao, dataSource] # FAIL to create Ioc Bean name=[dataSource]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:75)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:146)
at nutz.setup.NutzSetup.init(NutzSetup.java:22)
at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:277)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
at org.nutz.mvc.ActionHandler.(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.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5633)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.sql.SQLException: com.mysql.jdbc.Driver
at org.nutz.lang.Lang.wrapThrow(Lang.java:181)
at org.nutz.lang.Lang.wrapThrow(Lang.java:180)
at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:21)
at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:72)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
... 24 more
Caused by: java.sql.SQLException: com.mysql.jdbc.Driver
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:484)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:18)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1891)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1734)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:195)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:478)
... 32 more
17-03-14 11:43:11.788 ERROR [localhost-startStop-1] try to depose ioc
三月 14, 2017 11:43:11 上午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.LoadingException: org.nutz.ioc.IocException: [dao, dataSource] # FAIL to create Ioc Bean name=[dataSource]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
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:197)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:135)
at org.nutz.mvc.ActionHandler.(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.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5633)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.nutz.ioc.IocException: [dao, dataSource] # FAIL to create Ioc Bean name=[dataSource]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:75)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:146)
at nutz.setup.NutzSetup.init(NutzSetup.java:22)
at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:277)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
... 15 more
Caused by: java.lang.RuntimeException: java.sql.SQLException: com.mysql.jdbc.Driver
at org.nutz.lang.Lang.wrapThrow(Lang.java:181)
at org.nutz.lang.Lang.wrapThrow(Lang.java:180)
at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:21)
at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:72)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
... 24 more
Caused by: java.sql.SQLException: com.mysql.jdbc.Driver
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:484)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:18)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1891)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1734)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:195)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:478)
... 32 more

三月 14, 2017 11:43:11 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
三月 14, 2017 11:43:11 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/nutz] startup failed due to previous errors
三月 14, 2017 11:43:11 上午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
严重: The web application [/nutz] 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.
三月 14, 2017 11:43:11 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
2017-3-14 11:43:11.785 DEBUG [localhost-startStop-1] Remove object 'dao' from [app]
2017-3-14 11:43:11.789 INFO [localhost-startStop-1] org.nutz.ioc.impl.NutIoc@497354641 is closing. startup date [17-03-14 11:43:11.605]
2017-3-14 11:43:11.789 DEBUG [localhost-startStop-1] Depose object '$aop_async' ...
2017-3-14 11:43:11.790 INFO [localhost-startStop-1] org.nutz.ioc.impl.NutIoc@497354641 is deposed. startup date [17-03-14 11:43:11.605]
三月 14, 2017 11:43:11 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
三月 14, 2017 11:43:11 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 2683 ms

```

Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

mysql驱动没加

话说, 这报错跟你最初贴的不一样啊...

感谢大神。我少看了一步 基本准备。。

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