NutzCN Logo
问答 none ioc bean match class
发布于 1691天前 作者 包谷须须 2116 次浏览 复制 上一个帖子 下一个帖子
标签:
org.nutz.ioc.IocException: IocBean[dataTableModule] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.fqx.zb.reportsys.LogTimeProcessor.process(LogTimeProcessor.java:18)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.RuntimeException: IocBean[dataTableModule] fail at field=[dataTableServerice]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
	... 35 more
Caused by: org.nutz.ioc.IocException: IocBean[class:com.fqx.reportsys.serverice.dataTableServerice] none ioc bean match class=com.fqx.reportsys.serverice.dataTableServerice
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:461)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:66)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 37 more

@iocbean和@Inject都是加了的,各种方法都试了,求大神指导。

@IocBean
@At("/getdata")
@Ok("json")
@Fail("http:500")
public class dataTableModule {
	@Inject
    protected Dao dao;
	 
	@Inject
	protected  dataTableServerice dataTableServerice;
	
	@At
	@POST
	public Object getTableOption(@Param("tabletype")NutMap tabletype) {

}
}
@IocBean
public class dataTableServerice {
	
	@Inject
	protected Dao  dao;
	public TableData getTabledata(String tabletype) {
		// Ioc ioc = new NutIoc(new JsonLoader("ioc/tabledata.js"));
		// TableData tableData= ioc.get(TableData.class, tabletype);
	        return null;
	}
}
11 回复

package分别是什么? iocby写了什么

来自炫酷的 NutzCN

import org.nutz.mvc.annotation.ChainBy;
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;

@ChainBy(args="mvc/nutzbook-mvc-chain.js")
@SetupBy(value=MainSetup.class)
@IocBy(type=ComboIocProvider.class, args={"*js", "ioc/",
                                           "*anno", "com.fqx.zb.reportsys",
                                           "*tx", // 事务拦截 aop
                                           "*async"}) // 异步执行aop
@Modules(scanPackage=true)
public class MainModule {

}

这个是MainModule ,在package com.fqx.zb.reportsys;
dataTableModule 在package com.fqx.zb.reportsys.module;
dataTableServerice在package com.fqx.reportsys.serverice;

启动日志里面搜 dataTableServerice 看看

启动日志收不到这个

5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server.服务器版本:     Apache Tomcat/9.0.33
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: 服务器构建:            Mar 11 2020 09:31:38 UTC
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: 服务器版本号(:9.0.33.0
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 10
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS.版本:               10.0
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: 架构:                  amd64
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java 环境变量:         D:\Program Files\Java\jdk-12.0.1
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM 版本:              12.0.1+12
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM.供应商:            Oracle Corporation
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         D:\Program Files\zbeclipse\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\Program Files\apache-tomcat-9.0.33
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\Program Files\zbeclipse\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\Program Files\apache-tomcat-9.0.33
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\Program Files\zbeclipse\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
5月 06, 2020 10:35:57 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
5月 06, 2020 10:35:57 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.7.0].
5月 06, 2020 10:35:57 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
5月 06, 2020 10:35:57 上午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: APR/OpenSSL配置:useAprConnector[false],useOpenSSL[true]
5月 06, 2020 10:35:57 上午 org.apache.catalina.core.AprLifecycleListener initializeSSL
信息: OpenSSL successfully initialized [OpenSSL 1.1.1c  28 May 2019]
5月 06, 2020 10:35:58 上午 org.apache.coyote.AbstractProtocol init
信息: 初始化协议处理器 ["http-nio-8080"]
5月 06, 2020 10:35:58 上午 org.apache.catalina.startup.Catalina load
信息: 服务器在[1,941]毫秒内初始化
5月 06, 2020 10:35:58 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
5月 06, 2020 10:35:58 上午 org.apache.catalina.core.StandardEngine startInternal
信息: 正在启动 Servlet 引擎:[Apache Tomcat/9.0.33]
5月 06, 2020 10:35:59 上午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
警告: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [277] milliseconds.
5月 06, 2020 10:36:00 上午 org.apache.jasper.servlet.TldScanner scanJars
信息: 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
2020-05-06 10:36:01,055 org.nutz.mvc.NutFilter._init(NutFilter.java:85) INFO  - NutFilter[nutz] starting ...
2020-05-06 10:36:01,105 org.nutz.resource.impl.ErrorResourceLocation.<init>(ErrorResourceLocation.java:28) INFO  - [loc=D:\Program%20Files\zbeclipse\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\report_system\WEB-INF\classes]not exist
2020-05-06 10:36:01,109 org.nutz.resource.Scans.printLocations(Scans.java:527) DEBUG - Locations count=4 time use 27ms
2020-05-06 10:36:01,125 org.nutz.resource.Scans.printLocations(Scans.java:527) DEBUG - Locations count=9 time use 15ms
2020-05-06 10:36:01,146 org.nutz.mvc.config.AbstractNutConfig.createLoading(AbstractNutConfig.java:62) DEBUG - Loading by class org.nutz.mvc.impl.NutLoading
2020-05-06 10:36:01,150 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:55) INFO  - Nutz Version : 1.r.68.v20190220 
2020-05-06 10:36:01,151 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:56) INFO  - Nutz.Mvc[nutz] is initializing ...
2020-05-06 10:36:01,152 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:60) DEBUG - Web Container Information:
2020-05-06 10:36:01,160 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:61) DEBUG -  - Default Charset : GBK
2020-05-06 10:36:01,161 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:62) DEBUG -  - Current . path  : D:\Program Files\eclipse-jee-2020-03-R-incubation-win32-x86_64\eclipse\.
2020-05-06 10:36:01,162 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:63) DEBUG -  - Java Version    : 12.0.1
2020-05-06 10:36:01,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:64) DEBUG -  - File separator  : \
2020-05-06 10:36:01,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:65) DEBUG -  - Timezone        : Asia/Shanghai
2020-05-06 10:36:01,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:66) DEBUG -  - OS              : Windows 10 amd64
2020-05-06 10:36:01,163 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:67) DEBUG -  - ServerInfo      : Apache Tomcat/9.0.33
2020-05-06 10:36:01,164 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:68) DEBUG -  - Servlet API     : 4.0
2020-05-06 10:36:01,165 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:73) DEBUG -  - ContextPath     : /myfqx
2020-05-06 10:36:01,166 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:74) DEBUG -  - context.tempdir : D:\Program Files\zbeclipse\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost\myfqx
2020-05-06 10:36:01,166 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:75) DEBUG -  - MainModule      : com.fqx.zb.reportsys.MainModule
2020-05-06 10:36:01,169 org.nutz.mvc.impl.NutLoading.createContext(NutLoading.java:239) DEBUG - >> app.root = D:/Program Files/zbeclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/report_system
2020-05-06 10:36:01,338 org.nutz.castor.Castors.reload(Castors.java:116) DEBUG - Using 107 castor for Castors
2020-05-06 10:36:01,339 org.nutz.mvc.impl.NutLoading.createIoc(NutLoading.java:379) DEBUG - @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/", "*anno", "com.fqx.zb.reportsys", "*tx", "*async"],init=[])
2020-05-06 10:36:01,410 org.nutz.resource.Scans.scan(Scans.java:280) DEBUG - Found 2 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
2020-05-06 10:36:01,411 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:49) DEBUG - loading [dao.js]
2020-05-06 10:36:01,443 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:49) DEBUG - loading [tabaledata.js]
2020-05-06 10:36:01,452 org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:57) DEBUG - Loaded 4 bean define from path=[ioc/] --> [rjqmd, conf, dao, dataSource]
2020-05-06 10:36:01,453 org.nutz.ioc.loader.annotation.AnnotationIocLoader.<init>(AnnotationIocLoader.java:51) INFO  -  > scan 'com.fqx.zb.reportsys'
2020-05-06 10:36:01,459 org.nutz.resource.Scans.scan(Scans.java:280) DEBUG - Found 12 resource by src( com/fqx/zb/reportsys/ ) , regex( ^.+[.]class$ )
2020-05-06 10:36:01,503 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:99) INFO  -    > add 'dataTableModule                         ' - com.fqx.zb.reportsys.module.dataTableModule
2020-05-06 10:36:01,531 org.nutz.ioc.loader.annotation.AnnotationIocLoader.addClass(AnnotationIocLoader.java:99) INFO  -    > add 'operatorModule                          ' - com.fqx.zb.reportsys.module.operatorModule
2020-05-06 10:36:01,561 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
2020-05-06 10:36:01,571 org.nutz.ioc.impl.NutIoc.<init>(NutIoc.java:130) INFO  - ... NutIoc init complete
2020-05-06 10:36:01,576 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:159) INFO  - Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
2020-05-06 10:36:01,582 org.nutz.mvc.impl.NutLoading.createViewMakers(NutLoading.java:369) DEBUG - @Views(DefaultViewMaker.class)
2020-05-06 10:36:01,596 org.nutz.resource.Scans.scan(Scans.java:280) DEBUG - Found 1 resource by src( mvc/nutzbook-mvc-chain.js ) , regex( ^(.+[.])(js|json)$ )
2020-05-06 10:36:01,606 org.nutz.mvc.impl.chainconfig.JsonActionChainMakerConfiguretion.<init>(JsonActionChainMakerConfiguretion.java:37) DEBUG - ActionChain Config:
{
   "default": {
      "ps": ["com.fqx.zb.reportsys.LogTimeProcessor", "org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor", "org.nutz.mvc.impl.processor.EncodingProcessor", "org.nutz.mvc.impl.processor.ModuleProcessor", "!org.nutz.integration.shiro.NutShiroProcessor", "org.nutz.mvc.impl.processor.ActionFiltersProcessor", "org.nutz.mvc.impl.processor.AdaptorProcessor", "org.nutz.mvc.impl.processor.MethodInvokeProcessor", "org.nutz.mvc.impl.processor.ViewProcessor"],
      "error": "org.nutz.mvc.impl.processor.FailProcessor"
   }
}
2020-05-06 10:36:01,607 org.nutz.mvc.impl.NutLoading.createChainMaker(NutLoading.java:267) DEBUG - @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
2020-05-06 10:36:01,625 org.nutz.mvc.impl.Loadings.scanModules(Loadings.java:155) DEBUG - module class location 'file:/D:/Program%20Files/zbeclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/report_system/WEB-INF/classes/'
2020-05-06 10:36:01,626 org.nutz.mvc.impl.Loadings.scanModuleInPackage(Loadings.java:185) DEBUG -  > scan 'com.fqx.zb.reportsys'
2020-05-06 10:36:01,636 org.nutz.resource.Scans.scan(Scans.java:280) DEBUG - Found 12 resource by src( com/fqx/zb/reportsys/ ) , regex( ^.+[.]class$ )
2020-05-06 10:36:01,645 org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:204) DEBUG -    >> add 'com.fqx.zb.reportsys.module.dataTableModule'
2020-05-06 10:36:01,646 org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:204) DEBUG -    >> add 'com.fqx.zb.reportsys.module.operatorModule'
2020-05-06 10:36:01,646 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:196) DEBUG - Use org.nutz.mvc.impl.NutEntryDeterminer as EntryMethodDeterminer
2020-05-06 10:36:01,656 org.nutz.mvc.impl.NutActionChainMaker.getProcessorByName(NutActionChainMaker.java:72) INFO  - Optional processor class not found, disabled : org.nutz.integration.shiro.NutShiroProcessor
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.nutz.lang.reflect.ReflectTool$1 (file:/D:/Program%20Files/zbeclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/report_system/WEB-INF/lib/nutz-1.r.68.v20190220.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of org.nutz.lang.reflect.ReflectTool$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2020-05-06 10:36:01,691 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/getdata/gettableoption'   >> (dataTableModule.java:30).getTableOption : Object     | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2020-05-06 10:36:01,693 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/sysop/count'              >> (operatorModule.java:46).count        : int        | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2020-05-06 10:36:01,695 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/sysop/login'              >> (operatorModule.java:51).login        : Object     | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2020-05-06 10:36:01,704 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/sysop/branchforselect'    >> (operatorModule.java:73).branchforselect : Object     | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2020-05-06 10:36:01,705 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/sysop/supcustforselect'   >> (operatorModule.java:96).supcustforselect : Object     | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2020-05-06 10:36:01,706 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/sysop/itemclsforselect'   >> (operatorModule.java:118).itemclsforselect : Object     | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2020-05-06 10:36:01,706 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/sysop/itemiforselect'     >> (operatorModule.java:187).itemiforselect : Object     | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2020-05-06 10:36:01,707 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/sysop/itemdptforselect'   >> (operatorModule.java:141).itemdptforselect : Object     | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2020-05-06 10:36:01,708 org.nutz.mvc.impl.UrlMappingImpl.print(UrlMappingImpl.java:146) DEBUG -    '/sysop/itembrandforselect' >> (operatorModule.java:163).itembrandforselect : Object     | @Ok(json ) @Fail(http:500) | by 0 Filters | (I:UTF-8/O:UTF-8)
2020-05-06 10:36:01,708 org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:221) INFO  - Found 9 module methods
2020-05-06 10:36:01,709 org.nutz.mvc.impl.NutLoading.evalLocalization(NutLoading.java:335) DEBUG - @Localization not define
2020-05-06 10:36:01,710 org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:275) INFO  - Setup application...
2020-05-06 10:36:01,711 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get 'dao'<interface org.nutz.dao.Dao>
2020-05-06 10:36:01,711 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get '$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2020-05-06 10:36:01,712 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:192) DEBUG - 	 >> Load definition name=$aop_async
2020-05-06 10:36:01,715 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject($aop_async) in AsyncAopIocLoader@247309715
2020-05-06 10:36:01,717 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:223) DEBUG - 	 >> Make...'$aop_async'<interface org.nutz.ioc.aop.config.AopConfigration>
2020-05-06 10:36:01,782 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:65) DEBUG - Save object '$aop_async' to [app] 
2020-05-06 10:36:01,886 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
2020-05-06 10:36:01,886 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:192) DEBUG - 	 >> Load definition name=dao
2020-05-06 10:36:01,887 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(dao) in JsonLoader(paths=[ioc/])
2020-05-06 10:36:01,887 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:223) DEBUG - 	 >> Make...'dao'<interface org.nutz.dao.Dao>
2020-05-06 10:36:01,888 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:65) DEBUG - Save object 'dao' to [app] 
2020-05-06 10:36:01,889 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get 'dataSource'<>
2020-05-06 10:36:01,890 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:192) DEBUG - 	 >> Load definition name=dataSource
2020-05-06 10:36:01,891 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
2020-05-06 10:36:01,892 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:223) DEBUG - 	 >> Make...'dataSource'<>
2020-05-06 10:36:01,892 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:65) DEBUG - Save object 'dataSource' to [app] 
2020-05-06 10:36:01,943 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:76) DEBUG - Load class com.alibaba.druid.pool.DruidDataSource without AOP
2020-05-06 10:36:01,944 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get 'conf'<>
2020-05-06 10:36:01,944 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:192) DEBUG - 	 >> Load definition name=conf
2020-05-06 10:36:01,945 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(conf) in JsonLoader(paths=[ioc/])
2020-05-06 10:36:01,946 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:223) DEBUG - 	 >> Make...'conf'<>
2020-05-06 10:36:01,946 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:65) DEBUG - Save object 'conf' to [app] 
2020-05-06 10:36:01,947 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:76) DEBUG - Load class org.nutz.ioc.impl.PropertiesProxy without AOP
2020-05-06 10:36:01,957 org.nutz.resource.Scans.scan(Scans.java:280) DEBUG - Found 1 resource by src( custom/ ) , regex( ^.+[.]properties$ )
2020-05-06 10:36:01,957 org.nutz.ioc.impl.PropertiesProxy.setPaths(PropertiesProxy.java:106) DEBUG - load properties from File[D:\Program Files\zbeclipse\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\report_system\WEB-INF\classes\custom\db.properties]
2020-05-06 10:36:03,041 com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:923) INFO  - {dataSource-1} inited
2020-05-06 10:36:03,063 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:76) DEBUG - Load class org.nutz.dao.impl.NutDao without AOP
2020-05-06 10:36:03,065 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get 'dataSource'<>
2020-05-06 10:36:03,152 org.nutz.dao.jdbc.Jdbcs.<clinit>(Jdbcs.java:93) DEBUG - Jdbcs init complete
2020-05-06 10:36:03,153 org.nutz.dao.jdbc.Jdbcs.getExpert(Jdbcs.java:106) INFO  - Get Connection from DataSource for JdbcExpert, if you lock at here, check your database server and configure
2020-05-06 10:36:04,972 org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:188) DEBUG - select expert : org.nutz.dao.impl.jdbc.sqlserver2005.Sqlserver2005JdbcExpert
2020-05-06 10:36:04,988 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:199) DEBUG - JDBC Driver --> 7.0.0.0
2020-05-06 10:36:04,988 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:200) DEBUG - JDBC Name   --> Microsoft JDBC Driver 7.0 for SQL Server
2020-05-06 10:36:04,989 org.nutz.dao.impl.DaoSupport$1.invoke(DaoSupport.java:202) DEBUG - JDBC URL    --> jdbc:sqlserver://xx.xx.xx.xx:2433;useBulkCopyForBatchInsert=false;cancelQueryTimeout=-1;sslProtocol=TLS;jaasConfigurationName=SQLJDBCDriver;statementPoolingCacheSize=0;serverPreparedStatementDiscardThreshold=10;enablePrepareOnFirstPreparedStatementCall=false;fips=false;socketTimeout=0;authentication=NotSpecified;authenticationScheme=nativeAuthentication;xopenStates=false;sendTimeAsDatetime=true;trustStoreType=JKS;trustServerCertificate=false;TransparentNetworkIPResolution=true;serverNameAsACE=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;queryTimeout=-1;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=xxxxxxx;columnEncryptionSetting=Disabled;applicationName=Microsoft JDBC Driver for SQL Server;applicationIntent=readwrite;
2020-05-06 10:36:04,990 org.nutz.dao.impl.DaoSupport.setDataSource(DaoSupport.java:221) DEBUG - Database info --> SQLSERVER:[Microsoft SQL Server - 10.50.1600]
2020-05-06 10:36:04,995 org.nutz.mvc.impl.NutLoading.load(NutLoading.java:141) INFO  - Nutz.Mvc[nutz] is up in 3828ms
5月 06, 2020 10:36:05 上午 org.apache.coyote.AbstractProtocol start
信息: 开始协议处理句柄["http-nio-8080"]
5月 06, 2020 10:36:05 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in [6,207] milliseconds

一访问dataTableModule就会报错

2020-05-06 10:42:47,795 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) DEBUG - Found mapping for [POST] path=/getdata/getTableOption : dataTableModule.getTableOption(dataTableModule.java:30)
2020-05-06 10:42:47,808 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get 'dataTableModule'<class com.fqx.zb.reportsys.module.dataTableModule>
2020-05-06 10:42:47,809 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:192) DEBUG - 	 >> Load definition name=dataTableModule
2020-05-06 10:42:47,809 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(dataTableModule) in AnnotationIocLoader(packages=[com.fqx.zb.reportsys])
2020-05-06 10:42:47,810 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:223) DEBUG - 	 >> Make...'dataTableModule'<class com.fqx.zb.reportsys.module.dataTableModule>
2020-05-06 10:42:47,810 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:65) DEBUG - Save object 'dataTableModule' to [app] 
2020-05-06 10:42:47,811 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:76) DEBUG - Load class com.fqx.zb.reportsys.module.dataTableModule without AOP
2020-05-06 10:42:47,827 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) DEBUG - Get 'dao'<interface org.nutz.dao.Dao>
2020-05-06 10:42:47,842 org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:64) DEBUG - name=dataTableServerice not found, search for type=com.fqx.reportsys.serverice.dataTableServerice
2020-05-06 10:42:47,843 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(rjqmd) in JsonLoader(paths=[ioc/])
2020-05-06 10:42:47,843 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(conf) in JsonLoader(paths=[ioc/])
2020-05-06 10:42:47,844 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(dao) in JsonLoader(paths=[ioc/])
2020-05-06 10:42:47,844 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
2020-05-06 10:42:47,844 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(dataTableModule) in AnnotationIocLoader(packages=[com.fqx.zb.reportsys])
2020-05-06 10:42:47,844 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(operatorModule) in AnnotationIocLoader(packages=[com.fqx.zb.reportsys])
2020-05-06 10:42:47,845 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(txREPEATABLE_READ) in TransIocLoader@1055757998
2020-05-06 10:42:47,845 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(txSERIALIZABLE) in TransIocLoader@1055757998
2020-05-06 10:42:47,845 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(txNONE) in TransIocLoader@1055757998
2020-05-06 10:42:47,845 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(txREAD_UNCOMMITTED) in TransIocLoader@1055757998
2020-05-06 10:42:47,846 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject(txREAD_COMMITTED) in TransIocLoader@1055757998
2020-05-06 10:42:47,846 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) DEBUG - Found IocObject($aop_async) in AsyncAopIocLoader@247309715
2020-05-06 10:42:47,846 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:85) DEBUG - Remove object 'dataTableModule' from [app] 
2020-05-06 10:42:47,847 com.fqx.zb.reportsys.LogTimeProcessor.process(LogTimeProcessor.java:23) DEBUG - [POST]URI=/myfqx/getdata/getTableOption 50ms
2020-05-06 10:42:47,864 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) WARN  - Error@/getdata/getTableOption :
org.nutz.ioc.IocException: IocBean[dataTableModule] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.fqx.zb.reportsys.LogTimeProcessor.process(LogTimeProcessor.java:18)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.RuntimeException: IocBean[dataTableModule] fail at field=[dataTableServerice]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
	... 35 more
Caused by: org.nutz.ioc.IocException: IocBean[class:com.fqx.reportsys.serverice.dataTableServerice] none ioc bean match class=com.fqx.reportsys.serverice.dataTableServerice
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:461)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:66)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 37 more

你的iocBy扫描路径是:

com.fqx.zb.reportsys

dataTableServerice所在包路径是:

package com.fqx.reportsys.serverice

自然应该扫描不到

package com.fqx.zb.reportsys;
package com.fqx.zb.reportsys.module;
package com.fqx.reportsys.serverice;

把这三个包都添加进去么?不是应该自动扫描reportsys下所有的包么。。。

我草,大意了,名字写错了

最好应该把

com.fqx.reportsys.serverice; 

改成

com.fqx.zb.reportsys.serverice

统一路径这样才能扫描到

嗯,少写了,我一直没看出来

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