Symptoms

While trying to add a user as an agent, the exception below is thrown:

The following appears in the atlassian-greenhopper.log:

2014-12-21 08:22:32,206 http-bio-8080-exec-24 ERROR admin 502x50801x1 1mxvbt0 162.212.155.172,127.0.0.1 /rest/servicedesk/1/servicedesk/admin/agent/promote [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:Microsoft SQL Server
	- version:12.00.2000
	- minor version:0
	- major version:12
Driver:
	- name:jTDS Type 4 JDBC Driver for MS SQL Server and Sybase
	- version:1.2.4
java.sql.SQLException: Incorrect syntax near '-'.
com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:
	- name:Microsoft SQL Server
	- version:12.00.2000
	- minor version:0
	- major version:12
Driver:
	- name:jTDS Type 4 JDBC Driver for MS SQL Server and Sybase
	- version:1.2.4
java.sql.SQLException: Incorrect syntax near '-'.
	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.find(EntityManagedActiveObjects.java:179)
	at com.atlassian.activeobjects.osgi.DelegatingActiveObjects.find(DelegatingActiveObjects.java:93)  <+2>
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
	(...)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Incorrect syntax near '-'.
	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)
	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)
	at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)
	at net.sourceforge.jtds.jdbc.MSCursorResultSet.processOutput(MSCursorResultSet.java:943)
	at net.sourceforge.jtds.jdbc.MSCursorResultSet.<init>(MSCursorResultSet.java:154)
	at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:424)
	at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:778)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
	at net.java.ao.EntityManager.find(EntityManager.java:752)
	at net.java.ao.EntityManager.find(EntityManager.java:682)
	at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.find(EntityManagedActiveObjects.java:175)
	... 242 more

Diagnosis

JIRA is installed and running connected to a Microsoft SQL Server 2014 database.

Cause

Microsoft SQL Server 2014 is not supported as per our Supported Platforms page.

Resolution

  • Migrate to a Supported Database following the instructions in the Switching Databases document.

    This exception was also observed on Microsoft SQL Server 2008 R2/2012 when using a wrong collation. For such cases, please refer to the bug JSD-933 - Getting issue details... STATUS .

Help us improve!
  • No labels