贴文本,用菜单里面的代码工具
来自炫酷的 NutzCN
org.nutz.dao.DaoException: java.lang.ClassCastException: org.nutz.plugins.cache.dao.NSqlAdapter cannot be cast to com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor
at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:49)
at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:250)
at org.nutz.dao.impl.DaoSupport$DaoExec.run(DaoSupport.java:317)
at org.nutz.trans.Trans.exec(Trans.java:174)
at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:287)
at org.nutz.dao.impl.DaoSupport.execute(DaoSupport.java:246)
at org.nutz.dao.impl.jdbc.oracle.OracleJdbcExpert.createEntity(OracleJdbcExpert.java:132)
at org.nutz.dao.impl.EntityHolder.reloadEntity(EntityHolder.java:85)
at org.nutz.dao.impl.NutDao.create(NutDao.java:784)
at org.nutz.dao.util.Daos.createTablesInPackage(Daos.java:543)
at cn.wizzer.modules.MainSetup.initSysData(MainSetup.java:71)
at cn.wizzer.modules.MainSetup.init(MainSetup.java:37)
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.(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:4689)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5329)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: org.nutz.plugins.cache.dao.NSqlAdapter cannot be cast to com.alibaba.druid.sql.dialect.oracle.visitor.OracleASTVisitor
at com.alibaba.druid.sql.dialect.oracle.ast.stmt.OracleCreateTableStatement.accept0(OracleCreateTableStatement.java:201)
at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:41)
at org.nutz.plugins.cache.dao.CachedNutDaoExecutor.exec(CachedNutDaoExecutor.java:122)
at org.nutz.dao.impl.DaoSupport$DaoExec.invoke(DaoSupport.java:327)
at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:38)
... 28 more
dataSource : {
type : "com.alibaba.druid.pool.DruidDataSource",
events : {
create : "init",
depose : 'close'
},
fields : {
driverClassName : {java:"$conf.get('db.driverClassName')"},
url : {java:"$conf.get('db.url')"},
username : {java:"$conf.get('db.username')"},
password : {java:"$conf.get('db.password')"},
testWhileIdle : true,
validationQuery : {java:"$conf.get('db.validationQuery')"},
maxActive : {java:"$conf.get('db.maxActive')"},
filters : "mergeStat",
connectionProperties : "druid.stat.slowSqlMillis=1000",
}
},
//db.properties
Oracle 12c
db.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
db.driverClassName=oracle.jdbc.driver.OracleDriver
db.username=C##mike
db.password=mike
db.testWhileIdle=false
db.validationQuery=SELECT 1 FROM DUAL
db.maxActive=20
db.maxWait=10000
db.minIdle=1
db.maxIdle=20