SQL error in jira log: Incorrect syntax near the keyword 'trigger'.

Issue #334 resolved
Gordon Andersen created an issue

Hi,

Using: Version: 5.3.0 Jira Server: v7.11.1#711001-sha1:ea73d62)

We have the following errors in our jira log that we would like you to take a look at:

com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'trigger'.. Listener: pl.com.tt.thescheduler.core.listeners.TheSchedulerIssueListener event: com.atlassian.jira.event.issue.IssueEvent
    at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:55)
    at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:38)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)
    at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:88)
    at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:204)
    at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:115)
    at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEventIfNotificationsAreEnabled(DefaultIssueEventManager.java:174)
    at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEvent(DefaultIssueEventManager.java:156)
    at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishAsRedundant(DefaultIssueEventManager.java:198)
    at com.atlassian.jira.event.issue.DefaultIssueEventManager.dispatchRedundantEvent(DefaultIssueEventManager.java:95)
    at com.atlassian.jira.workflow.function.event.FireIssueEventFunction.execute(FireIssueEventFunction.java:62)
    at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1014)
    at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1407)
    at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:557)
    at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:830)
    at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:787)
    at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:492)
    at com.atlassian.jira.web.action.workflow.SimpleWorkflowAction.doExecute(SimpleWorkflowAction.java:28)
    ... 1 filtered
    at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
    ... 7 filtered
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    ... 48 filtered
    at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62)
    ... 12 filtered
    at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
    ... 58 filtered
    at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
    ... 1 filtered
    at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
    ... 39 filtered
    at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
    ... 10 filtered
    at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
    ... 4 filtered
    at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
    ... 7 filtered
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
    at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
    at net.bull.javamelody.JiraMonitoringFilter.doFilter(JiraMonitoringFilter.java:134)
    ... 22 filtered
    at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
    ... 24 filtered
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:
    - name:Microsoft SQL Server
    - version:13.00.5026
    - minor version:0
    - major version:13
    - name:Microsoft JDBC Driver 6.2 for SQL Server
    - version:6.2.1.0
2018-11-27 09:48:58,978 UpmScheduler:thread-3 WARN klaus.dalkov 580x642505x4 1l94u81 10.10.201.31:14537,0:0:0:0:0:0:0:1 /rest/plugins/1.0/available/featured [c.a.upm.pac.PacClientImpl] Update check request may take longer because of the number of apps
2018-11-27 09:49:00,025 http-nio-8103-exec-58 ERROR karsten.frederiksen 588x4212619x4 zni5yz 10.20.40.72:53090,0:0:0:0:0:0:0:1 /secure/WorkflowUIDispatcher.jspa [c.a.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.jira.event.issue.IssueEvent@d5802cc[issue=LL-5144,comment=<null>,worklog=<null>,changelog=[GenericEntity:ChangeGroup][issue,190500][author,karsten.frederiksen][created,2018-11-27 09:48:59.884][id,1636670],eventTypeId=11,sendMail=true,params={eventsource=workflow, baseurl=https://jira.edlund.dk},subtasksUpdated=false]] from the invoker [SingleParameterMethodListenerInvoker{method=public void pl.com.tt.thescheduler.core.listeners.TheSchedulerIssueListener.onIssueEvent(com.atlassian.jira.event.issue.IssueEvent), listener=pl.com.tt.thescheduler.core.listeners.TheSchedulerIssueListener@196a1013}]
java.lang.RuntimeException: There was a SQL exception thrown by the Active Objects library:
Database:
    - name:Microsoft SQL Server
    - version:13.00.5026
    - minor version:0
    - major version:13
Driver:
    - name:Microsoft JDBC Driver 6.2 for SQL Server
    - version:6.2.1.0

com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'trigger'.. Listener: pl.com.tt.thescheduler.core.listeners.TheSchedulerIssueListener event: com.atlassian.jira.event.issue.IssueEvent
    at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:55)
    at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1$1.run(AsynchronousAbleEventDispatcher.java:38)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)
    at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:88)
    at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:204)
    at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:115)
    at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEventIfNotificationsAreEnabled(DefaultIssueEventManager.java:174)
    at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEvent(DefaultIssueEventManager.java:156)
    at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishAsRedundant(DefaultIssueEventManager.java:198)
    at com.atlassian.jira.event.issue.DefaultIssueEventManager.dispatchRedundantEvent(DefaultIssueEventManager.java:95)
    at com.atlassian.jira.workflow.function.event.FireIssueEventFunction.execute(FireIssueEventFunction.java:62)
    at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1014)
    at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1407)
    at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:557)
    at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:830)
    at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:787)
    at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:492)
    at com.atlassian.jira.web.action.workflow.SimpleWorkflowAction.doExecute(SimpleWorkflowAction.java:28)
    ... 1 filtered
    at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63)
    ... 7 filtered
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    ... 48 filtered
    at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62)
    ... 12 filtered
    at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
    ... 58 filtered
    at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
    ... 1 filtered
    at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
    ... 39 filtered
    at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
    ... 10 filtered
    at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
    ... 4 filtered
    at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
    ... 7 filtered
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
    at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
    at net.bull.javamelody.JiraMonitoringFilter.doFilter(JiraMonitoringFilter.java:134)
    ... 22 filtered
    at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
    ... 24 filtered
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
Database:
    - name:Microsoft SQL Server
    - version:13.00.5026
    - minor version:0
    - major version:13
    - name:Microsoft JDBC Driver 6.2 for SQL Server
    - version:6.2.1.0

com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'trigger'.
    at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.find(EntityManagedActiveObjects.java:142)
    at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.find(TenantAwareActiveObjects.java:296)
    ... 3 filtered
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
    at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
    at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
    at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
    at com.sun.proxy.$Proxy3305.find(Unknown Source)
    at pl.com.tt.thescheduler.model.dao.TriggerDaoImpl.readWorkflowTriggers(TriggerDaoImpl.java:74)
    at pl.com.tt.thescheduler.service.triggers.TriggerServiceImpl.getTriggersForTransition(TriggerServiceImpl.java:350)
    at pl.com.tt.thescheduler.service.ScheduledJobExecutionServiceImpl.executeTriggersForTransition(ScheduledJobExecutionServiceImpl.java:160)
    at pl.com.tt.thescheduler.core.listeners.TheSchedulerIssueListener.lambda$onIssueEvent$1(TheSchedulerIssueListener.java:70)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
    at java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1235)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
    at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
    at pl.com.tt.thescheduler.core.listeners.TheSchedulerIssueListener.onIssueEvent(TheSchedulerIssueListener.java:60)
    ... 3 filtered
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:40)
    ... 268 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'trigger'.
    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.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 org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83)
    at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83)
    at net.java.ao.EntityManager.find(EntityManager.java:671)
    at net.java.ao.EntityManager.find(EntityManager.java:621)
    at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.find(EntityManagedActiveObjects.java:140)
    ... 309 more
2018-11-27 09:49:23,084 http-nio-8103-exec-61 ERROR thomas.berglund 589x4213004x1 14horlt 10.20.30.84:51684,0:0:0:0:0:0:0:1 /secure/CommentAssignIssue.jspa [c.a.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.jira.event.issue.IssueEvent@35615861[issue=LK-6814,comment=<null>,worklog=<null>,changelog=[GenericEntity:ChangeGroup][issue,186245][author,thomas.berglund][created,2018-11-27 09:49:23.053][id,1636671],eventTypeId=13,sendMail=true,params={eventsource=workflow, baseurl=https://jira.edlund.dk},subtasksUpdated=false]] from the invoker [SingleParameterMethodListenerInvoker{method=public void pl.com.tt.thescheduler.core.listeners.TheSchedulerIssueListener.onIssueEvent(com.atlassian.jira.event.issue.IssueEvent), listener=pl.com.tt.thescheduler.core.listeners.TheSchedulerIssueListener@196a1013}]
java.lang.RuntimeException: There was a SQL exception thrown by the Active Objects library:
Database:
    - name:Microsoft SQL Server
    - version:13.00.5026
    - minor version:0
    - major version:13
Driver:
    - name:Microsoft JDBC Driver 6.2 for SQL Server
    - version:6.2.1.0

Comments (3)

  1. Łukasz Modzelewski
    • changed status to open

    Hi Gordon, Thank you for reporting this. We are already working on the fix, this issue is related strictly to MSSQL database and new feature of workflow triggers. Fix will be released in version 5.3.2 Cheers, Łukasz

  2. Log in to comment