给用户分配权限时报错:
报错:Caused by: java.lang.reflect.UndeclaredThrowableException: TxEJB wrap a Not_BaseException while Reflect Invoke ControllerBean.
at com.kingdee.bos.transaction.EJBTxFacade.TxInvokerBean.invoke(TxInvokerBean.java:161)
at com.kingdee.bos.transaction.EJBTxFacade.TxInvokerBean.INVOKE_REQUIRED(TxInvokerBean.java:60)
... 16 more
Caused by: java.lang.StackOverflowError
at com.kingdee.bos.dao.AbstractBaseObjectValue.get(AbstractBaseObjectValue.java:623)
at com.kingdee.bos.dao.AbstractBaseObjectCollection.addObject(AbstractBaseObjectCollection.java:122)
at com.kingdee.bos.dao.AbstractBaseObjectCollection.addObjectCollection(AbstractBaseObjectCollection.java:171)
at com.kingdee.eas.base.permission.PermItemCollection.addCollection(PermItemCollection.java:18)
at com.kingdee.eas.base.permission.app.cache.PermItemCacheImpl.addAllDepPermItems(PermItemCacheImpl.java:336)
at com.kingdee.eas.base.permission.app.cache.PermItemCacheImpl.addAllDepPermItems(PermItemCacheImpl.java:337)
at com.kingdee.eas.base.permission.app.cache.PermItemCacheImpl.addAllDepPermItems(PermItemCacheImpl.java:337)
at com.kingdee.eas.base.permission.app.cache.PermItemCacheImpl.addAllDepPermItems(PermItemCacheImpl.java:337)
原因及解决方案:
存在循环依赖的权限项(二开权限项定义不规范),需要删除该脏数据
1、备份T_PM_PermDependency
select * into T_PM_PermDependency_bk from T_PM_PermDependency;
2、查询
select * from T_PM_PermDependency t1 where exists (select 1 from T_PM_PermDependency t2 where t2.fid = t1.fdependencyid and t2.fdependencyid = t1.fid);
3、删除
delete from T_PM_PermDependency t1 where exists (select 1 from T_PM_PermDependency t2 where t2.fid = t1.fdependencyid and t2.fdependencyid = t1.fid);
4、清理服务端权限项依赖数据的缓存,查询分析器选中下面这段脚本,点执行服务端脚本即可
com.kingdee.eas.base.permission.app.cache.PermItemCacheImpl.clear();
防止后续同步权限项再次插入该循环依赖数据,请根据以上数据修改二开权限项依赖关系再重新部署。
推荐阅读
您的鼓励与嘉奖将成为创作者们前进的动力,如果觉得本文还不错,可以给予作者创作打赏哦!
请选择打赏金币数 *