---
title: "实体类注解错误：Could not determine type for: java.util.List"
author: "nvry"
date: "2012-11-19T13:32:19Z"
tags: []
categories: ["开源软件"]
slug: "could-not-determine-type-for-java-util-list"
draft: false
lastmod: "2012-11-19T13:32:19Z"
id: 1729436
url: "https://nvry.iteye.com/blog/1729436"
---

今天配置实体类注解时，出现以下错误：

          Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at table: ss\_user, for columns: \[org.hibernate.mapping.Column(role\_list)]

 

解决方案：注解要么写在字段上，要么写在getXX上，千万千万不能混合使用，否则会报这个错误！