错误:Element type "select" must be declared.
来源:互联网 发布:斧子演示 mac 编辑:程序博客网 时间:2024/05/16 12:04
在刚刚学习ibatis时,使用的jar包是ibatis-sqlmap-2.3.4.726-sources.jar,一运行就碰到了异常:Element type "select" must be declared.网上查了好久也没有找到是什么原因造成的,后来自己从网上下载了一个ibatis-2.3.4.726.zip查看里面的例子,一对照自己的配置就发现了问题所在是因为我违背了DTD的声明格式。
我的ibaties的DTD格式是:
1、sql-map-config.xml中的DTD格式
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
改成:
<!DOCTYPE sqlMapConfig
PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
2、Student.xml中的DTD格式
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
改成:
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
改完之后就可以运行了。
- 错误:Element type "select" must be declared.
- Element type "Select" must be declared.
- Attribute "resultCalss" must be declared for element type "select".
- Element type "acton" must be declared.
- Element type "IF" must be declared
- Attribute "nameSpace" must be declared for element type "sqlMap".
- Attribute "scope" must be declared for element type "bean"
- "scope" must be declared for element type "bean"异常
- Attribute "column" must be declared for element type "property"解决办法
- Attribute "scope" must be declared for element type "bean"-[spring]
- Attribute "column" must be declared for element type "property"解决办法
- scope" must be declared for element type "bean"异常
- Attribute "resultClass" must be declared for element type "insert".
- Attribute "statementType" must be declared for element type "procedure"
- 1.Attribute "table" must be declared for element type "subclass".
- Attribute "scope" must be declared for element type "bean"
- Attribute "scope" must be declared for element type "bean"
- “scope” must be declared for element type “bean”异常
- Fedora15 默认OpenJDK与SunJDK互相切换(转)
- MYECLISE6.5下CDT安装
- cdma pdu解析终极文档
- linux驱动头文件说明
- java简单聊天代码
- 错误:Element type "select" must be declared.
- 最近google.com打不开了
- C 标准管道send
- c/c++各种字符、字符串类型转换
- C 标准管道 revc
- c/c++ 中文件路径的表示
- 为何加入:private static final long serialVersionUID
- POJ 1696 Space Ant (叉积,三点共线)
- 面象对象设计总结