Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-63279

The Personal Access Token feature doesn’t work when using MS SQL Server

    XMLWordPrintable

Details

    Description

      Issue Summary

      The Personal Access Token feature doesn’t work in Confluence 7.11.2 running with the MSSQL database

      Steps to Reproduce

      1. Install Confluence 7.11.2 with MSSQL database
      2. Select your profile picture at top right of the screen, then choose  Settings > Personal Access Tokens 

      Expected Results

      You should be able to create the Personal Access Token

      Actual Results

      The below exception is seen in the atlassian.confluence.log file:

      2021-04-07 16:00:00,056 ERROR [Caesium-1-3] [atlassian.pats.jobs.ExpiryDateTokenCheckEventJob] lambda$publishEventsAboutExpiredTokens$0 Caught error fetching expired tokens
       -- referer: http://localhost:27112/c7112/setup/setupdata-start.action | url: /c7112/setup/setupdata.action | traceId: d0ac830aa374f424 | userName: anonymous | action: setupdata
      2021-04-07 16:00:00,056 ERROR [Caesium-1-3] [impl.schedule.caesium.JobRunnerWrapper] runJob Scheduled job ExpiryDateTokenCheckEventJob#ExpiryDateTokenCheckEventJob failed to run
       -- referer: http://localhost:27112/c7112/setup/setupdata-start.action | url: /c7112/setup/setupdata.action | traceId: d0ac830aa374f424 | userName: anonymous | action: setupdata
      com.querydsl.core.QueryException: Caught SQLServerException for select "AO_81F455_PERSONAL_TOKEN"."CREATED_AT", "AO_81F455_PERSONAL_TOKEN"."NAME", "AO_81F455_PERSONAL_TOKEN"."EXPIRING_AT", "AO_81F455_PERSONAL_TOKEN"."ID", "AO_81F455_PERSONAL_TOKEN"."LAST_ACCESSED_AT", "AO_81F455_PERSONAL_TOKEN"."HASHED_TOKEN", "AO_81F455_PERSONAL_TOKEN"."TOKEN_ID", "AO_81F455_PERSONAL_TOKEN"."USER_KEY", "AO_81F455_PERSONAL_TOKEN"."NOTIFICATION_STATE" from "null"."AO_81F455_PERSONAL_TOKEN" "AO_81F455_PERSONAL_TOKEN" where "AO_81F455_PERSONAL_TOKEN"."EXPIRING_AT" < ? and ("AO_81F455_PERSONAL_TOKEN"."NOTIFICATION_STATE" in (?, ?))
      	at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50)
      	at com.querydsl.sql.Configuration.translate(Configuration.java:459)
      	at com.querydsl.sql.AbstractSQLQuery.fetch(AbstractSQLQuery.java:502)
      	at 
      ...
      	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:35)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'null.AO_81F455_PERSONAL_TOKEN'.
      

      Workaround

      This requires downgrading the Personal Access Token (PAT) plugin which may not be compatible with 7.11.2

      1. Stop Confluence 7.11.2
      2. Copy/Download the pats-plugin-1.0.3.jar^^ from Confluence 7.11.1
      3. Place it in the confluence_install/confluence/WEB-INF/atlassian-bundled-plugins/ folder.
      4. From the same folder, move the pats-plugin-1.1.2.jar to another folder as backup.
      5. Start Confluence

      Attachments

        Issue Links

          Activity

            People

              hrehioui Hasnae (Inactive)
              aansari@atlassian.com Aamir (Inactive)
              Votes:
              14 Vote for this issue
              Watchers:
              35 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: