Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-972

SQL Exception thrown during "Make user an agent"

XMLWordPrintable

      When I select an existing user during agent creation an SQL Exception is thrown by the Active Objects library, see attached screenshot.

      In the atlassian-jira.log file I found the following information:

      2014-10-17 11:40:40,452 ajp-bio-8009-exec-1 ERROR WAGNERDA 700x1062x1 1oe094s 10.20.24.4 /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:10.50.4033
      	- minor version:50
      	- major version:10
      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:10.50.4033
      	- minor version:50
      	- major version:10
      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.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      	at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
      	at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      	at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      	at com.sun.proxy.$Proxy3799.find(Unknown Source)
      	at com.atlassian.activeobjects.scala.TypedActiveObjects.find(TypedActiveObjects.scala:13)
      	at com.atlassian.servicedesk.internal.feature.servicedesk.ServiceDeskStore.getServiceDesks(ServiceDeskStore.scala:123)
      	at com.atlassian.servicedesk.internal.feature.servicedesk.ServiceDeskStore.getServiceDeskWithLimit(ServiceDeskStore.scala:37)
      	at com.atlassian.servicedesk.internal.feature.servicedesk.ServiceDeskManager.getMoreServiceDesks$1(ServiceDeskManager.scala:188)
      	at com.atlassian.servicedesk.internal.feature.servicedesk.ServiceDeskManager.getServiceDesksLimited(ServiceDeskManager.scala:196)
      	at com.atlassian.servicedesk.internal.feature.servicedesk.ServiceDeskService.getServiceDesksVisibleAsAgent(ServiceDeskService.scala:61)
      	at com.atlassian.servicedesk.internal.feature.servicedesk.ServiceDeskService.getAllServiceDeskVisibleAsAgent(ServiceDeskService.scala:66)
      	at com.atlassian.servicedesk.internal.feature.usermanagement.ServiceDeskTeamManager.getServiceDeskProjectsViewableByUser$1(ServiceDeskTeamManager.scala:45)
      	at com.atlassian.servicedesk.internal.feature.usermanagement.ServiceDeskTeamManager.sendInviteForExistingAllocation(ServiceDeskTeamManager.scala:50)
      	at com.atlassian.servicedesk.internal.feature.usermanagement.ServiceDeskTeamService.sendInviteForExistingAllocation(ServiceDeskTeamService.scala:50)
      	at com.atlassian.servicedesk.internal.rest.ServiceDeskAgentResource$$anonfun$4$$anonfun$apply$17$$anonfun$apply$18$$anonfun$apply$19$$anonfun$apply$20.apply(ServiceDeskAgentResource.scala:114)
      	at com.atlassian.servicedesk.internal.rest.ServiceDeskAgentResource$$anonfun$4$$anonfun$apply$17$$anonfun$apply$18$$anonfun$apply$19$$anonfun$apply$20.apply(ServiceDeskAgentResource.scala:112)
      	at scalaz.Validation$class.map(Validation.scala:114)
      	at scalaz.Success.map(Validation.scala:347)
      	at com.atlassian.servicedesk.internal.rest.ServiceDeskAgentResource$$anonfun$4$$anonfun$apply$17$$anonfun$apply$18$$anonfun$apply$19.apply(ServiceDeskAgentResource.scala:112)
      	at com.atlassian.servicedesk.internal.rest.ServiceDeskAgentResource$$anonfun$4$$anonfun$apply$17$$anonfun$apply$18$$anonfun$apply$19.apply(ServiceDeskAgentResource.scala:111)
      	at scalaz.Validation$class.flatMap(Validation.scala:141)
      	at scalaz.Success.flatMap(Validation.scala:347)
      	at com.atlassian.servicedesk.internal.rest.ServiceDeskAgentResource$$anonfun$4$$anonfun$apply$17$$anonfun$apply$18.apply(ServiceDeskAgentResource.scala:111)
      	at com.atlassian.servicedesk.internal.rest.ServiceDeskAgentResource$$anonfun$4$$anonfun$apply$17$$anonfun$apply$18.apply(ServiceDeskAgentResource.scala:110)
      	at scalaz.Validation$class.flatMap(Validation.scala:141)
      	at scalaz.Success.flatMap(Validation.scala:347)
      	at com.atlassian.servicedesk.internal.rest.ServiceDeskAgentResource$$anonfun$4$$anonfun$apply$17.apply(ServiceDeskAgentResource.scala:110)
      	at com.atlassian.servicedesk.internal.rest.ServiceDeskAgentResource$$anonfun$4$$anonfun$apply$17.apply(ServiceDeskAgentResource.scala:109)
      	at scalaz.Validation$class.flatMap(Validation.scala:141)
      	at scalaz.Success.flatMap(Validation.scala:347)
      	at com.atlassian.servicedesk.internal.rest.ServiceDeskAgentResource$$anonfun$4.apply(ServiceDeskAgentResource.scala:109)
      	at com.atlassian.servicedesk.internal.rest.ServiceDeskAgentResource$$anonfun$4.apply(ServiceDeskAgentResource.scala:108)
      	at scalaz.Validation$class.flatMap(Validation.scala:141)
      	at scalaz.Success.flatMap(Validation.scala:347)
      	at com.atlassian.servicedesk.internal.rest.ServiceDeskAgentResource.promoteUserToAgent(ServiceDeskAgentResource.scala:108)  <+3>
      	at java.lang.reflect.Method.invoke(Unknown Source)  <+19> (DispatchProviderHelper.java:234) (DispatchProviderHelper.java:100) (DefaultMethodInvocation.java:61) (ExpandInterceptor.java:38) (DefaultMethodInvocation.java:61) (DispatchProviderHelper.java:132) (DispatchProviderHelper.java:230) (ResourceJavaMethodDispatcher.java:75) (HttpMethodRule.java:288) (RightHandPathRule.java:147) (ResourceClassRule.java:108) (RightHandPathRule.java:147) (RootResourceClassesRule.java:84) (WebApplicationImpl.java:1469) (WebApplicationImpl.java:1400) (WebApplicationImpl.java:1349) (WebApplicationImpl.java:1339) (WebComponent.java:416) (ServletContainer.java:537)
      	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178)  <+1> (ServletContainer.java:795)
      	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73)  <+16> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70) (RestServletUtilsUpdaterFilter.java:26) (RestServletUtilsUpdaterFilter.java:40) (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70) (ContextFilter.java:25) (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
      	at com.atlassian.servicedesk.internal.web.RedirectExternalCustomerToPortalFilter.doFilter(RedirectExternalCustomerToPortalFilter.scala:18)  <+4> (AbstractHttpFilter.java:31) (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
      	at com.atlassian.mywork.client.filter.ServingRequestsFilter.doFilter(ServingRequestsFilter.java:37)  <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
      	at com.atlassian.plugins.cors.CorsFilter.doFilter(CorsFilter.java:65)  <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
      	at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFixupFilter.doFilter(PrettyUrlsSiteMeshFixupFilter.java:36)  <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
      	at com.atlassian.prettyurls.filter.PrettyUrlsDispatcherFilter.doFilter(PrettyUrlsDispatcherFilter.java:60)  <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
      	at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFilter.doFilter(PrettyUrlsSiteMeshFilter.java:92)  <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
      	at com.atlassian.prettyurls.filter.PrettyUrlsMatcherFilter.doFilter(PrettyUrlsMatcherFilter.java:56)  <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
      	at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36)  <+18> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (AccessLogFilter.java:103) (AccessLogFilter.java:87) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (XsrfTokenAdditionRequestFilter.java:54) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (ChainedFilterStepRunner.java:87) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:70)
      	at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)  <+22> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (SecurityFilter.java:239) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (TrustedApplicationsFilter.java:100) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (BaseLoginFilter.java:172) (JiraLoginFilter.java:70) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:70) (OAuthFilter.java:69) (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
      	at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40)  <+3> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
      	at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)  <+9> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (AbstractJohnsonFilter.java:71) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208)
      	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
      	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
      	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)  <+10> (UrlRewriteFilter.java:394) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (GzipFilter.java:82) (GzipFilter.java:59) (JiraGzipFilter.java:55) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:70)
      	at com.atlassian.analytics.client.filter.JiraAnalyticsFilter.doFilter(JiraAnalyticsFilter.java:41)  <+4> (AbstractHttpFilter.java:31) (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:70)
      	at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)  <+40> (DelegatingPluginFilter.java:78) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (ChainedFilterStepRunner.java:87) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (AbstractCachingFilter.java:33) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (AbstractEncodingFilter.java:41) (AbstractHttpFilter.java:31) (PathMatchingEncodingFilter.java:45) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (JiraStartupChecklistFilter.java:79) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (MultipartBoundaryCheckFilter.java:41) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (ChainedFilterStepRunner.java:87) (JiraFirstFilter.java:60) (ApplicationFilterChain.java:241) (ApplicationFilterChain.java:208) (StandardWrapperValve.java:220) (StandardContextValve.java:122) (AuthenticatorBase.java:501) (StandardHostValve.java:171) (ErrorReportValve.java:103) (StandardEngineValve.java:116) (AccessLogValve.java:950) (CoyoteAdapter.java:408) (AjpProcessor.java:190) (AbstractProtocol.java:611) (JIoEndpoint.java:314)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	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
      

              Unassigned Unassigned
              c9d4672cd215 Daniel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: