[ https://issues.apache.org/jira/browse/CXF-7286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-7286. ----------------------------------- Resolution: Fixed Assignee: Sergey Beryozkin Fix Version/s: 3.1.11 3.2.0 > JPA : PersistenceException on refreshAccessToken > ------------------------------------------------ > > Key: CXF-7286 > URL: https://issues.apache.org/jira/browse/CXF-7286 > Project: CXF > Issue Type: Bug > Reporter: gonzalad > Assignee: Sergey Beryozkin > Fix For: 3.2.0, 3.1.11 > > > I'm using JPAOAuthDataProvider, and I have the following error whenever a > OIDC client tries to refresh an accessToken : > {code} > idp_1 | javax.persistence.PersistenceException: > org.hibernate.HibernateException: Found shared references to a collection: > org.apache.cxf.rs.security.oauth2.tokens.bearer.BearerAccessToken.audiences > idp_1 | at > org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) > idp_1 | at > org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) > idp_1 | at > org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1316) > idp_1 | at > org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:999) > idp_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > idp_1 | at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > idp_1 | at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > idp_1 | at java.lang.reflect.Method.invoke(Method.java:498) > idp_1 | at > org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:298) > idp_1 | at com.sun.proxy.$Proxy44.flush(Unknown Source) > idp_1 | at > org.apache.cxf.rs.security.oauth2.provider.JPAOAuthDataProvider.flushIfNeeded(JPAOAuthDataProvider.java:402) > idp_1 | at > org.apache.cxf.rs.security.oauth2.provider.JPAOAuthDataProvider.executeInTransaction(JPAOAuthDataProvider.java:92) > idp_1 | at > org.apache.cxf.rs.security.oauth2.provider.JPAOAuthDataProvider.saveAccessToken(JPAOAuthDataProvider.java:263) > idp_1 | at > org.apache.cxf.rs.security.oauth2.provider.AbstractOAuthDataProvider.refreshAccessToken(AbstractOAuthDataProvider.java:191) > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)