Attribute "not-null" must be declared for element type "property"解决办法
Attribute "not-null" must be declared for element type "property"解决办法
在hiberante中编写映射文件时语法报错,原因是xml的DTD文件头不对
这是因为我是复制了hibernate.cfg.xml的头部文件
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
映射的文件,应该改为mapping的头文件就行了
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
修改后,再看语法检查就不报错了!
Attribute "not-null" must be declared for element type "property"解决办法的更多相关文章
- Multiple annotations found at this line: - The content of element type "mapper" must match "EMPTY". - Attribute "namespace" must be declared for element type "mapper".
今天在mybatis的mapper映射配置文件中遇到了这样的问题,困扰了我3个小时: Multiple annotations found at this line: - The content of ...
- Attribute "resultType" must be declared for element type "insert"或"update"
Attribute "resultType" must be declared for element type "insert"或"update&q ...
- Attribute name invalid for tag form according to TLD异常解决办法_gaigai_百度空间
body{ font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI& ...
- javascript数组、对象和Null的typeof同为object,区分解决办法
在JS里typeof 大家用的很多,可以使对于数组.对象和Null无法区分的问题,看了看犀牛书还是有解决办法的. document.writeln(typeof "abc"); / ...
- Attribute "resource" must be declared for element type "mapper".
今天在玩mybatis的时候,遇到这个奇葩问题. 最后发现,原因是 dtd文件配置错误了.错把Mapper的直接copy过来 把DOCTYPE mapper改成configuration,Mapper ...
- Attribute "resultType" must be declared for element type "insert".
这是mybatis插入数据库之后出现的问题,至于为什么出现这个问题,是因为插入的时候你照抄了查询的语句,插入的时候只有id属性和parameterType属性,并没有“resultType”属性,要注 ...
- Attribute "resultType" must be declared for element type "update" or "insert"
仔细查看错误如图所示: 解决错误就是把resultType去掉,因为在insert和update语句中是没有返回值的.小坑小坑 转自:https://blog.csdn.net/u013144287/ ...
- 《Spring实战》-- 'cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element' 错误的解决办法
在Eclipse中新建了一个maven项目学习Spring,在 service.xml 中配置 Spring,想要学习'面向切面的Spring',service.xml 内容如下: <beans ...
- 写hibernate.cfg.xml时报错The content of element type "property" must match "(meta*,(column|formula)*,type?)".
原配置文件是这样的 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-ma ...
随机推荐
- RHEL6.4上Samba/NFS服务器简单配置
近期在RHEL6.4上尝试搭建一个NAS,底层使用XFS文件系统,对外主要提供samba协议和NFS协议共享,这里把主要步骤记录下来. 环境:RHEL6.4,IP:192.168.50.117 1.关 ...
- Javaweb学习笔记10—文件上传与下载
今天来讲javaweb的第10阶段学习.文件的上传与下载,今天主要说的是这个功能的实现,不用说了,听名字就是外行人也知道肯定很重要啦. 老规矩,首先先用一张思维导图来展现今天的博客内容. ...
- JavaScript 字符串与数字的相互转换
js字符串转换成数字 js 字符串转换数字方法主要有三种:转换函数.强制类型转换.利用JS变量弱类型特点进行转换 1. 转换函数:js提供了parseInt()和parseFloat()两个转换函数. ...
- python+selenium(python基础)
1.编辑器的选择 好刀不误砍柴工,那么我们写代码也需要一个利器,虽然python自带有python shell ,但我们在执行代码的时候,需要开很多窗口,最重要的一点是,代码文件的管理很不方便,笔者推 ...
- python实现: protobuf解释器
之前项目为了自动化,所以写一个protobuf的解释器,用来生成项目所需的格式. 当然现在通过以下链接的指导,跳过手工分析,直接生成代码了. https://developers.google.com ...
- 【opencv】imread CV_LOAD_IMAGE_GRAYSCALE
转灰度图的操作很多,但是opencv中的CV_LOAD_IMAGE_GRAYSCALE的具体操作为: gray = 0.299 * r + 0.587 * g + 0.114 * b 然后,小数点部分 ...
- Python 使用random模块生成随机数
需要先导入 random 模块,然后通过 random 静态对象调用该一些方法. random() 函数中常见的方法如下: # coding: utf-8 # Team : Quality Mana ...
- 通过JS加载XML文件,跨浏览器兼容
引言 通过JS加载XML文件,跨多种浏览器兼容. 在Chrome中,没有load方法,需要特殊处理! 解决方案 部分代码 try //Internet Explorer { xmlDoc=new Ac ...
- vscode F12 不能用,原来是快捷键冲突了。
vscode F12 不能用,原来是快捷键冲突了.
- 关于apache access log 统计的那些事儿
统计APACHE ACCESS.LOG IP访问记录 可以根据自己的需要,统计很多,每个IP访问多少个页面等等! cat access.log-20090904 |awk '{print $3}'|s ...