异常详情:

Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at table: ss_user, for columns: [org.hibernate.mapping.Column(roles)]

    at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:336) ~[hibernate-core-4.3.5.Final.jar:4.3.5.Final]

    at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:310) ~[hibernate-core-4.3.5.Final.jar:4.3.5.Final]

    at org.hibernate.mapping.Property.isValid(Property.java:241) ~[hibernate-core-4.3.5.Final.jar:4.3.5.Final]

    at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:496) ~[hibernate-core-4.3.5.Final.jar:4.3.5.Final]

    at org.hibernate.mapping.RootClass.validate(RootClass.java:270) ~[hibernate-core-4.3.5.Final.jar:4.3.5.Final]

    at org.hibernate.cfg.Configuration.validate(Configuration.java:1358) ~[hibernate-core-4.3.5.Final.jar:4.3.5.Final]

    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1849) ~[hibernate-core-4.3.5.Final.jar:4.3.5.Final]

    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) ~[hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]

    ... 125 common frames omitted

解决的方法:

注解要么写在字段上,要么写在getXX上,千万千万不能混合使用,否则会报这个错误!

org.hibernate.MappingException: Could not determine type for: java.util.List, at table: user, for...的更多相关文章

  1. 实体类注解错误:Could not determine type for: java.util.List

    今天配置实体类注解时,出现以下错误: Caused by: org.hibernate.MappingException: Could not determine type for: java.uti ...

  2. JPA注解一对多报Could not determine type for: java.util.List错误

    在原来的项目上加新功能,启动后报Caused by: org.hibernate.MappingException: Could not determine type for: java.util.L ...

  3. Hibernate注解错误之- org.hibernate.MappingException: Could not determine type for:

    Hibernate 注解 @OneToOne 时候,出现以下错误,经调试,发现 注解要么全部放在字段上,要么全部放在get方法上,不能混合使用! org.hibernate.MappingExcept ...

  4. 今天遇到 Could not determine type for: java.util.List

    今天遇到 Could not determine type for: java.util.List 用hibernate 映射好好的竟然出现这个问题 以前也遇到过,但不知道怎么给解决了,今天又遇到了, ...

  5. Could not determine type for java util List

    问题场景:在实体类中需要使用List集合存储字段,启动时找不到List类型 问题解决:在字段上添加@ElementColletion(targetClass=String.class)表示是一个集合映 ...

  6. hibernate异常:Could not determine type for: java.util.Set

    根本原因:我实体类中的类型是raw,没法直接实例化的类型.private List<String> rightChoices;private Set<String> multi ...

  7. hibernate报错:MappingException: Could not determine type for...解决办法

    有时候实体里的一些属性并不想映射到数据库(比方说子级菜单List), 如果不做处理的话会报字段映射错误找不到这列Column Not Found 例如:org.hibernate.MappingExc ...

  8. hibernate 错误 could not determine type for

    今天配置实体类注解时,出现以下错误: org.hibernate.MappingException: Could not determine type for: com.oneToOne.IdCard ...

  9. 解决springmvc报No converter found for return value of type: class java.util.ArrayList问题

    一.背景 最近闲来无事,想自己搭建一套Spring+SpringMVC+Mybatis+Mysql的环境(搭建步骤会在以后博客中给出),结果运行程序时,适用@ResponseBody注解进行返回Lis ...

随机推荐

  1. SPARK如何使用AKKA实现进程、节点通信

    SPARK如何使用AKKA实现进程.节点通信 <深入理解Spark:核心思想与源码分析>一书前言的内容请看链接<深入理解SPARK:核心思想与源码分析>一书正式出版上市 < ...

  2. Windows 10Bash命令

    Windows 10预览版14316开启Bash命令支持 00x0 前言 4月7日凌晨,微软推送了最新的Windows 10一周年更新预览版14316,其中重要的是原生支持Linux Bash命令行支 ...

  3. web框架之Spring-MVC环境搭建(转)

    spring框架jar包 1.下载spring源包spring地址:http://www.springsource.org/download我下的是spring-framework-3.1.0.REL ...

  4. HYSBZ 2243(树链剖分)

    题目连接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=28982#problem/D 题意:给定一棵有n个节点的无根树及点权和m个操作, ...

  5. 阿尔贝我给我加i觉

    http://www.huihui.cn/share/8192186       http://www.huihui.cn/share/8192178       http://www.huihui. ...

  6. SWT的CheckBoxTreeView的上级菜单与下级菜单的选中的实现

    是不是很神奇? treeViewer.addCheckStateListener(new ICheckStateListener() { @Override public void checkStat ...

  7. vmware无法链接U盘:vm-->removeable devices.

    vmware无法链接U盘:vm-->removeable devices.

  8. 可兼容IE的jquery.cookie函数方法

    前言 在开发过程中,因为之前有接触过Discuz,就直接拿其common.js里面的getcookie和setcookie方法来使用,做到后面在使用IE来测试的时候,发现这两个方法子啊IE下不起作用, ...

  9. 基于MVC3下拉列表联动(JQuery)

    上次项目中遇到一个需要多个下拉列表联动的操作,今天有空将实现方式整理以便以后参考. 要达到的效果是,点击一个下拉框,则另一个下拉框的值发生对应变化.如:选择中国,则另个一下拉框里显示中国各个省份. 传 ...

  10. python学习笔记之十:文件和素材

    这里将介绍函数和对象--文件和流,让你在程序调用期间存储数据,并且可以处理来自其他程序的数据. 一. 打开文件 1.1 open函数 open函数用来打开文件,语法如下:open(name,[.mod ...