NutzCN Logo
问答 Sqls的setSqlBorning方法
发布于 1511天前 作者 thekingdk 860 次浏览 复制 上一个帖子 下一个帖子
标签:

The method setSqlBorning(Class) in the type Sqls is not applicable for the arguments (Class)

package net.wendal.nutzbook;

import java.util.Date;

import net.wendal.nutzbook.bean.User;

import org.nutz.dao.Dao;
import org.nutz.dao.Sqls;
import org.nutz.dao.util.Daos;
import org.nutz.ioc.Ioc;
import org.nutz.mvc.NutConfig;
import org.nutz.mvc.Setup;
import org.nutz.plugins.sqltpl.impl.beetl.BeetlSqlTpl;

public class MainSetup implements Setup {

	// 特别留意一下,是init方法,不是destroy方法!!!!!
	public void init(NutConfig nc) {
		Ioc ioc = nc.getIoc();
		Dao dao = ioc.get(Dao.class);
		// 如果没有createTablesInPackage,请检查nutz版本
		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);
        }
        Sqls.setSqlBorning(BeetlSqlTpl.class);
	}

	public void destroy(NutConfig nc) {
	}

}
6 回复

需要用最新的快照版

核心包用的nutz-1.r.60.jar,sqltpl用的nutz-plugins-sqltpl-1.r.61.r2.jar,您是说的什么的最新快照版-_-!!

MainSetup init失败 Sqls.setSqlBorning(BeetlSqlTpl.class);
严重: Exception starting filter nutz
java.lang.NoClassDefFoundError: org/beetl/core/ResourceLoader

六月 07, 2017 11:47:15 上午 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Java\jdk1.8.0_73\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\Java\jdk1.8.0_73\jre\bin;D:/Java/jre1.8.0_73/bin/server;D:/Java/jre1.8.0_73/bin;D:/Java/jre1.8.0_73/lib/amd64;C:\ProgramData\Oracle\Java\javapath;D:\Java\jdk1.8.0_73\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Program Files\TortoiseSVN\bin;C:\Program Files\MySQL\MySQL Utilities 1.6\;D:\soft\??????\maven\apache-maven-3.3.3\bin;D:\Program Files\nodejs\;D:\Program Files (x86)\PremiumSoft\Navicat Premium\instantclient_10_2;D:\Program Files\SlikSvn\bin;C:\Users\Administrator\AppData\Roaming\npm;D:\soft\??????\eclipse;;.
六月 07, 2017 11:47:15 上午 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.
六月 07, 2017 11:47:16 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
六月 07, 2017 11:47:16 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
六月 07, 2017 11:47:16 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8099"]
六月 07, 2017 11:47:16 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
六月 07, 2017 11:47:16 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 536 ms
六月 07, 2017 11:47:16 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
六月 07, 2017 11:47:16 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.0.12
六月 07, 2017 11:47:17 上午 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.
2017-06-07 11:47:17,104 org.nutz.mvc.NutFilter._init(NutFilter.java:85) INFO  - NutFilter[nutz] starting ...
2017-06-07 11:47:17,121 org.nutz.resource.Scans.printLocations(Scans.java:521) DEBUG - Locations count=5 time use 6ms
2017-06-07 11:47:17,126 org.nutz.resource.Scans.printLocations(Scans.java:521) DEBUG - Locations count=10 time use 4ms
2017-06-07 11:47:17,213 org.nutz.castor.Castors.reload(Castors.java:115) DEBUG - Using 95 castor for Castors
2017-06-07 11:47:17,224 org.nutz.mvc.config.AbstractNutConfig.createLoading(AbstractNutConfig.java:59) DEBUG - Loading by class org.nutz.mvc.impl.NutLoading
2017-06-07 11:47:17,226 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:55) INFO  - Nutz Version : 1.r.61.r2 2017-04-18 
2017-06-07 11:47:17,226 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:56) INFO  - Nutz.Mvc[nutz] is initializing ...
2017-06-07 11:47:17,226 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:60) DEBUG - Web Container Information:
2017-06-07 11:47:17,227 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:61) DEBUG -  - Default Charset : UTF-8
2017-06-07 11:47:17,227 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:62) DEBUG -  - Current . path  : D:\soft\开发类\eclipse\.
2017-06-07 11:47:17,228 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:63) DEBUG -  - Java Version    : 1.8.0_73
2017-06-07 11:47:17,228 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:64) DEBUG -  - File separator  : \
2017-06-07 11:47:17,228 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:65) DEBUG -  - Timezone        : Asia/Shanghai
2017-06-07 11:47:17,228 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:66) DEBUG -  - OS              : Windows 7 amd64
2017-06-07 11:47:17,228 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:67) DEBUG -  - ServerInfo      : Apache Tomcat/8.0.12
2017-06-07 11:47:17,228 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:68) DEBUG -  - Servlet API     : 3.1
2017-06-07 11:47:17,230 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:73) DEBUG -  - ContextPath     : /nutzbook
2017-06-07 11:47:17,230 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:74) DEBUG -  - context.tempdir : E:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\work\Catalina\localhost\nutzbook
2017-06-07 11:47:17,230 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:75) DEBUG -  - MainModule      : net.wendal.nutzbook.MainModule
2017-06-07 11:47:17,231 org.nutz.mvc.impl.NutLoading.createContext(NutLoading.java:235) DEBUG - >> app.root = E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/nutzbook
2017-06-07 11:47:17,233 org.nutz.mvc.impl.NutLoading.createIoc(NutLoading.java:376) DEBUG - @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "net.wendal.nutzbook", "*tx", "*async"],init=[])
2017-06-07 11:47:17,296 org.nutz.resource.Scans.scan(Scans.java:274) DEBUG - Found 1 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
2017-06-07 11:47:17,296 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:49) DEBUG - loading [dao.js]
2017-06-07 11:47:17,304 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:57) DEBUG - Loaded 3 bean define from path=[ioc/] --> [dao, sqlManager, dataSource]
2017-06-07 11:47:17,313 org.nutz.resource.Scans.scan(Scans.java:274) DEBUG - Found 4 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
2017-06-07 11:47:17,328 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:74) DEBUG - Found @IocBean : class net.wendal.nutzbook.module.UserModule
2017-06-07 11:47:17,355 org.nutz.ioc.loader.annotation.AnnotationIocLoader.<init>(AnnotationIocLoader.java:50) INFO  - Found 1 classes in 1 base-packages!
beans = ["userModule"]
2017-06-07 11:47:17,360 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:40) DEBUG - Loaded 5 bean define from reader --
[txREPEATABLE_READ, txSERIALIZABLE, txNONE, txREAD_UNCOMMITTED, txREAD_COMMITTED]
2017-06-07 11:47:17,385 org.nutz.ioc.aop.SimpleAopMaker.<init>(SimpleAopMaker.java:79) DEBUG - Load AopConfigure for anno=org.nutz.aop.interceptor.async.Async by type=org.nutz.aop.interceptor.async.AsyncAopIocLoader
2017-06-07 11:47:17,390 org.nutz.ioc.impl.NutIoc.<init>(NutIoc.java:98) INFO  - NutIoc init begin ...
2017-06-07 11:47:17,393 org.nutz.ioc.impl.NutIoc.<init>(NutIoc.java:115) INFO  - ... NutIoc init complete
2017-06-07 11:47:17,398 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:159) INFO  - Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2017-06-07 11:47:17,400 org.nutz.mvc.impl.NutLoading.createViewMakers(NutLoading.java:366) DEBUG - @Views(DefaultViewMaker.class)
2017-06-07 11:47:17,408 org.nutz.mvc.impl.NutLoading.createChainMaker(NutLoading.java:263) DEBUG - @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2017-06-07 11:47:17,414 org.nutz.mvc.impl.Loadings.scanModules(Loadings.java:154) DEBUG - module class location 'file:/E:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/nutzbook/WEB-INF/classes/net/wendal/nutzbook/MainModule.class'
2017-06-07 11:47:17,415 org.nutz.mvc.impl.Loadings.scanModuleInPackage(Loadings.java:184) DEBUG -  > scan 'net.wendal.nutzbook'
2017-06-07 11:47:17,416 org.nutz.resource.Scans.scan(Scans.java:274) DEBUG - Found 4 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
2017-06-07 11:47:17,417 org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:199) DEBUG -    >> add 'net.wendal.nutzbook.module.UserModule'
2017-06-07 11:47:17,435 org.nutz.mvc.impl.NutActionChainMaker.getProcessorByName(NutActionChainMaker.java:72) INFO  - Optional processor class not found, disabled : org.nutz.integration.shiro.NutShiroProcessor
2017-06-07 11:47:17,450 org.nutz.mvc.impl.NutActionChainMaker.getProcessorByName(NutActionChainMaker.java:72) INFO  - Optional processor class not found, disabled : org.nutz.plugins.validation.ValidationProcessor
2017-06-07 11:47:17,467 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/'                    >> (UserModule.java:148).index           : void       | @Ok(jsp:jsp.user.list) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-06-07 11:47:17,534 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/add'                 >> (UserModule.java:101).add             : Object     | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-06-07 11:47:17,535 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/count'               >> (UserModule.java:40).count            : int        | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-06-07 11:47:17,535 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/update'              >> (UserModule.java:114).update          : Object     | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-06-07 11:47:17,539 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/delete'              >> (UserModule.java:128).delete          : Object     | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-06-07 11:47:17,544 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/query'               >> (UserModule.java:137).query           : Object     | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-06-07 11:47:17,545 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/login'               >> (UserModule.java:47).login            : Object     | @Ok(json:{locked:'password|salt',ignoreNull:true}) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2017-06-07 11:47:17,546 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/user/logout'              >> (UserModule.java:65).logout           : void       | @Ok(>>:/ ) @Fail(http:500) | by 1 Filters | (I:UTF-8/O:UTF-8)
2017-06-07 11:47:17,546 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:217) INFO  - Found 8 module methods
2017-06-07 11:47:17,547 org.nutz.mvc.impl.NutLoading.evalLocalization(NutLoading.java:331) DEBUG - @Localization not define
2017-06-07 11:47:17,548 org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:271) INFO  - Setup application...
2017-06-07 11:47:17,550 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dao'<interface org.nutz.dao.Dao>
2017-06-07 11:47:17,550 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get '$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2017-06-07 11:47:17,551 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=$aop_async
2017-06-07 11:47:17,552 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) DEBUG - Found IocObject($aop_async) in AsyncAopIocLoader@1320711689
2017-06-07 11:47:17,552 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2017-06-07 11:47:17,553 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object '$aop_async' to [app] 
2017-06-07 11:47:17,557 org.nutz.ioc.aop.SimpleAopMaker.<init>(SimpleAopMaker.java:79) DEBUG - Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
2017-06-07 11:47:17,557 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=dao
2017-06-07 11:47:17,557 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=dao
2017-06-07 11:47:17,560 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) DEBUG - Found IocObject(dao) in JsonLoader(paths=[ioc/])
2017-06-07 11:47:17,560 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'dao'<interface org.nutz.dao.Dao>
2017-06-07 11:47:17,570 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class org.nutz.dao.impl.NutDao without AOP
2017-06-07 11:47:17,570 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'dao' to [app] 
2017-06-07 11:47:17,571 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dataSource'<>
2017-06-07 11:47:17,571 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=dataSource
2017-06-07 11:47:17,571 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=dataSource
2017-06-07 11:47:17,581 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) DEBUG - Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
2017-06-07 11:47:17,581 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'dataSource'<>
2017-06-07 11:47:17,601 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class com.alibaba.druid.pool.DruidDataSource without AOP
2017-06-07 11:47:17,601 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'dataSource' to [app] 
2017-06-07 11:47:17,885 com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:715) INFO  - {dataSource-1} inited
2017-06-07 11:47:17,885 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'dataSource'<>
2017-06-07 11:47:17,993 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:23) INFO  - Init file-pool by: C:\Users\Administrator/.nutz/tmp/dao/ [200000]
2017-06-07 11:47:17,993 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:37) DEBUG - file-pool.home: 'C:\Users\Administrator\.nutz\tmp\dao'
2017-06-07 11:47:17,994 org.nutz.filepool.NutFilePool.<init>(NutFilePool.java:66) INFO  - file-pool.cursor: 0
2017-06-07 11:47:18,163 org.nutz.dao.jdbc.Jdbcs.<clinit>(Jdbcs.java:90) DEBUG - Jdbcs init complete
2017-06-07 11:47:18,164 org.nutz.dao.jdbc.Jdbcs.getExpert(Jdbcs.java:103) INFO  - Get Connection from DataSource for JdbcExpert, if you lock at here, check your database server and configure
Wed Jun 07 11:47:18 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2017-06-07 11:47:18,374 org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:189) DEBUG - select expert : org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert
2017-06-07 11:47:18,380 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:200) DEBUG - JDBC Driver --> mysql-connector-java-5.1.40 ( Revision: 402933ef52cad9aa82624e80acbea46e3a701ce6 )
2017-06-07 11:47:18,380 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:201) DEBUG - JDBC Name   --> MySQL Connector Java
2017-06-07 11:47:18,380 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:203) DEBUG - JDBC URL    --> jdbc:mysql://127.0.0.1:3306/mydemo
2017-06-07 11:47:18,397 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_client=utf8
2017-06-07 11:47:18,398 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_connection=utf8
2017-06-07 11:47:18,398 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_database=utf8
2017-06-07 11:47:18,398 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_filesystem=binary
2017-06-07 11:47:18,398 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_results=
2017-06-07 11:47:18,398 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_server=utf8
2017-06-07 11:47:18,398 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_set_system=utf8
2017-06-07 11:47:18,398 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:212) DEBUG - Mysql : character_sets_dir=C:\Program Files\MySQL\MySQL Server 5.7\share\charsets\
2017-06-07 11:47:18,401 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:219) DEBUG - Mysql : binlog_format=ROW
2017-06-07 11:47:18,402 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:226) DEBUG - Mysql : database=mydemo
2017-06-07 11:47:18,403 org.nutz.dao.impl.jdbc.mysql.MysqlJdbcExpert.checkDataSource(MysqlJdbcExpert.java:232) DEBUG - Mysql : user=root@localhost
2017-06-07 11:47:18,415 org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:222) DEBUG - Database info --> MYSQL:[MySQL - 5.7.17-log]
2017-06-07 11:47:18,419 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:151) DEBUG - Get 'sqlManager'<>
2017-06-07 11:47:18,419 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:177) DEBUG - 	 >> Load definition name=sqlManager
2017-06-07 11:47:18,419 org.nutz.ioc.loader.map.MapLoader.load(MapLoader.java:67) DEBUG - Loading define for name=sqlManager
2017-06-07 11:47:18,420 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) DEBUG - Found IocObject(sqlManager) in JsonLoader(paths=[ioc/])
2017-06-07 11:47:18,420 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209) DEBUG - 	 >> Make...'sqlManager'<>
2017-06-07 11:47:18,422 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:70) DEBUG - Load class org.nutz.dao.impl.FileSqlManager without AOP
2017-06-07 11:47:18,422 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:64) DEBUG - Save object 'sqlManager' to [app] 
2017-06-07 11:47:18,432 org.nutz.resource.Scans.scan(Scans.java:274) DEBUG - Found 1 resource by src( mapper/test.sqls ) , regex( .(sql|sqlx|sqls)$ )
2017-06-07 11:47:18,432 org.nutz.dao.impl.FileSqlManager.refresh(FileSqlManager.java:52) DEBUG - load >> test.sqls from root=mapper/test.sqls
2017-06-07 11:47:18,432 org.nutz.dao.impl.FileSqlManager.addSql(FileSqlManager.java:158) DEBUG - key=[user.fetch], sql=[select * from t_user
#if ( $params.size() > 0 )
where
#if( $!name != "" && $!passwd != "")
name = @name
and passwd = @passwd
#else
token = @token
#end
#end]
2017-06-07 11:47:18,433 org.nutz.dao.impl.FileSqlManager.refresh(FileSqlManager.java:59) DEBUG - load 1 sql >> test.sqls from root=mapper/test.sqls
2017-06-07 11:47:18,434 org.nutz.dao.impl.DaoSupport.setSqlManager(DaoSupport.java:122) DEBUG - SqlManager Sql count=1
2017-06-07 11:47:18,435 org.nutz.resource.Scans.scan(Scans.java:274) DEBUG - Found 4 resource by src( net/wendal/nutzbook/ ) , regex( ^.+[.]class$ )
2017-06-07 11:47:18,477 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) DEBUG - SELECT COUNT(*) FROM t_user 
六月 07, 2017 11:47:18 上午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
java.lang.NoClassDefFoundError: org/beetl/core/ResourceLoader
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
	at java.lang.Class.getConstructors(Class.java:1651)
	at org.nutz.lang.born.Borns.evalWithArgTypes(Borns.java:131)
	at org.nutz.lang.born.Borns.evalByArgTypes(Borns.java:35)
	at org.nutz.lang.Mirror.getBorningByArgTypes(Mirror.java:972)
	at org.nutz.dao.Sqls.setSqlBorning(Sqls.java:44)
	at net.wendal.nutzbook.MainSetup.init(MainSetup.java:32)
	at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:274)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:121)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4594)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5201)
	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: java.lang.ClassNotFoundException: org.beetl.core.ResourceLoader
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1320)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1173)
	... 25 more

六月 07, 2017 11:47:18 上午 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
六月 07, 2017 11:47:18 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/nutzbook] startup failed due to previous errors
六月 07, 2017 11:47:18 上午 org.apache.catalina.loader.WebappClassLoader 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.
六月 07, 2017 11:47:18 上午 org.apache.catalina.loader.WebappClassLoader 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.
六月 07, 2017 11:47:18 上午 org.apache.catalina.loader.WebappClassLoader 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)
六月 07, 2017 11:47:18 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
警告: The web application [/nutzbook] appears to have started a thread named [Druid-ConnectionPool-Create-614183912] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
 com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:1977)
六月 07, 2017 11:47:18 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
警告: The web application [/nutzbook] appears to have started a thread named [Druid-ConnectionPool-Destroy-614183912] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Thread.sleep(Native Method)
 com.alibaba.druid.pool.DruidDataSource$DestroyConnectionThread.run(DruidDataSource.java:2070)
六月 07, 2017 11:47:18 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
六月 07, 2017 11:47:18 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8099"]
六月 07, 2017 11:47:18 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 2482 ms

需要beetl.jar哦

然后还需要antlr4-runtime-4.7.jar
多谢多谢多谢指点~~~~~~~~~~~~~

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