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

Questions for Confluence throws 'An identifier or literal is invalid' error when using Oracle 19c

    XMLWordPrintable

Details

    Description

      The fix for this bug has been released to our Long Term Support release.

      The fix for this bug is now available in the latest release of Confluence 7.19

      Issue Summary

      If Confluence is connected to Oracle 19c and the Questions for Confluence app v3.0.5 (the latest) is installed, then you can't view questions, statistics or experts as it displays errors like these:

      Error occurred when loading questions!

      Please refresh the page or contact your administrator.

      Error occurred when loading your statistics!

      Please refresh the page or contact your administrator.

      Error occurred when loading experts!

      Please refresh the page or contact your administrator.

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      1. Install Confluence 7.18.2 (or any version compatible with Oracle 19c)
      2. Use Oracle 19c as a database
      3. Install Questions for Confluence version 3.0.5
      4. Load the page with questions/statistics/experts

      Expected Results

      The page should load fine and the information should appear as expected to users.

      Actual Results

      You see errors like these in the UI:

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

      2022-07-12 15:05:25,095 ERROR [http-nio-27182-exec-3] [rest.api.model.ExceptionConverter] convertServiceException No status code found for exception, converting to internal server error : 
       -- referer: http://localhost:27182/c7182/questions?src=header | url: /c7182/rest/questions/1.0/experts/reputation | traceId: 134ea0772dad4b6e | userName: admin
      javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query
      	at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:149)
      	at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:157)
      	at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1423)
      	at org.hibernate.query.internal.AbstractProducedQuery.getSingleResult(AbstractProducedQuery.java:1463)
      	at com.atlassian.confluence.plugins.questions.activeobjects.repository.AoExpertRepository.getReputation(AoExpertRepository.java:337)
      	at com.atlassian.confluence.plugins.questions.activeobjects.repository.CacheExpertRepository.getReputation(CacheExpertRepository.java:65)
      	at com.atlassian.confluence.plugins.questions.service.ExpertServiceImpl.getDetailedExpert(ExpertServiceImpl.java:101)
      	at com.atlassian.confluence.plugins.questions.rest.internal.ExpertsResource.getReputation(ExpertsResource.java:72)
      
      ...
      
      Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
      
      ...
      
      Caused by: java.sql.SQLException: An identifier or literal is invalid
      	at oracle.jdbc.driver.PhysicalConnection.enquoteIdentifier(PhysicalConnection.java:10453)
      	at oracle.jdbc.driver.OracleStatement.enquoteIdentifier(OracleStatement.java:6452)
      	at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:3853)
      	at oracle.jdbc.driver.InsensitiveScrollableResultSet.findColumn(InsensitiveScrollableResultSet.java:270)
      ...
      

      Workaround

      Revert to a previous version of the plugin that is compatible with your Confluence version.

      Note: This doesn't happen when using Oracle 12c.

      Attachments

        Issue Links

          Activity

            People

              5339cdd01cf4 Jeffery Xie
              azolkefli Athirah Zolkefli
              Votes:
              2 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: