Mantis importer breaks on Microsoft SQL Server

XMLWordPrintable

    • 7.08
    • 1
    • Severity 2 - Major

      Steps to Reproduce

      • Try to import data (External system import) from Mantis backed by MSSQL DB

      Observed Behaviour

      Process breaks with exception:

      2018-03-16 13:04:37,062 ERROR - Unexpected failure occurred. Importer will stop immediately. Data may be in an unstable state
      com.atlassian.jira.plugins.importer.SQLRuntimeException: Incorrect syntax near the keyword 'DISTINCT'.
      	at com.atlassian.jira.plugins.importer.web.JdbcConnection.queryDb(JdbcConnection.java:187)
      	at com.atlassian.jira.plugins.importer.web.JdbcConnection.queryDb(JdbcConnection.java:150)
      	at com.atlassian.jira.plugins.importer.imports.mantis.MantisDataBean.getRequiredUsers(MantisDataBean.java:76)
      	at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importUsers(DefaultJiraDataImporter.java:565)
      	at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:345)
      	at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26)
      	at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15)
      	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:458)
      	at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:426)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:216)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'DISTINCT'.
      	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:258)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1535)
      	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:467)
      	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:409)
      	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7151)
      	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2478)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:219)
      	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:199)
      	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:331)
      	at com.atlassian.jira.plugins.importer.web.JdbcConnection.queryDb(JdbcConnection.java:167)
      	... 13 more
      

      Expected Behaviour

      Process goes smoothly

            Assignee:
            Maciej Nowakowski (Inactive)
            Reporter:
            Maciej Nowakowski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: