下面的type和args代表了什么?
dao : {
type : "org.nutz.dao.impl.NutDao",
args : [{refer:"dataSource"}]
}
下面的type和args代表了什么?
dao : {
type : "org.nutz.dao.impl.NutDao",
args : [{refer:"dataSource"}]
}
@wendal 但是我没有找到org.nutz.dao.impl.NutDao 这个类呀,这写法是固定的么?
@wendal 还有请问一下里面这些参数都代表什么呀 如果我的MainModule在net.nutz目录下,是这样写没有错么?
@IocBy(type=ComboIocProvider.class, args={"*js", "ioc/",
"*anno", "net.nutz",
"*tx", // 事务拦截 aop
"*async"})
@wendal = =原来是jar自带的阿。
@wendal 请问为什么找不到ioc呀,我配置的没有错呀。。
org.nutz.lang.born.BorningException: Fail to born 'org.nutz.ioc.loader.json.JsonLoader'
by args: [
@(ioc/)] becasue:
java.lang.RuntimeException: folder or file like '^(.+[.])(js|json)$' no found in ioc/
at org.nutz.lang.born.DynamicConstructorBorning.born(DynamicConstructorBorning.java:21)
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
at org.nutz.lang.Mirror.born(Mirror.java:990)
at org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:126)
at org.nutz.ioc.loader.combo.ComboIocLoader.<init>(ComboIocLoader.java:80)
at org.nutz.mvc.ioc.provider.ComboIocProvider.create(ComboIocProvider.java:20)
at org.nutz.mvc.impl.NutLoading.createIoc(NutLoading.java:384)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:103)
at org.nutz.mvc.ActionHandler.<init>(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.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3190)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:404)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1309)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
@wendal 怎么看全路径= =我就放在conf文件夹下面的ioc里呀
@wendal conf目录是后面添加进去的。。
http://nutzbook.wendal.net/setup30mins/new_project.html
如果是后面补的, 右键conf文件夹, build path, as source folder.
@wendal 伽利略版的eclipse= =没有build path啊
@wendal 我删了重新建就好啦。还有请问add update insert query 里面测试方法是什么意思呀 @param()里面的参数是啥?
@wendal 最新问题=-=在自动建表的时候报这个错误
16-12-20 11:21:35.60 DEBUG [main] Table 'project' doesn't exist!
16-12-20 11:21:35.78 DEBUG [main] SELECT COUNT(*) FROM project
16-12-20 11:21:35.91 DEBUG [main] SQLException
java.sql.SQLSyntaxErrorException: ORA-00942: ¿¿¿¿¿¿¿
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:853)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1145)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1267)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1469)
at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:389)
at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:138)
at org.nutz.dao.impl.sql.run.NutDaoExecutor._runSelect(NutDaoExecutor.java:246)
at org.nutz.dao.impl.sql.run.NutDaoExecutor.exec(NutDaoExecutor.java:53)
at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:66)
at org.nutz.dao.impl.interceptor.DaoLogInterceptor.filter(DaoLogInterceptor.java:22)
at org.nutz.dao.DaoInterceptorChain.doChain(DaoInterceptorChain.java:64)
at org.nutz.dao.DaoInterceptorChain.invoke(DaoInterceptorChain.java:139)
at org.nutz.dao.impl.sql.run.NutDaoRunner.runCallback(NutDaoRunner.java:147)
at org.nutz.dao.impl.sql.run.NutDaoRunner._runWithoutTransaction(NutDaoRunner.java:114)
at org.nutz.dao.impl.sql.run.NutDaoRunner._run(NutDaoRunner.java:81)
at org.nutz.dao.impl.sql.run.NutDaoRunner.run(NutDaoRunner.java:70)
at org.nutz.dao.impl.DaoSupport.run(DaoSupport.java:266)
at org.nutz.dao.impl.DaoSupport._exec(DaoSupport.java:274)
at org.nutz.dao.impl.NutDao.func(NutDao.java:741)
at org.nutz.dao.impl.NutDao.func(NutDao.java:722)
at org.nutz.dao.impl.NutDao._count(NutDao.java:709)
at org.nutz.dao.impl.NutDao.count(NutDao.java:671)
at org.nutz.project.mvc.MainSetup.init(MainSetup.java:21)
at org.nutz.mvc.impl.NutLoading.evalSetup(NutLoading.java:277)
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:87)
at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
16-12-20 11:21:35.93 ERROR [main] Error happend during start serivce!
org.nutz.dao.DaoException: !Nutz SQL Error: 'SELECT COUNT(*) FROM project '
PreparedStatement:
'SELECT COUNT(*) FROM project '
CaseMessage=ORA-00942: ¿¿¿¿¿¿¿
@wendal 弄好了 有点尴尬= =不是很懂又弄错了,写到Mainmodule的路径去了
@wendal UserModule报错 = =我的UserModule在下面、、
16-12-20 13:46:28.722 DEBUG [http-8080-2] Search mapping for path=/project/count : NOT Action match
package org.nutz.project.service;
import javax.servlet.http.HttpSession;
import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.nutz.dao.QueryResult;
import org.nutz.dao.pager.Pager;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Strings;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Attr;
import org.nutz.mvc.annotation.Fail;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.Param;
import org.nutz.project.bean.Project;
@IocBean
@At("/project")
@Ok("json")
@Fail("http:500")
public class UserModule {
@Inject
protected Dao dao;
//返回project数量
@At
public int count() {
return dao.count(Project.class);
}
}
@wendal 请问xxx那个填写说明=-=
@wendal 填写什么。。
@wendal = =又报500了。。好痛苦
@wendal 你好 为什么在控制台可以看到的是正常显示 但是在数据库里面显示会乱码呢?
16-12-20 14:25:49.617 DEBUG [main] INSERT INTO t_project(pid,pname,sqdw,sxmc) VALUES(?,?,?,?)
| 1 | 2 | 3 | 4 |
|---|-----------|------|-----------|
| 1 | 绿地卢湾CBD项目 | 绿地集团 | 建设项目选址意见书 |
@wendal 请问nutz怎么配置charset,在dao.js中配置吗?