Uploaded image for project: 'GateIn Portal'
  1. GateIn Portal
  2. GTNPORTAL-3284

Errors in saving long access-token for some social networks

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.6.3.Final
    • Fix Version/s: 3.6.4.Final, 3.7.0.Final
    • Component/s: None
    • Labels:
      None

      Description

      In some cases, it could happen that during binding of user to some social network (Facebook/Google/Twitter), the binding is not successful because of the fact that access token or refresh token is too long and DB throws error because of size limit of particular column (H2 has default limit of 255 characters per column)

      The exception stacktrace could look like this:

      12:06:50,595 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/127.0.0.1:8080-3) SQL Error: 22001, SQLState: 22001
      12:06:50,595 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-/127.0.0.1:8080-3) Value too long for column "ATTR_VALUE VARCHAR(255)": "STRINGDECODE('VvjdI6prHvZXN6CG95jWIpkPLS0i6WMtitYVNeE8TRIfI3y+sCOxxJRqKIP9iCojWCajhup0QTro\nUe0YrgTbhKQbH7fMLEYOWKgtTNDt2omE5A0g... (259)"; SQL statement:
      insert into jbid_io_attr_text_values (TEXT_ATTR_VALUE_ID, ATTR_VALUE) values (?, ?) [22001-168]
      12:06:50,597 INFO [org.exoplatform.services.organization.idm.UserProfileDAOImpl] (http-/127.0.0.1:8080-3) Identity operation error: : org.hibernate.exception.DataException: could not execute statement
          at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:134)
          at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
          at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
          at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
          at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:136)
          at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:58)
          at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1474)
          at org.hibernate.action.internal.CollectionUpdateAction.execute(CollectionUpdateAction.java:86)
          at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
          at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
          at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:278)
          at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:328)
          at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:62)
          at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1205)
          at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1655)
          at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:374)
          at org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl.getAttributes(HibernateIdentityStoreImpl.java:2108) [picketlink-idm-hibernate-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
          at org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository.getAttributes(WrapperIdentityStoreRepository.java:392) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
          at org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.getAttributes(AttributesManagerImpl.java:194) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
          at org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.updateAttributes(AttributesManagerImpl.java:255) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
          at org.picketlink.idm.impl.api.session.managers.AttributesManagerImpl.updateAttributes(AttributesManagerImpl.java:280) [picketlink-idm-core-1.4.3.Final-redhat-2.jar:1.4.3.Final-redhat-2]
          at org.exoplatform.services.organization.idm.UserProfileDAOImpl.setProfile(UserProfileDAOImpl.java:259) [exo.portal.component.identity-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
          at org.exoplatform.services.organization.idm.UserProfileDAOImpl.saveUserProfile(UserProfileDAOImpl.java:97) [exo.portal.component.identity-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
          at org.gatein.security.oauth.data.SocialNetworkServiceImpl.updateOAuthInfo(SocialNetworkServiceImpl.java:136) [exo.portal.component.web.oauth-common-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
          at org.gatein.security.oauth.web.OAuthLinkAccountFilter.doFilter(OAuthLinkAccountFilter.java:91) [exo.portal.component.web.oauth-web-3.6.3.Final-redhat-4.jar:3.6.3.Final-redhat-4]
          at org.gatein.sso.integration.SSODelegateFilter$SSOFilterChain.doFilter(SSODelegateFilter.java:119) [sso-integration-1.3.4.Final-redhat-2.jar:1.3.4.Final-redhat-2] 
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mposolda Marek Posolda
                Reporter:
                mposolda Marek Posolda
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: