Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7286

JPA : PersistenceException on refreshAccessToken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1.11, 3.2.0
    • None
    • None
    • Unknown

    Description

      I'm using JPAOAuthDataProvider, and I have the following error whenever a OIDC client tries to refresh an accessToken :

      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)
      

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            gonzalad Adrian Gonzalez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: