NutzCN Logo
问答 nutz inject service null
发布于 3082天前 作者 miamiby557 2598 次浏览 复制 上一个帖子 下一个帖子
标签:

项目是别人能够运行的,我拿来跑一下,配置好了运行
@Inject
private LoginInfoService loginInfoService;
// 获取登录日志
LoginInfo logInfo = loginInfoService.getLoginInfoByUserName(userName); -- loginInfoService为null
ioc:
var ioc = {
// 读取配置文件
config : {
type : "org.nutz.ioc.impl.PropertiesProxy",
fields : {
paths : ["jdbc.properties"]
}
},
// 数据源
dataSource:{
type:"com.mchange.v2.c3p0.ComboPooledDataSource",
events:{
depose:"close"
},
fields:{
//从配置文件中读取
driverClass:{java:"$config.get('db-driver')"},
jdbcUrl:{java:"$config.get('db-url')"},
user:{java:"$config.get('db-username')"},
password:{java:"$config.get('db-password')"},
autoCommitOnClose:"true",
breakAfterAcquireFailure:false,
forceIgnoreUnresolvedTransactions:false,
testConnectionOnCheckin:true,
idleConnectionTestPeriod:60,
maxStatements:100,
checkoutTimeout:5000,
initialPoolSize:3,
minPoolSize:10,
maxPoolSize:15,
maxIdleTime:50,
acquireIncrement:3,
acquireRetryAttempts:30,
acquireRetryDelay:1000,
maxIdleTimeExcessConnections:1800
}
},
dao: {
type : "org.nutz.dao.impl.NutDao",
args : [{refer:'dataSource'}]
}

}

11 回复

发代码要用菜单里面代码块啊.

把启动日志发一下

@wendal 我晚上回家给你发一下启动日志。

@wendal 会不会是缺少nutz:nutz-plugins-daocache:jar:1.r.56这个原因?lib下面没有

有这两个 nutz-1.b.52.jar nutz-1.b.52-sources.jar

@wendal

Nutz: MainModule: <com.ebuyforbrazil.module.MainModule>
Nutz: >> app.root = F:/eclipse_workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/eBuyForBrazil
Nutz: Using 91 castor for Castors
Nutz: @IocBy(type=org.nutz.mvc.ioc.provider.ComboIocProvider, args=["*js", "ioc/dao.json", "ioc/system.json", "*anno", "com.ebuyforbrazil", "*tx"])
Nutz: Found 1 resource by src( ioc/dao.json ) , regex( ^(.+[.])(js|json)$ )
Nutz: Found 1 resource by src( ioc/system.json ) , regex( ^(.+[.])(js|json)$ )
Nutz: loading ioc js config from [dao.json]
Nutz: loading ioc js config from [system.json]
Nutz: Loaded 12 bean define from path=[ioc/dao.json, ioc/system.json] --> [appFilePool, uploadAppContext, avatarUpload, system, dataSource, utils, dao, fileVersionUpload, uploadFileContext, config, tmpFilePool, systemConfig]
Nutz: Found 95 resource by src( com/ebuyforbrazil/ ) , regex( ^.+[.]class$ )
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.ProductAction
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.APPUserAction
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.MsgPushGroupAction
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.impl.LoginInfoServiceImpl
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.UserAction
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.FileAction
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.APPProduct
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.impl.MsgPushServiceImpl
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.DataAction
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.impl.UserServiceImpl
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.MsgSendAction
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.impl.MsgPushGroupServiceIpml
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.impl.MsgPushOrderServiceImpl
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.impl.MsgServiceImpl
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.impl.ProductSearchServiceImpl
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.impl.ProductServiceIpml
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.APPMsgSendAction
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.MsgPushAction
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.impl.ProductCategoryServiceImpl
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.MainAction
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.action.APPVersionAction
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.impl.UserSearchServiceImpl
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.impl.FileVersionServiceImpl
Nutz: Found a Class with Ioc-Annotation : class com.ebuyforbrazil.service.RoleService
Nutz: Scan complete ! Found 24 classes in 1 base-packages!
beans = ["productCategoryService", "mainAction", "roleService", "aPPMsgSendAction", "msgPushService", "userService", "msgPushAction", "msgService", "loginInfoService", "msgPushGroupService", "productSearchService", "dataAction", "msgPushOrderService", "msgPushGroupAction", "productAction", "aPPUserAction", "fileVersionService", "userSearchService", "aPPVersionAction", "userAction", "msgSendAction", "aPPProduct", "fileAction", "productService"]
Nutz: Loaded 5 bean define from reader --
[txREPEATABLE_READ, txREAD_COMMITTED, txNONE, txSERIALIZABLE, txREAD_UNCOMMITTED]
Nutz: MainModule: <com.ebuyforbrazil.module.MainModule>
Nutz: Build URL mapping by org.nutz.mvc.impl.UrlMappingImpl ...
Nutz: @Views(DefaultViewMaker)
Nutz: @ChainBy(org.nutz.mvc.impl.NutActionChainMaker)
Nutz: module class location 'file:/F:/eclipse_workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/eBuyForBrazil/WEB-INF/classes/com/ebuyforbrazil/module/MainModule.class'
Nutz: module class location 'file:/F:/eclipse_workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/eBuyForBrazil/WEB-INF/classes/com/ebuyforbrazil/action/MainAction.class'
Nutz:  > scan 'com.ebuyforbrazil.module'
Nutz: Found 2 resource by src( com/ebuyforbrazil/module/ ) , regex( ^.+[.]class$ )
Nutz:  > scan 'com.ebuyforbrazil.action'
Nutz: Found 13 resource by src( com/ebuyforbrazil/action/ ) , regex( ^.+[.]class$ )
Nutz:    >> add 'com.ebuyforbrazil.action.ProductAction'
Nutz:    >> add 'com.ebuyforbrazil.action.APPUserAction'
Nutz:    >> add 'com.ebuyforbrazil.action.MsgPushGroupAction'
Nutz:    >> add 'com.ebuyforbrazil.action.MsgSendAction'
Nutz:    >> add 'com.ebuyforbrazil.action.APPProduct'
Nutz:    >> add 'com.ebuyforbrazil.action.MainAction'
Nutz:    >> add 'com.ebuyforbrazil.action.APPVersionAction'
Nutz:    >> add 'com.ebuyforbrazil.action.APPMsgSendAction'
Nutz:    >> add 'com.ebuyforbrazil.action.DataAction'
Nutz:    >> add 'com.ebuyforbrazil.action.UserAction'
Nutz:    >> add 'com.ebuyforbrazil.action.MsgPushAction'
Nutz:    >> add 'com.ebuyforbrazil.action.FileAction'
Nutz:    '/APP/user/register'        >> APPUserAction.register(...)    : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/user/getuserprofile'  >> APPUserAction.getUserProfile(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/user/updateuserprofile' >> APPUserAction.updateUserProfile(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/user/cancelattention' >> APPUserAction.cancelAttention(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/user/findmypassword'  >> APPUserAction.findMyPassword(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/user/addusersearchforclick' >> APPUserAction.addUserSearchForClick(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/user/attention'       >> APPUserAction.attention(...)   : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/user/signin'          >> APPUserAction.SignIn(...)      : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/product/getproductlist'   >> ProductAction.getProductList(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/product/getproductcategorylistpage' >> ProductAction.getProductCategoryListPage(...) : Object     | @Ok(jsp:/product/productCategoryList) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/product/getproductcategorytree' >> ProductAction.getProductCategoryTree(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/product/getproductcategorylist' >> ProductAction.getProductCategoryList(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/product/editproductcategory' >> ProductAction.editProductCategory(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/product/getproductlistpage' >> ProductAction.getProductListPage(...) : Object     | @Ok(jsp:/product/productList) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/product/getproductbyid'   >> ProductAction.getProductById(...) : Object     | @Ok(jsp:/product/productInfo) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/product/getproductlistbyuserid' >> ProductAction.getProductListByUserId(...) : Object     | @Ok(jsp:/product/productListBox) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/product/editproduct'      >> ProductAction.editProduct(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPushGroup/getmsgpushgrouplistpage' >> MsgPushGroupAction.getMsgPushGroupListPage(...) : Object     | @Ok(jsp:/msg/msgPushGropuList) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPushGroup/getmsgpushgrouptreepage' >> MsgPushGroupAction.getMsgPushGroupTreePage(...) : Object     | @Ok(jsp:/msg/msgPushGropuTree) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPushGroup/getmsgpushgrouptree' >> MsgPushGroupAction.getMsgPushGroupTree(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPushGroup/getmsgpushgrouplist' >> MsgPushGroupAction.getMsgPushGroupList(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPushGroup/editmsgpushgroup' >> MsgPushGroupAction.editMsgPushGroup(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPushGroup/getmsgpushgroupusers' >> MsgPushGroupAction.getMsgPushGroupUsers(...) : Object     | @Ok(jsp:/msg/msgPushGropuUsers) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPushGroup/setmsgpushgroupusers' >> MsgPushGroupAction.setMsgPushGroupUsers(...) : Object     | @Ok(redirect:/msgPushGroup/getMsgPushGroupUsers.nut?msgPushGroupId=${msgPushGroupId}) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/Product/getproducttype' >> APPProduct.getProductType(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/Product/getproductbyuserid' >> APPProduct.getProductbyUserid(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/Product/getproductbykeyword' >> APPProduct.getProductbyKeyword(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/Product/getproductbyid' >> APPProduct.getProductbyId(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/Product/deleteproductbyid' >> APPProduct.deleteProductbyId(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/Product/getproducttypebyid' >> APPProduct.getProductTypebyId(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/Product/addclicknumber' >> APPProduct.addclicknumber(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/Product/getproductalltype' >> APPProduct.getProductAllType(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/Product/addmywarehouse' >> APPProduct.addmywarehouse(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz: Not a good idea : Return String ,and using JsonView!! (Using @Ok("raw") or return map/list/pojo)--> APPProduct.addProduct(...)
Nutz:    '/APP/Product/addproduct'   >> APPProduct.addProduct(...)     : String     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/Product/updateproduct' >> APPProduct.updateProduct(...)  : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgSend/getmsgsendhistorylistpage' >> MsgSendAction.getMsgSendHistoryListPage(...) : Object     | @Ok(jsp:/msg/msgSendHistoryList) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgSend/getmsgsendhistorylist' >> MsgSendAction.getMsgSendHistoryList(...) : Object     | @Ok(jsp:/msg/msgListRes) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgSend/sendmsg'          >> MsgSendAction.sendMsg(...)     : Object     | @Ok(jsp:/msg/msgSendHistoryList) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgSend/delmsgbyid'       >> MsgSendAction.delMsgById(...)  : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgSend/updatemsgbyid'    >> MsgSendAction.updateMsgById(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/msg/getsysteminform'  >> APPMsgSendAction.getSystemInform(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/msg/addphotographarr' >> APPMsgSendAction.addPhotographArr(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/msg/addopinion'       >> APPMsgSendAction.addOpinion(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/msg/getarrive'        >> APPMsgSendAction.getArrive(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/msg/readmsg'          >> APPMsgSendAction.readmsg(...)  : void       | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/msg/addarrivemsg'     >> APPMsgSendAction.addArriveMsg(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/msg/adddemandmsg'     >> APPMsgSendAction.addDemandMsg(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/version/download'     >> APPVersionAction.download(...) : View       | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/APP/version/getvesioninfo' >> APPVersionAction.getVesionInfo(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/main/index'               >> MainAction.index(...)          : View       | @Ok(null ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/main/login'               >> MainAction.login(...)          : View       | @Ok(null ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/main/logout'              >> MainAction.logout(...)         : void       | @Ok(>>:/ ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/main/countadmintips'      >> MainAction.countAdminTips(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/data/getdatalistpage'     >> DataAction.getDataListPage(...) : Object     | @Ok(jsp:/data/dataList) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/data/getdatalistbytype'   >> DataAction.getDataListByType(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/data/editdata'            >> DataAction.editData(...)       : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/user/add'                 >> UserAction.add(...)            : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/user/delete'              >> UserAction.delete(...)         : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/user/update'              >> UserAction.update(...)         : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz: Get 'avatarUpload'<class org.nutz.mvc.upload.UploadAdaptor>
Nutz: 	 >> Load definition
Nutz: Loading define for name=avatarUpload
Nutz: Found IocObject(avatarUpload) in IocLoader(JsonLoader@765466550)
Nutz: 	 >> Make...'avatarUpload'<class org.nutz.mvc.upload.UploadAdaptor>
Nutz: class org.nutz.mvc.upload.UploadAdaptor , no config to enable AOP for this type.
Nutz: Get 'uploadFileContext'<>
Nutz: 	 >> Load definition
Nutz: Loading define for name=uploadFileContext
Nutz: Found IocObject(uploadFileContext) in IocLoader(JsonLoader@765466550)
Nutz: 	 >> Make...'uploadFileContext'<>
Nutz: class org.nutz.mvc.upload.UploadingContext , no config to enable AOP for this type.
Nutz: Get 'tmpFilePool'<>
Nutz: 	 >> Load definition
Nutz: Loading define for name=tmpFilePool
Nutz: Found IocObject(tmpFilePool) in IocLoader(JsonLoader@765466550)
Nutz: 	 >> Make...'tmpFilePool'<>
Nutz: class org.nutz.filepool.SimpleFilePool , no config to enable AOP for this type.
Nutz: Save object 'tmpFilePool' to [app] 
Nutz: Get 'utils'<>
Nutz: 	 >> Load definition
Nutz: Loading define for name=utils
Nutz: Found IocObject(utils) in IocLoader(JsonLoader@765466550)
Nutz: 	 >> Make...'utils'<>
Nutz: class com.ebuyforbrazil.common.util.MyUtils , no config to enable AOP for this type.
Nutz: Save object 'utils' to [app] 
Nutz: Get 'utils'<>
Nutz: Init simple-file-pool by: F:\eclipse_workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\eBuyForBrazil\upload\user [0]
Nutz: Get 'tmpFilePool'<>
Nutz: Get 'uploadFileContext'<>
Nutz: 	 >> Load definition
Nutz: Loading define for name=uploadFileContext
Nutz: Found IocObject(uploadFileContext) in IocLoader(JsonLoader@765466550)
Nutz: 	 >> Make...'uploadFileContext'<>
Nutz: class org.nutz.mvc.upload.UploadingContext , no config to enable AOP for this type.
Nutz: Get 'tmpFilePool'<>
Nutz: Get 'tmpFilePool'<>
Nutz:    '/user/updateuserprofile'   >> UserAction.updateUserProfile(...) : UserProfile | @Ok(>>:/user/userProfile.nut?userId=${obj.userId}) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/user/getuserprofilelistpage' >> UserAction.getUserProfileListPage(...) : Object     | @Ok(jsp:/sys/userProfileList) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/user/edituserprofile'     >> UserAction.editUserProfile(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/user/getuserprofilelist'  >> UserAction.getUserProfileList(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/user/userprofile'         >> UserAction.userProfile(...)    : Object     | @Ok(jsp:/sys/userProfile) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/user/avatar'              >> UserAction.readAvatar(...)     : Object     | @Ok(raw:jpg) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/user/approve'             >> UserAction.approve(...)        : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/fileVersion/getfileversionlistpage' >> FileAction.getFileVersionListPage(...) : Object     | @Ok(jsp:/data/fileVersionList) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/fileVersion/getfileversionlist' >> FileAction.getFileVersionList(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/fileVersion/editfileversion' >> FileAction.editFileVersion(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz: Get 'fileVersionUpload'<class org.nutz.mvc.upload.UploadAdaptor>
Nutz: 	 >> Load definition
Nutz: Loading define for name=fileVersionUpload
Nutz: Found IocObject(fileVersionUpload) in IocLoader(JsonLoader@765466550)
Nutz: 	 >> Make...'fileVersionUpload'<class org.nutz.mvc.upload.UploadAdaptor>
Nutz: class org.nutz.mvc.upload.UploadAdaptor , no config to enable AOP for this type.
Nutz: Get 'uploadAppContext'<>
Nutz: 	 >> Load definition
Nutz: Loading define for name=uploadAppContext
Nutz: Found IocObject(uploadAppContext) in IocLoader(JsonLoader@765466550)
Nutz: 	 >> Make...'uploadAppContext'<>
Nutz: class org.nutz.mvc.upload.UploadingContext , no config to enable AOP for this type.
Nutz: Get 'appFilePool'<>
Nutz: 	 >> Load definition
Nutz: Loading define for name=appFilePool
Nutz: Found IocObject(appFilePool) in IocLoader(JsonLoader@765466550)
Nutz: 	 >> Make...'appFilePool'<>
Nutz: class org.nutz.filepool.SimpleFilePool , no config to enable AOP for this type.
Nutz: Save object 'appFilePool' to [app] 
Nutz: Get 'utils'<>
Nutz: Get 'utils'<>
Nutz: Init simple-file-pool by: F:\eclipse_workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\eBuyForBrazil\upload\file [0]
Nutz: Get 'appFilePool'<>
Nutz: Get 'uploadAppContext'<>
Nutz: 	 >> Load definition
Nutz: Loading define for name=uploadAppContext
Nutz: Found IocObject(uploadAppContext) in IocLoader(JsonLoader@765466550)
Nutz: 	 >> Make...'uploadAppContext'<>
Nutz: class org.nutz.mvc.upload.UploadingContext , no config to enable AOP for this type.
Nutz: Get 'appFilePool'<>
Nutz: Get 'appFilePool'<>
Nutz:    '/fileVersion/addfileversion' >> FileAction.addFileVersion(...) : Object     | @Ok(>>:/fileVersion/getFileVersionListPage.nut) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPush/getmsgpushlistpage' >> MsgPushAction.getMsgPushListPage(...) : Object     | @Ok(jsp:/msg/msgPushList) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPush/getmsgpushbyid'   >> MsgPushAction.getMsgPushById(...) : Object     | @Ok(jsp:/msg/msgPushHistory) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPush/getmsgpushorderlistpage' >> MsgPushAction.getMsgPushOrderListPage(...) : Object     | @Ok(jsp:/msg/msgPushOrderList) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPush/getmsgpushorderlist' >> MsgPushAction.getMsgPushOrderList(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPush/editmsgpushorder' >> MsgPushAction.editMsgPushOrder(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPush/msgpushorderinfo' >> MsgPushAction.msgPushOrderInfo(...) : Object     | @Ok(jsp:/msg/msgPushOrderInfo) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPush/getmsgpushlist'   >> MsgPushAction.getMsgPushList(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPush/msgpush'          >> MsgPushAction.msgPush(...)     : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPush/msgpushorder'     >> MsgPushAction.msgPushOrder(...) : Object     | @Ok(redirect:/msgPush/getMsgPushOrderListPage.nut) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz:    '/msgPush/editmsgpush'      >> MsgPushAction.editMsgPush(...) : Object     | @Ok(json ) @Fail(json ) | by 1 Filters | (I:UTF-8/O:UTF-8)
Nutz: Found 80 module methods
Nutz: @Localization not define
Nutz: Setup application...
=============**SYSTEM START**=================
Nutz: Nutz.Mvc[nutz] is up in 910ms
六月 15, 2016 7:28:39 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
六月 15, 2016 7:28:39 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
六月 15, 2016 7:28:39 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 4985 ms

MainAction有问题是吧? 把MainAction类,及访问该类入口方法的日志也贴上

@wendal

Nutz: Found mapping for [POST] path=/main/login : MainAction.login(...)
Nutz: Get 'mainAction'<class com.ebuyforbrazil.action.MainAction>
Nutz: Found mapping for [GET] path=/main/countAdminTips : MainAction.countAdminTips(...)
Nutz: Get 'mainAction'<class com.ebuyforbrazil.action.MainAction>
Nutz: Remove object 'dao' from [app] 
Nutz: Remove object 'roleService' from [app] 
Nutz: Remove object 'userService' from [app] 
Nutz: Remove object 'mainAction' from [app] 
2016-06-15 19:30:00,440 : (CommonFilter.java:38) - 过滤器处理中.........................
2016-06-15 19:30:00,444 : (CommonFilter.java:38) - 过滤器处理中.........................
Nutz: Error@/main/countAdminTips :
org.nutz.ioc.IocException: create ioc bean fail name=mainAction ioc define:
{
   "type" :"com.ebuyforbrazil.action.MainAction",
   "singleton" :true,
   "events" :{
   },
   "args" :[],
   "fields" :[{
      "name" :"userService",
      "value" :{
         "type" :"refer",
         "value" :"userService"
      },
      "optional" :false
   }, {
      "name" :"loginInfoService",
      "value" :{
         "type" :"refer",
         "value" :"loginInfoService"
      },
      "optional" :false
   }, {
      "name" :"systemConfig",
      "value" :{
         "type" :"refer",
         "value" :"systemConfig"
      },
      "optional" :false
   }, {
      "name" :"msgPushService",
      "value" :{
         "type" :"refer",
         "value" :"msgPushService"
      },
      "optional" :false
   }, {
      "name" :"msgService",
      "value" :{
         "type" :"refer",
         "value" :"msgService"
      },
      "optional" :false
   }, {
      "name" :"dao",
      "value" :{
         "type" :"refer",
         "value" :"dao"
      },
      "optional" :false
   }],
   "scope" :"app"
}
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:132)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:194)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:212)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:106)
	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.NutActionChain.doChain(NutActionChain.java:40)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:64)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:182)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
	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)
Nutz: Error@/main/login :
java.lang.NullPointerException
	at com.ebuyforbrazil.action.MainAction.login(MainAction.java:79)
	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.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:23)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:40)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:113)
	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)

MainAction

@IocBean
@At("/main")
public class MainAction {
	private final static Logger log = Logger.getLogger(MainAction.class);

	/**
	 * 用户信息服务类
	 */
	@Inject
	private UserService userService;
	
	@Inject
	private LoginInfoService loginInfoService;
	
	@Inject
	private SystemConfig systemConfig;
	
	@Inject
	private MsgPushService msgPushService;
	
	@Inject
	private MsgService msgService;
	
	@Inject
	private NutDao dao;
	
	//@At("/login") 写法一样的!默认的路径是那注解的方法名
	@At
	public View login(String userName, String password,HttpServletRequest request,HttpSession session) {
		log.info("==================>  login ");
		String msg = "";
		NutMap re = new NutMap();
		// 是否禁止登录
		re.setv("isUnLogin", false);
		if (StringUtils.isNotEmpty(userName) && StringUtils.isNotEmpty(password)) {
			// 获取登录日志
			LoginInfo logInfo = loginInfoService.getLoginInfoByUserName(userName);

debug loginInfoService is null

所以根本原因在于这个错误,无视那个空指针.

Nutz: Error@/main/countAdminTips :
org.nutz.ioc.IocException: create ioc bean fail name=mainAction ioc define:

请把这个报错的信息完整贴出来

@wendal 多谢你,我找到问题了,居然数据库ip写错了。。。。

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