-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: CQ-3.0.2, 7.16.3, 7.17.1
-
Component/s: Apps - Confluence Questions
-
Severity 2 - Major
Issue Summary
This is reproducible on Data Center: yes
When doing native query via Entity Manager:
With Oracle, the java.lang.ClassCastException will occur;
With SQL Server, java.lang.ClassCastException and org.hibernate.loader.custom.NonUniqueDiscoveredSqlAliasException will occur
Steps to Reproduce
- use Oracle or SQL Server as the database
- open Confluence Question(java.lang.ClassCastException)
- check question statistics(org.hibernate.loader.custom.NonUniqueDiscoveredSqlAliasException)
Expected Results
No errors and show questions or statistics correctly
Actual Results
The below exception is thrown:
1. java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to java.lang.Number at com.atlassian.confluence.plugins.questions.util.ResultSetHelper.getLong(ResultSetHelper.java:20) 2. org.hibernate.loader.custom.NonUniqueDiscoveredSqlAliasException: Encountered a duplicated sql alias [] during auto-discovery of a native-sql query at com.atlassian.confluence.plugins.questions.contenttype.repository.ContentTypeStatisticRepository.getContentCreationTimeSeries(ContentTypeStatisticRepository.java:205)
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available