NutzCN Logo
问答 求助:部署nutz工程,启动报Ioc错误
发布于 2771天前 作者 suwandon 1708 次浏览 复制 上一个帖子 下一个帖子
标签:

四月 15, 2017 11:41:57 上午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
java.lang.NoClassDefFoundError: Ioc
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetPublicMethods(Class.java:2902)
at java.lang.Class.getMethods(Class.java:1615)
at com.zeroturnaround.javarebel.gw.b(JRebel:470)
at com.zeroturnaround.javarebel.gw.a(JRebel:188)
at com.zeroturnaround.javarebel.gw.getMethods(JRebel:619)
at java.lang.Class.getMethods(Class.java)
at org.nutz.mvc.impl.Loadings.isModule(Loadings.java:331)
at org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:196)
at org.nutz.mvc.impl.Loadings.scanModuleInPackage(Loadings.java:187)
at org.nutz.mvc.impl.Loadings.scanModules(Loadings.java:144)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:180)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
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:4590)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5233)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
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: Ioc
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
... 29 more

四月 15, 2017 11:41:57 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
四月 15, 2017 11:41:57 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/174wxgzh] startup failed due to previous errors
四月 15, 2017 11:41:57 上午 org.apache.catalina.core.ApplicationContext log
信息: Cleaning up Shiro Environment
四月 15, 2017 11:41:57 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
四月 15, 2017 11:41:57 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
四月 15, 2017 11:41:57 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 8404 ms

8 回复

Tomcat 8.5+eclipse(Version: Neon.1 Release (4.6.1))+Jdk8.0

var ioc = {
conf : {
type : "org.nutz.ioc.impl.PropertiesProxy",
fields : {
paths : ["config/custom/"]
}
},
dataSource : {
factory : "$conf#make",
args : ["com.alibaba.druid.pool.DruidDataSource", "db."],
type : "com.alibaba.druid.pool.DruidDataSource",
events : {
create : "init",
depose : 'close'
}
},
dao : {
type : "org.nutz.dao.impl.NutDao",
args : [{refer:"dataSource"}],
fields : {
executor : {refer:"cacheExecutor"},
sqlManager : {refer:"sqlManager"}
}
},
//sql文件位置声明
sqlManager : {
type : "org.nutz.dao.impl.FileSqlManager",
args : ["sql/"]
},
cacheExecutor : {
type : "org.nutz.plugins.cache.dao.CachedNutDaoExecutor",
fields : {
cacheProvider : {refer:"cacheProvider"},
cachedTableNames : ["sys_user", "sys_role", "sys_menu", "sys_dict"]
}
},
/*
// 基于内存的简单LRU实现
cacheProvider : {
type : "org.nutz.plugins.cache.dao.impl.provider.MemoryDaoCacheProvider",
fields : {
cacheSize : 10000 // 缓存的对象数
},
events : {
create : "init"
}
}
*/
// 基于Ehcache的DaoCacheProvider
cacheProvider : {
type : "org.nutz.plugins.cache.dao.impl.provider.EhcacheDaoCacheProvider",
fields : {
cacheManager : {refer:"cacheManager"} // 引用ehcache.json中定义的CacheManager
},
events : {
create : "init"
}
}
};

@suwandon 解决好了 是构建路径的代码和配置没统一在一块,谢谢提示

来自炫酷的 NutzCN

这个社区很活跃啊 我刚发贴就回复了 辛苦各位大牛牺牲个人时间投入社区 发自内心感谢

构建路劲的代码和配置没统一在一块 什么什么意思怎么处理呀

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