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

Encoding test incompatible with MS SQL Server

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Medium
    • None
    • None
    • None
    • None

    Description

      Running it results in this exception:

      When I performed the first step of the test described in this link:

      http://confluence.atlassian.com/display/DOC/Troubleshooting+Character+Encodings

      I get the following error stack:

      Cause:
      java.sql.SQLException: Argument data type text is invalid for argument 1 of lower function.

      Stack Trace: [hide]

      java.sql.SQLException: Argument data type text is invalid for argument 1 of lower function.
      at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)
      at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
      at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
      at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
      at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:418)
      at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:693)
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:75)
      at com.atlassian.confluence.admin.actions.debug.EncodingTestAction.retrieveLowerDatabaseTestString(EncodingTestAction.java:106)
      at com.atlassian.confluence.admin.actions.debug.EncodingTestAction.execute(EncodingTestAction.java:64)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
      at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
      at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.intercept(DefaultWorkflowInterceptor.java:55)
      at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:39)

      This is because the LOWER function in MS SQL can only be performed on fields that can be converted into a varchar (the BODYCONTENT.BODY column that the encoding test is trying to lower is a TEXT or clob-equivalent field in MS SQL).

      See: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_la-lz_1pki.asp

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dave@atlassian.com dave (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: