java.sql.SQLException: ORA-12704: character set mismatch

Atlassian JIRA | Carolyn French | 2 years ago
  1. 0

    If Confluence question is installed on a Confluence in conjunction with Oracle 11g the statistics page will not display anything: !Usage Statistics not showing up.PNG|thumbnail! If you check the atlassian-confluence logs you will see the following error: {code} 015-03-16 19:19:14,703 ERROR [http-bio-8090-exec-2950] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: StatementCallback; uncategorized SQLException for SQL [select count("tmp"."creator") from ((select "CONTENT"."CREATOR" "creator" from "CONTENT" "CONTENT" where "CONTENT"."PLUGINKEY" in ('com.atlassian.confluence.plugins.confluence-questions:question', 'com.atlassian.confluence.plugins.confluence-questions:answer', 'com.atlassian.confluence.plugins.confluence-questions:comment') and "CONTENT"."PREVVER" is null) union (select "AO_B1DBB9_VOTE"."USER_KEY" from "AO_B1DBB9_VOTE" "AO_B1DBB9_VOTE")) "tmp"]; SQL state [72000]; error code [12704]; ORA-12704: character set mismatch ; nested exception is java.sql.SQLException: ORA-12704: character set mismatch -- url: /confluence/rest/questions/1.0/statistics | userName: a4078 | referer: https://poc.amberroad.com/confluence/questions/stats org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [select count("tmp"."creator") from ((select "CONTENT"."CREATOR" "creator" from "CONTENT" "CONTENT" where "CONTENT"."PLUGINKEY" in ('com.atlassian.confluence.plugins.confluence-questions:question', 'com.atlassian.confluence.plugins.confluence-questions:answer', 'com.atlassian.confluence.plugins.confluence-questions:comment') and "CONTENT"."PREVVER" is null) union (select "AO_B1DBB9_VOTE"."USER_KEY" from "AO_B1DBB9_VOTE" "AO_B1DBB9_VOTE")) "tmp"]; SQL state [72000]; error code [12704]; ORA-12704: character set mismatch ; nested exception is java.sql.SQLException: ORA-12704: character set mismatch at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:466) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:474) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:479) at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:488) at com.atlassian.confluence.plugins.questions.contenttype.repository.ContentTypeStatisticRepository.countUnion(ContentTypeStatisticRepository.java:154) at com.atlassian.confluence.plugins.questions.contenttype.repository.ContentTypeStatisticRepository.getTotalContributors(ContentTypeStatisticRepository.java:111) at com.atlassian.confluence.plugins.questions.contenttype.repository.ContentTypeStatisticRepository.getTotalContributors(ContentTypeStatisticRepository.java:97) at com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository$2.get(CacheStatisticRepository.java:76) at com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository$2.get(CacheStatisticRepository.java:72) at com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository.getFromCache(CacheStatisticRepository.java:201) at com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository.getTotalContributors(CacheStatisticRepository.java:71) at com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl$GetTotalContributersDTO.apply(StatisticServiceImpl.java:146) at com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl$GetTotalContributersDTO.apply(StatisticServiceImpl.java:140) at com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl.getStatistics(StatisticServiceImpl.java:74) at com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl.getGlobalStatistics(StatisticServiceImpl.java:58) .... at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: ORA-12704: character set mismatch at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) ... at com.mchange.v2.c3p0.impl.NewProxyStatement.executeQuery(NewProxyStatement.java:35) at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:443) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396) ... 272 more {code}

    Atlassian JIRA | 2 years ago | Carolyn French
    java.sql.SQLException: ORA-12704: character set mismatch
  2. 0

    If Confluence question is installed on a Confluence in conjunction with Oracle 11g the statistics page will not display anything: !Usage Statistics not showing up.PNG|thumbnail! If you check the atlassian-confluence logs you will see the following error: {code} 015-03-16 19:19:14,703 ERROR [http-bio-8090-exec-2950] [common.error.jersey.ThrowableExceptionMapper] toResponse Uncaught exception thrown by REST service: StatementCallback; uncategorized SQLException for SQL [select count("tmp"."creator") from ((select "CONTENT"."CREATOR" "creator" from "CONTENT" "CONTENT" where "CONTENT"."PLUGINKEY" in ('com.atlassian.confluence.plugins.confluence-questions:question', 'com.atlassian.confluence.plugins.confluence-questions:answer', 'com.atlassian.confluence.plugins.confluence-questions:comment') and "CONTENT"."PREVVER" is null) union (select "AO_B1DBB9_VOTE"."USER_KEY" from "AO_B1DBB9_VOTE" "AO_B1DBB9_VOTE")) "tmp"]; SQL state [72000]; error code [12704]; ORA-12704: character set mismatch ; nested exception is java.sql.SQLException: ORA-12704: character set mismatch -- url: /confluence/rest/questions/1.0/statistics | userName: a4078 | referer: https://poc.amberroad.com/confluence/questions/stats org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [select count("tmp"."creator") from ((select "CONTENT"."CREATOR" "creator" from "CONTENT" "CONTENT" where "CONTENT"."PLUGINKEY" in ('com.atlassian.confluence.plugins.confluence-questions:question', 'com.atlassian.confluence.plugins.confluence-questions:answer', 'com.atlassian.confluence.plugins.confluence-questions:comment') and "CONTENT"."PREVVER" is null) union (select "AO_B1DBB9_VOTE"."USER_KEY" from "AO_B1DBB9_VOTE" "AO_B1DBB9_VOTE")) "tmp"]; SQL state [72000]; error code [12704]; ORA-12704: character set mismatch ; nested exception is java.sql.SQLException: ORA-12704: character set mismatch at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:466) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:474) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:479) at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:488) at com.atlassian.confluence.plugins.questions.contenttype.repository.ContentTypeStatisticRepository.countUnion(ContentTypeStatisticRepository.java:154) at com.atlassian.confluence.plugins.questions.contenttype.repository.ContentTypeStatisticRepository.getTotalContributors(ContentTypeStatisticRepository.java:111) at com.atlassian.confluence.plugins.questions.contenttype.repository.ContentTypeStatisticRepository.getTotalContributors(ContentTypeStatisticRepository.java:97) at com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository$2.get(CacheStatisticRepository.java:76) at com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository$2.get(CacheStatisticRepository.java:72) at com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository.getFromCache(CacheStatisticRepository.java:201) at com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository.getTotalContributors(CacheStatisticRepository.java:71) at com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl$GetTotalContributersDTO.apply(StatisticServiceImpl.java:146) at com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl$GetTotalContributersDTO.apply(StatisticServiceImpl.java:140) at com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl.getStatistics(StatisticServiceImpl.java:74) at com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl.getGlobalStatistics(StatisticServiceImpl.java:58) .... at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.sql.SQLException: ORA-12704: character set mismatch at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) ... at com.mchange.v2.c3p0.impl.NewProxyStatement.executeQuery(NewProxyStatement.java:35) at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:443) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396) ... 272 more {code}

    Atlassian JIRA | 2 years ago | Carolyn French
    java.sql.SQLException: ORA-12704: character set mismatch
  3. 0

    Unable to insert data into NCLOB!

    Oracle Community | 1 decade ago | 68375
    java.sql.SQLException: ORA-12704: character set mismatch
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Related to column-type NVARCHAR2

    Oracle Community | 2 decades ago | 14272
    java.sql.SQLException: ORA-12704: character set mismatch

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      ORA-12704: character set mismatch

      at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate()
    2. Spring Framework
      JdbcTemplate.queryForInt
      1. org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
      2. org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
      3. org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
      4. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)
      5. org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458)
      6. org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:466)
      7. org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:474)
      8. org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:479)
      9. org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:488)
      9 frames
    3. com.atlassian.confluence
      StatisticServiceImpl.getGlobalStatistics
      1. com.atlassian.confluence.plugins.questions.contenttype.repository.ContentTypeStatisticRepository.countUnion(ContentTypeStatisticRepository.java:154)
      2. com.atlassian.confluence.plugins.questions.contenttype.repository.ContentTypeStatisticRepository.getTotalContributors(ContentTypeStatisticRepository.java:111)
      3. com.atlassian.confluence.plugins.questions.contenttype.repository.ContentTypeStatisticRepository.getTotalContributors(ContentTypeStatisticRepository.java:97)
      4. com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository$2.get(CacheStatisticRepository.java:76)
      5. com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository$2.get(CacheStatisticRepository.java:72)
      6. com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository.getFromCache(CacheStatisticRepository.java:201)
      7. com.atlassian.confluence.plugins.questions.contenttype.repository.CacheStatisticRepository.getTotalContributors(CacheStatisticRepository.java:71)
      8. com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl$GetTotalContributersDTO.apply(StatisticServiceImpl.java:146)
      9. com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl$GetTotalContributersDTO.apply(StatisticServiceImpl.java:140)
      10. com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl.getStatistics(StatisticServiceImpl.java:74)
      11. com.atlassian.confluence.plugins.questions.service.StatisticServiceImpl.getGlobalStatistics(StatisticServiceImpl.java:58)
      11 frames