第二个问题:
在MainModule中增加内部类SubModule后,报如下异常:
org.nutz.lang.born.BorningException: Fail to born 'com.xxx.console.web.action.MainModule$SubModule'
by args: []
at org.nutz.lang.Mirror.born(Mirror.java:924)
at org.nutz.mvc.impl.processor.ModuleProcessor.init(ModuleProcessor.java:45)
at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:34)
at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:46)
at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:180)
at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:96)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter.init(NutFilter.java:51)
--MainModule.java
@Modules(scanPackage = true)
@At("/xxx")
public class MainModule {
public MainModule() {
}
@At("/test")
public String test() {
return "";
}
@At("/yyy")
public class SubModule {
public SubModule() {
}
@At("/test")
public String test() {
return "";
}
}
}
我估计应该是内部类实例化时报错导致的,是否不能用内部类的方式?
第三个问题:
SELECT A.ID, A.FLOW_ID, B.NAME FLOW_NAME, C.NAME TYPE_NAME, C.SVG, A.TITLE, A.TRANSLATE_X, A.TRANSLATE_Y, A.EXEC_STATE FROM FLOW_ITEM A, FLOW B, FLOW_TYPE C WHERE A.FLOW_ID = @FLOW_ID AND A.FLOW_ID = B.ID AND A.TYPE_ID = C.ID
Sql sql = Sqls.create(上面的SQL);
sql.params().set("FLOW_ID", 5);
报错如下:
[2013-06-24 15:22:18,154] [http-80-2] DEBUG org.nutz.dao.impl.sql.run.NutDaoExecutor - SELECT A.ID, A.FLOW_ID, B.NAME FLOW_NAME, C.NAME TYPE_NAME, C.SVG, A.TITLE, A.TRANSLATE_X, A.TRANSLATE_Y, A.EXEC_STATE FROM FLOW_ITEM A, FLOW B, FLOW_TYPE C WHERE A.FLOW_ID =
[2013-06-24 15:22:18,187] [http-80-2] DEBUG org.nutz.dao.impl.sql.run.NutDaoExecutor - SQLException
java.sql.SQLException: ORA-01008: 并非所有变量都已绑定
第一个问题: --MainModule.java @Modules( { MainModule.class}) @At("/xxx") public class MainModule { public MainModule() { } @At("/test") public String test() { return ""; } } [2013-06-23 03:01:16,641] [main] DEBUG org.nutz.mvc.impl.UrlMappingImpl - '/xxx/xxx/test' >> MainModule.test(...) : String | @Ok(null ) @Fail(null ) | by 0 Filters | (I:UTF-8/O:UTF-8)
为什么url映射路径是'/xxx/xxx/test'呢??? 如果把MainModule类的@At("/xxx")去掉后,映射路径就变为'/test',是否可以理解为主modal不能映射路径?
第二个问题: 在MainModule中增加内部类SubModule后,报如下异常: org.nutz.lang.born.BorningException: Fail to born 'com.xxx.console.web.action.MainModule$SubModule' by args: [] at org.nutz.lang.Mirror.born(Mirror.java:924) at org.nutz.mvc.impl.processor.ModuleProcessor.init(ModuleProcessor.java:45) at org.nutz.mvc.impl.NutActionChainMaker.eval(NutActionChainMaker.java:34) at org.nutz.mvc.impl.UrlMappingImpl.add(UrlMappingImpl.java:46) at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:180) at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:96) at org.nutz.mvc.ActionHandler.(ActionHandler.java:19)
at org.nutz.mvc.NutFilter.init(NutFilter.java:51)
--MainModule.java
@Modules(scanPackage = true)
@At("/xxx")
public class MainModule {
public MainModule() {
}
@At("/test")
public String test() {
return "";
}
@At("/yyy") public class SubModule { public SubModule() { }
@At("/test") public String test() { return ""; } } }
我估计应该是内部类实例化时报错导致的,是否不能用内部类的方式?
第三个问题: SELECT A.ID, A.FLOW_ID, B.NAME FLOW_NAME, C.NAME TYPE_NAME, C.SVG, A.TITLE, A.TRANSLATE_X, A.TRANSLATE_Y, A.EXEC_STATE FROM FLOW_ITEM A, FLOW B, FLOW_TYPE C WHERE A.FLOW_ID = @FLOW_ID AND A.FLOW_ID = B.ID AND A.TYPE_ID = C.ID Sql sql = Sqls.create(上面的SQL); sql.params().set("FLOW_ID", 5);
报错如下: [2013-06-24 15:22:18,154] [http-80-2] DEBUG org.nutz.dao.impl.sql.run.NutDaoExecutor - SELECT A.ID, A.FLOW_ID, B.NAME FLOW_NAME, C.NAME TYPE_NAME, C.SVG, A.TITLE, A.TRANSLATE_X, A.TRANSLATE_Y, A.EXEC_STATE FROM FLOW_ITEM A, FLOW B, FLOW_TYPE C WHERE A.FLOW_ID = [2013-06-24 15:22:18,187] [http-80-2] DEBUG org.nutz.dao.impl.sql.run.NutDaoExecutor - SQLException java.sql.SQLException: ORA-01008: 并非所有变量都已绑定
解出来的SQL不对,从参数以后的SQL都没了,是否程序bug还是用法有问题?