-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 4.20.13, 5.7.1
-
Component/s: Knowledge Base
-
12
-
Severity 3 - Minor
-
20
Issue Summary
When adding a Confluence space link for a Knowledge Base created by another JSM project, already deleted, we can observe that frequently the error "Retrieved KB link has a null PORTAL.ID when it's expected to be non-null" is logged on Atlassian-jira.log
There is no impact perceived by the users when using the portal (only noisy in the log files).
Steps to Reproduce
1. Create an application link between Jira and Confluence (for this test, I used Jira 9.7.1 and Confluence DC 7.18.1)
2. On Jira Admin > Applications > Jira Service Management > Configuration, select "No, let me do it myself"
3. Create a JSM project, for instance, Customer Service (CS)
4. Reach the Knowledge base icon and hit the "Create new space" link - it will create a CS space on Confluence
5. Hit the Create article
6. Create an article "Install test" and publish
7. Open the portal
8. Search for the article created, typing "Install test"
9. Click the suggested article link. Observe the log files for the request /rest/servicedesk/1/customer/models. No error/warn triggered.
10. Open the portal, create a new Technical Support request "how to install" - does not select any article and create the request
11. On Jira, assign the request and move to in progress
12. Hit the "Share as Comment" for the article "Install test" and bounce the comment to Customer;
13. Open the portal, refresh the request and hit the link to see the article. Observe the log files, no warn/errors triggered.
14. Delete the project CS
15.
Observe the log files while the project is being deleted /secure/project/DeleteProjectProgress.jspa:
2023-04-13 16:06:49,418-0300 http-nio-8080-exec-24 url: /secure/project/DeleteProjectProgress.jspa, /secure/admin/views/deleteprojectprogress.jsp; user: isabel WARN isabel 966x2208x1 wsgeyi 0:0:0:0:0:0:0:1 /secure/project/DeleteProjectProgress.jspa [c.a.jira.permission.DefaultPermissionSchemeManager] No permission scheme is associated with project 'cs' 2023-04-13 16:06:49,418-0300 http-nio-8080-exec-24 url: /secure/project/DeleteProjectProgress.jspa, /secure/admin/views/deleteprojectprogress.jsp; user: isabel WARN isabel 966x2208x1 wsgeyi 0:0:0:0:0:0:0:1 /secure/project/DeleteProjectProgress.jspa [c.a.jira.permission.DefaultPermissionSchemeManager] No permission scheme is associated with project 'cs' 2023-04-13 16:06:49,430-0300 JiraTaskExecutionThread-2 WARN isabel [c.a.jira.permission.DefaultPermissionSchemeManager] No permission scheme is associated with project 'cs' 2023-04-13 16:06:49,460-0300 http-nio-8080-exec-24 url: /secure/project/DeleteProjectProgress.jspa, /secure/admin/views/deleteprojectprogress.jsp; user: isabel WARN isabel 966x2208x1 wsgeyi 0:0:0:0:0:0:0:1 /secure/project/DeleteProjectProgress.jspa [c.a.jira.permission.DefaultPermissionSchemeManager] No permission scheme is associated with project 'cs' 2023-04-13 16:06:49,460-0300 http-nio-8080-exec-24 url: /secure/project/DeleteProjectProgress.jspa, /secure/admin/views/deleteprojectprogress.jsp; user: isabel WARN isabel 966x2208x1 wsgeyi 0:0:0:0:0:0:0:1 /secure/project/DeleteProjectProgress.jspa [c.a.jira.permission.DefaultPermissionSchemeManager] No permission scheme is associated with project 'cs' 2023-04-13 16:06:49,462-0300 JiraTaskExecutionThread-2 INFO isabel [c.a.jira.index.MonitoringIndexWriter] [JIRA-STATS] [lucene-stats] flush stats: isForegroundIndexing=false, snapshotCount=3, totalCount=3, periodSec=2215, flushIntervalMillis=738666, snapshotNoDocs=0, totalNoDocs=0, indexDirectory=/Users/imurakami/myjira/atlassian-jira-software-9.7.1-standalone/jira-home/caches/indexesV2/entities/portalpage, indexWriterId=com.atlassian.jira.index.MonitoringIndexWriter@15ffd888, indexDirectoryId=MMapDirectory@/Users/imurakami/myjira/atlassian-jira-software-9.7.1-standalone/jira-home/caches/indexesV2/entities/portalpage lockFactory=org.apache.lucene.store.NativeFSLockFactory@4675f23e 2023-04-13 16:06:49,614-0300 JiraTaskExecutionThread-2 ERROR isabel [c.a.s.i.f.c.r.r.advanced.auditing.RequestTypeAuditManagerImpl] Error occurred in retrieving project object by Id 10001 : Project was not found. Request type deletion won't be audited. 2023-04-13 16:06:49,618-0300 JiraTaskExecutionThread-2 ERROR isabel [c.a.s.i.f.c.r.r.advanced.auditing.RequestTypeAuditManagerImpl] Error occurred in retrieving project object by Id 10001 : Project was not found. Request type deletion won't be audited. 2023-04-13 16:06:49,620-0300 JiraTaskExecutionThread-2 ERROR isabel [c.a.s.i.f.c.r.r.advanced.auditing.RequestTypeAuditManagerImpl] Error occurred in retrieving project object by Id 10001 : Project was not found. Request type deletion won't be audited. 2023-04-13 16:06:49,621-0300 JiraTaskExecutionThread-2 ERROR isabel [c.a.s.i.f.c.r.r.advanced.auditing.RequestTypeAuditManagerImpl] Error occurred in retrieving project object by Id 10001 : Project was not found. Request type deletion won't be audited. 2023-04-13 16:06:49,623-0300 JiraTaskExecutionThread-2 ERROR isabel [c.a.s.i.f.c.r.r.advanced.auditing.RequestTypeAuditManagerImpl] Error occurred in retrieving project object by Id 10001 : Project was not found. Request type deletion won't be audited. 2023-04-13 16:06:49,625-0300 JiraTaskExecutionThread-2 ERROR isabel [c.a.s.i.f.c.r.r.advanced.auditing.RequestTypeAuditManagerImpl] Error occurred in retrieving project object by Id 10001 : Project was not found. Request type deletion won't be audited. 2023-04-13 16:06:49,627-0300 JiraTaskExecutionThread-2 ERROR isabel [c.a.s.i.f.c.r.r.advanced.auditing.RequestTypeAuditManagerImpl] Error occurred in retrieving project object by Id 10001 : Project was not found. Request type deletion won't be audited. 2023-04-13 16:06:49,648-0300 JiraTaskExecutionThread-2 ERROR isabel [c.a.s.i.confluenceknowledgebase.kblink.ConfluenceKBLinkQStore] Retrieved KB link has a null PORTAL.ID when it's expected to be non-null 2023-04-13 16:06:49,683-0300 JiraTaskExecutionThread-2 WARN isabel [c.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'com.querydsl.core.QueryException - Caught JdbcSQLIntegrityConstraintViolationException for delete from "PUBLIC"."AO_54307E_SERVICEDESK" where "AO_54307E_SERVICEDESK"."ID" = ?'.
Note: With debug com.querydsl.sql we can observe the following SQL before the error:
JiraTaskExecutionThread-1 DEBUG isabel 625x1920x1 c3pshz 0:0:0:0:0:0:0:1 /secure/project/DeleteProject.jspa [c.querydsl.sql.AbstractSQLQuery] select "AO_54307E_CONFLUENCEKB"."APPLINKS_APPLICATION_ID", "AO_54307E_CONFLUENCEKB"."APPLINK_NAME", "AO_54307E_CONFLUENCEKB"."APPLINK_URL", "AO_54307E_CONFLUENCEKB"."ID", "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID", "AO_54307E_CONFLUENCEKB"."SPACE_KEY", "AO_54307E_CONFLUENCEKB"."SPACE_NAME", "AO_54307E_CONFLUENCEKB"."SPACE_URL", "AO_54307E_VIEWPORT"."ID" from "public"."AO_54307E_CONFLUENCEKB" "AO_54307E_CONFLUENCEKB" left join "public"."AO_54307E_SERVICEDESK" "AO_54307E_SERVICEDESK" on "AO_54307E_SERVICEDESK"."ID" = "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" left join "public"."AO_54307E_VIEWPORT" "AO_54307E_VIEWPORT" on "AO_54307E_SERVICEDESK"."PROJECT_ID" = "AO_54307E_VIEWPORT"."PROJECT_ID" where "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" = ? limit ? JiraTaskExecutionThread-1 ERROR isabel 625x1920x1 c3pshz 0:0:0:0:0:0:0:1 /secure/project/DeleteProject.jspa [c.a.s.i.confluenceknowledgebase.kblink.ConfluenceKBLinkQStore] Retrieved KB link has a null PORTAL.ID when it's expected to be non-null
16. Create a new project cs1
17. Link the previous space cs to the new project cs1
18. Open the portal
19. Search for the article created, typing "Install test"
20. Click the suggested article link. Observe the log files.
Expected Results
The article is presented without errors logged in the log files.
Actual Results
The article is presented but the error "Retrieved KB link has a null PORTAL.ID when it's expected to be non-null" is observed in the log files;
The below exception is thrown in the Atlassian-jira.log file. The debug is enabled for com.querydsl.sql:
2023-04-13 16:28:17,173-0300 http-nio-8080-exec-24 url: /rest/servicedesk/1/customer/models; user: isabel DEBUG isabel 988x2484x1 184b3we 0:0:0:0:0:0:0:1 /rest/servicedesk/1/customer/models [c.querydsl.sql.AbstractSQLQuery] select "AO_54307E_ORGANIZATION"."ID", "AO_54307E_ORGANIZATION"."NAME" from "PUBLIC"."AO_54307E_ORGANIZATION" "AO_54307E_ORGANIZATION" inner join "PUBLIC"."AO_54307E_ORGANIZATION_MEMBER" "AO_54307E_ORGANIZATION_MEMBER" on "AO_54307E_ORGANIZATION_MEMBER"."ORGANIZATION_ID" = "AO_54307E_ORGANIZATION"."ID" where "AO_54307E_ORGANIZATION_MEMBER"."USER_KEY" = ? 2023-04-13 16:28:17,174-0300 http-nio-8080-exec-24 url: /rest/servicedesk/1/customer/models; user: isabel DEBUG isabel 988x2484x1 184b3we 0:0:0:0:0:0:0:1 /rest/servicedesk/1/customer/models [c.querydsl.sql.AbstractSQLQuery] select "AO_54307E_CONFLUENCEKB"."APPLINKS_APPLICATION_ID", "AO_54307E_CONFLUENCEKB"."APPLINK_NAME", "AO_54307E_CONFLUENCEKB"."APPLINK_URL", "AO_54307E_CONFLUENCEKB"."ID", "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID", "AO_54307E_CONFLUENCEKB"."SPACE_KEY", "AO_54307E_CONFLUENCEKB"."SPACE_NAME", "AO_54307E_CONFLUENCEKB"."SPACE_URL", "AO_54307E_VIEWPORT"."ID" from "PUBLIC"."AO_54307E_CONFLUENCEKB" "AO_54307E_CONFLUENCEKB" left join "PUBLIC"."AO_54307E_SERVICEDESK" "AO_54307E_SERVICEDESK" on "AO_54307E_SERVICEDESK"."ID" = "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" left join "PUBLIC"."AO_54307E_VIEWPORT" "AO_54307E_VIEWPORT" on "AO_54307E_SERVICEDESK"."PROJECT_ID" = "AO_54307E_VIEWPORT"."PROJECT_ID" where "AO_54307E_CONFLUENCEKB"."APPLINKS_APPLICATION_ID" = ? order by "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" asc 2023-04-13 16:28:17,174-0300 http-nio-8080-exec-24 url: /rest/servicedesk/1/customer/models; user: isabel ERROR isabel 988x2484x1 184b3we 0:0:0:0:0:0:0:1 /rest/servicedesk/1/customer/models [c.a.s.i.confluenceknowledgebase.kblink.ConfluenceKBLinkQStore] Retrieved KB link has a null PORTAL.ID when it's expected to be non-null
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
Other KB-related actions will also trigger the error
When Accessing a shared link:
- Open the portal, create a new Technical Support request "how to install" - does not select any article and create the request
- On Jira, assign the request and move it to in progress
- Share the article "Install test" as a comment to Customer
- Open the portal and view the request.
- Hit the link. Log file shows:
2023-04-13 16:38:20,013-0300 http-nio-8080-exec-12 url: /rest/servicedesk/1/customer/models; user: isabel DEBUG isabel 998x2709x1 bylys0 0:0:0:0:0:0:0:1 /rest/servicedesk/1/customer/models [c.querydsl.sql.AbstractSQLQuery] select "AO_54307E_ORGANIZATION"."ID", "AO_54307E_ORGANIZATION"."NAME" from "PUBLIC"."AO_54307E_ORGANIZATION" "AO_54307E_ORGANIZATION" inner join "PUBLIC"."AO_54307E_ORGANIZATION_MEMBER" "AO_54307E_ORGANIZATION_MEMBER" on "AO_54307E_ORGANIZATION_MEMBER"."ORGANIZATION_ID" = "AO_54307E_ORGANIZATION"."ID" where "AO_54307E_ORGANIZATION_MEMBER"."USER_KEY" = ? 2023-04-13 16:38:20,014-0300 http-nio-8080-exec-12 url: /rest/servicedesk/1/customer/models; user: isabel DEBUG isabel 998x2709x1 bylys0 0:0:0:0:0:0:0:1 /rest/servicedesk/1/customer/models [c.querydsl.sql.AbstractSQLQuery] select "AO_54307E_CONFLUENCEKB"."APPLINKS_APPLICATION_ID", "AO_54307E_CONFLUENCEKB"."APPLINK_NAME", "AO_54307E_CONFLUENCEKB"."APPLINK_URL", "AO_54307E_CONFLUENCEKB"."ID", "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID", "AO_54307E_CONFLUENCEKB"."SPACE_KEY", "AO_54307E_CONFLUENCEKB"."SPACE_NAME", "AO_54307E_CONFLUENCEKB"."SPACE_URL", "AO_54307E_VIEWPORT"."ID" from "PUBLIC"."AO_54307E_CONFLUENCEKB" "AO_54307E_CONFLUENCEKB" left join "PUBLIC"."AO_54307E_SERVICEDESK" "AO_54307E_SERVICEDESK" on "AO_54307E_SERVICEDESK"."ID" = "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" left join "PUBLIC"."AO_54307E_VIEWPORT" "AO_54307E_VIEWPORT" on "AO_54307E_SERVICEDESK"."PROJECT_ID" = "AO_54307E_VIEWPORT"."PROJECT_ID" where "AO_54307E_CONFLUENCEKB"."APPLINKS_APPLICATION_ID" = ? order by "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" asc 2023-04-13 16:38:20,014-0300 http-nio-8080-exec-12 url: /rest/servicedesk/1/customer/models; user: isabel ERROR isabel 998x2709x1 bylys0 0:0:0:0:0:0:0:1 /rest/servicedesk/1/customer/models [c.a.s.i.confluenceknowledgebase.kblink.ConfluenceKBLinkQStore] Retrieved KB link has a null PORTAL.ID when it's expected to be non-null
When reaching the latest recommended articles
- On the portal, reach the "Help Center" and type "Install". Observe the logs for the request /rest/servicedesk/knowledgebase/latest/articles/shared/search:
2023-04-13 16:48:03,888-0300 http-nio-8080-exec-4 url: /rest/servicedesk/knowledgebase/latest/articles/shared/search; user: isabel DEBUG isabel 1008x2804x1 1csvkfh 0:0:0:0:0:0:0:1 /rest/servicedesk/knowledgebase/latest/articles/shared/search [c.querydsl.sql.AbstractSQLQuery] select "AO_54307E_CONFLUENCEKB"."APPLINKS_APPLICATION_ID", "AO_54307E_CONFLUENCEKB"."APPLINK_NAME", "AO_54307E_CONFLUENCEKB"."APPLINK_URL", "AO_54307E_CONFLUENCEKB"."ID", "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID", "AO_54307E_CONFLUENCEKB"."SPACE_KEY", "AO_54307E_CONFLUENCEKB"."SPACE_NAME", "AO_54307E_CONFLUENCEKB"."SPACE_URL", "AO_54307E_VIEWPORT"."ID" from "PUBLIC"."AO_54307E_CONFLUENCEKB" "AO_54307E_CONFLUENCEKB" left join "PUBLIC"."AO_54307E_SERVICEDESK" "AO_54307E_SERVICEDESK" on "AO_54307E_SERVICEDESK"."ID" = "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" left join "PUBLIC"."AO_54307E_VIEWPORT" "AO_54307E_VIEWPORT" on "AO_54307E_SERVICEDESK"."PROJECT_ID" = "AO_54307E_VIEWPORT"."PROJECT_ID" where "AO_54307E_CONFLUENCEKB"."APPLINKS_APPLICATION_ID" = ? and "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" = ? order by "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" asc 2023-04-13 16:48:03,923-0300 http-nio-8080-exec-4 url: /rest/servicedesk/knowledgebase/latest/articles/shared/search; user: isabel DEBUG isabel 1008x2804x1 1csvkfh 0:0:0:0:0:0:0:1 /rest/servicedesk/knowledgebase/latest/articles/shared/search [c.querydsl.sql.AbstractSQLQuery] select "AO_54307E_CONFLUENCEKB"."APPLINKS_APPLICATION_ID", "AO_54307E_CONFLUENCEKB"."APPLINK_NAME", "AO_54307E_CONFLUENCEKB"."APPLINK_URL", "AO_54307E_CONFLUENCEKB"."ID", "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID", "AO_54307E_CONFLUENCEKB"."SPACE_KEY", "AO_54307E_CONFLUENCEKB"."SPACE_NAME", "AO_54307E_CONFLUENCEKB"."SPACE_URL", "AO_54307E_VIEWPORT"."ID" from "PUBLIC"."AO_54307E_CONFLUENCEKB" "AO_54307E_CONFLUENCEKB" left join "PUBLIC"."AO_54307E_SERVICEDESK" "AO_54307E_SERVICEDESK" on "AO_54307E_SERVICEDESK"."ID" = "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" left join "PUBLIC"."AO_54307E_VIEWPORT" "AO_54307E_VIEWPORT" on "AO_54307E_SERVICEDESK"."PROJECT_ID" = "AO_54307E_VIEWPORT"."PROJECT_ID" where "AO_54307E_CONFLUENCEKB"."SPACE_KEY" = ? 2023-04-13 16:48:03,923-0300 http-nio-8080-exec-4 url: /rest/servicedesk/knowledgebase/latest/articles/shared/search; user: isabel ERROR isabel 1008x2804x1 1csvkfh 0:0:0:0:0:0:0:1 /rest/servicedesk/knowledgebase/latest/articles/shared/search [c.a.s.i.confluenceknowledgebase.kblink.ConfluenceKBLinkQStore] Retrieved KB link has a null PORTAL.ID when it's expected to be non-null
- Hit the link to open the article. Observe the logs for the request /servicedesk/customer/kb/view/3571739:
2023-04-13 16:47:02,730-0300 http-nio-8080-exec-6 url: /servicedesk/customer/kb/view/3571739, /rest/servicedesk/1/customer/pages/kb/view/3571739; user: isabel DEBUG isabel 1007x2761x1 1urppwb 0:0:0:0:0:0:0:1 /servicedesk/customer/kb/view/3571739 [c.querydsl.sql.AbstractSQLQuery] select "AO_54307E_CONFLUENCEKB"."APPLINKS_APPLICATION_ID", "AO_54307E_CONFLUENCEKB"."APPLINK_NAME", "AO_54307E_CONFLUENCEKB"."APPLINK_URL", "AO_54307E_CONFLUENCEKB"."ID", "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID", "AO_54307E_CONFLUENCEKB"."SPACE_KEY", "AO_54307E_CONFLUENCEKB"."SPACE_NAME", "AO_54307E_CONFLUENCEKB"."SPACE_URL", "AO_54307E_VIEWPORT"."ID" from "PUBLIC"."AO_54307E_CONFLUENCEKB" "AO_54307E_CONFLUENCEKB" left join "PUBLIC"."AO_54307E_SERVICEDESK" "AO_54307E_SERVICEDESK" on "AO_54307E_SERVICEDESK"."ID" = "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" left join "PUBLIC"."AO_54307E_VIEWPORT" "AO_54307E_VIEWPORT" on "AO_54307E_SERVICEDESK"."PROJECT_ID" = "AO_54307E_VIEWPORT"."PROJECT_ID" where "AO_54307E_CONFLUENCEKB"."APPLINKS_APPLICATION_ID" = ? order by "AO_54307E_CONFLUENCEKB"."SERVICE_DESK_ID" asc 2023-04-13 16:47:02,730-0300 http-nio-8080-exec-6 url: /servicedesk/customer/kb/view/3571739, /rest/servicedesk/1/customer/pages/kb/view/3571739; user: isabel ERROR isabel 1007x2761x1 1urppwb 0:0:0:0:0:0:0:1 /servicedesk/customer/kb/view/3571739 [c.a.s.i.confluenceknowledgebase.kblink.ConfluenceKBLinkQStore] Retrieved KB link has a null PORTAL.ID when it's expected to be non-null