启动提示sec_user缺少GROUP_NAMES字段,但我看了User类发现没有这个字段的定义

使用版本是7.1.4,之前想升级成7.2.1没有成功变改回了7.1.4
报错信息:

> javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.3.6-cuba): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: com.microsoft.sqlserver.jdbc.SQLServerException: 列名 'GROUP_NAMES' 无效。
> Error Code: 207
> Call: SELECT ID, ACTIVE, CHANGE_PASSWORD_AT_LOGON, CREATE_TS, CREATED_BY, DELETE_TS, DELETED_BY, EMAIL, FIRST_NAME, **GROUP_NAMES**, IP_MASK, LANGUAGE_, LAST_NAME, LOGIN, LOGIN_LC, MIDDLE_NAME, NAME, PASSWORD, PASSWORD_ENCRYPTION, POSITION_, SYS_TENANT_ID, TIME_ZONE, TIME_ZONE_AUTO, UPDATE_TS, UPDATED_BY, VERSION, GROUP_ID FROM SEC_USER WHERE (((LOGIN_LC = ?) AND ((ACTIVE = ?) OR (ACTIVE IS NULL))) AND (DELETE_TS IS NULL))
> 	bind => [anonymous, true]
> Query: ReadAllQuery(referenceClass=User sql="SELECT ID, ACTIVE, CHANGE_PASSWORD_AT_LOGON, CREATE_TS, CREATED_BY, DELETE_TS, DELETED_BY, EMAIL, FIRST_NAME, **GROUP_NAMES**, IP_MASK, LANGUAGE_, LAST_NAME, LOGIN, LOGIN_LC, MIDDLE_NAME, NAME, PASSWORD, PASSWORD_ENCRYPTION, POSITION_, SYS_TENANT_ID, TIME_ZONE, TIME_ZONE_AUTO, UPDATE_TS, UPDATED_BY, VERSION, GROUP_ID FROM SEC_USER WHERE (((LOGIN_LC = ?) AND ((ACTIVE = ?) OR (ACTIVE IS NULL))) AND (DELETE_TS IS NULL))")

这应该是用了 7.2 的库。 改成 7.1.4 之后,有没有进行 Gradle 同步?我用 7.1.4 没有重现你这个问题。另外,也可以检查下项目的依赖库是否正确:

image
已经切换为7.1.4但还是报这个错

将deploy中的tomcat/webapp/app-core/lib下的7.2.1版本的jar包删除即可

那就是降低版本后先 undeploy 一下