Details
-
Bug
-
Resolution: Duplicate
-
Low
-
None
-
5.10.3
-
1
-
Severity 3 - Minor
-
Description
Summary
Synchronise Unreconciled Content throws a syntax error with MSSQL.
MySQL-syntax 'LIMIT 1000' instead of the SQL Server-syntax 'TOP 1000'.
Environment
- Confluence 5.10.3
- MSSQL 11.00.6020
Steps to Reproduce
- Setup confluence and connect it to MSSQL 11.00.6020
- Go to Confluence Administration >> Scheduled Jobs and run the "Synchronise Unreconciled Content"
Expected Results
Job shouldn't cause issue errors and finish without issues
Actual Results
The below exception is thrown in the log file:
2016-08-09 10:47:15,412 ERROR [scheduler_Worker-8] [plugins.synchrony.job.ContentReconciliationJob] lambda$getDraftContentRequiringReconciliation$3 Error querying for content marked as requiring content reconciliation java.sql.SQLException: Incorrect syntax near 'LIMIT'. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254) at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:477) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:777) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:379) at com.atlassian.confluence.plugins.synchrony.job.ContentReconciliationJob.lambda$getDraftContentRequiringReconciliation$3(ContentReconciliationJob.java:97) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.executeInternal(DefaultTransactionalExecutor.java:91) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor$1.execute(DefaultTransactionalExecutor.java:45) at com.atlassian.sal.spring.connection.SpringHostConnectionAccessor$1.doInTransaction(SpringHostConnectionAccessor.java:61) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at com.atlassian.sal.spring.connection.SpringHostConnectionAccessor.execute(SpringHostConnectionAccessor.java:53) at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.execute(DefaultTransactionalExecutor.java:42) at com.atlassian.confluence.plugins.synchrony.job.ContentReconciliationJob.getDraftContentRequiringReconciliation(ContentReconciliationJob.java:86) at com.atlassian.confluence.plugins.synchrony.job.ContentReconciliationJob.execute(ContentReconciliationJob.java:62) at com.atlassian.confluence.plugin.descriptor.JobModuleDescriptor$DelegatingPluginJob.lambda$execute$0(JobModuleDescriptor.java:112) at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:82) at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:72) at com.atlassian.confluence.plugin.descriptor.JobModuleDescriptor$DelegatingPluginJob.execute(JobModuleDescriptor.java:111) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool.lambda$runInThread$0(ConfluenceQuartzThreadPool.java:16) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) 2016-08-09 10:47:16,024 ERROR [scheduler_Worker-8] [org.quartz.core.JobRunShell] run Job com.atlassian.confluence.plugins.confluence-collaborative-editor-plugin.contentReconciliationJob threw an unhandled Exception: java.lang.NullPointerException at com.atlassian.confluence.plugins.synchrony.job.ContentReconciliationJob.execute(ContentReconciliationJob.java:63) at com.atlassian.confluence.plugin.descriptor.JobModuleDescriptor$DelegatingPluginJob.lambda$execute$0(JobModuleDescriptor.java:112) at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:82) at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:72) at com.atlassian.confluence.plugin.descriptor.JobModuleDescriptor$DelegatingPluginJob.execute(JobModuleDescriptor.java:111) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool.lambda$runInThread$0(ConfluenceQuartzThreadPool.java:16) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) 2016-08-09 10:47:16,024 ERROR [scheduler_Worker-8] [org.quartz.core.ErrorLogger] schedulerError Job (com.atlassian.confluence.plugins.confluence-collaborative-editor-plugin.contentReconciliationJob threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException] at org.quartz.core.JobRunShell.run(JobRunShell.java:234) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool.lambda$runInThread$0(ConfluenceQuartzThreadPool.java:16) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: java.lang.NullPointerException at com.atlassian.confluence.plugins.synchrony.job.ContentReconciliationJob.execute(ContentReconciliationJob.java:63) at com.atlassian.confluence.plugin.descriptor.JobModuleDescriptor$DelegatingPluginJob.lambda$execute$0(JobModuleDescriptor.java:112) at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:82) at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:72) at com.atlassian.confluence.plugin.descriptor.JobModuleDescriptor$DelegatingPluginJob.execute(JobModuleDescriptor.java:111) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) ... 2 more