java.lang.reflect.InvocationTargetException

Atlassian JIRA | Ramon Grunder | 10 months ago
  1. 0

    When accessing Administration > Applications > Application access an "Internal server error" is shown when using MySQL as database ({{MySQLSyntaxErrorException: Every derived table must have its own alias}}). The following stack-trace can be seen in the logs: {code} 2016-02-19 15:59:31,469 http-nio-8080-exec-4 ERROR XXXXXXXX 959x1677x3 1yi2j7r xx.xx.xx.xx,192.168.xx.xx /rest/api/2/group [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192) ... 4 filtered at com.atlassian.jira.rest.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:55) ... 1 filtered at com.atlassian.jira.rest.v2.issue.scope.RequestScopeInterceptor.intercept(RequestScopeInterceptor.java:39) ... 14 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154) ... 1 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68) ... 86 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 15 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37) ... 62 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.querydsl.core.QueryException: Caught MySQLSyntaxErrorException for select count(*) from (select m.lower_child_name from cwd_membership m inner join cwd_user u on u.id = m.child_id where u.active = ? and m.membership_type = ? and m.directory_id = ? and m.lower_parent_name = ? at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50) at com.querydsl.sql.Configuration.translate(Configuration.java:453) at com.querydsl.sql.AbstractSQLQuery.unsafeCount(AbstractSQLQuery.java:627) at com.querydsl.sql.AbstractSQLQuery.fetchCount(AbstractSQLQuery.java:132) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runMySqlQuery(CountUsersInGroupQueryCallback.java:148) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runQuery(CountUsersInGroupQueryCallback.java:74) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runQuery(CountUsersInGroupQueryCallback.java:23) at com.atlassian.jira.database.DbConnectionManagerImpl.executeQuery(DbConnectionManagerImpl.java:45) at com.atlassian.jira.security.groups.DefaultGroupManager.getUsersInGroupCount(DefaultGroupManager.java:218) at com.atlassian.jira.security.groups.DefaultGroupManager.getUsersInGroupCount(DefaultGroupManager.java:197) at com.atlassian.jira.security.groups.RequestCachingGroupManager.getUsersInGroupCount(RequestCachingGroupManager.java:138) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy237.getUsersInGroupCount(Unknown Source) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) 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:207) at com.sun.proxy.$Proxy2379.getUsersInGroupCount(Unknown Source) at com.atlassian.jira.rest.v2.issue.GroupResource.buildGroupBean(GroupResource.java:418) at com.atlassian.jira.rest.v2.issue.GroupResource.getGroup(GroupResource.java:121) ... 213 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Every derived table must have its own alias at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:978) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2030) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at com.querydsl.sql.AbstractSQLQuery.unsafeCount(AbstractSQLQuery.java:616) ... 250 more {code}

    Atlassian JIRA | 10 months ago | Ramon Grunder
    java.lang.reflect.InvocationTargetException
  2. 0

    When trying to add a user to a group on JIRA 7.1.0 over the [REST API - addUserToGroup | https://docs.atlassian.com/jira/REST/latest/#api/2/group-addUserToGroup], the call fails with an Internal Server Error: *MySQLSyntaxErrorException: Every derived table must have its own alias* Issue the following HTTP content against your REST API JIRA server: {code} POST /rest/api/2/group/user?groupname=project-test-group HTTP/1.1 Host: my.domain.com Authorization: Basic wahtever= Content-Type: application/json Cache-Control: no-cache { "name": "charlie" } {code} This will produce the following error when running on MySQL: {code} 2016-02-22 16:50:57,925 http-nio-8080-exec-25 ERROR XXXXXXXXXX 1010x5858x1 1hnn3zp ip.ip.ip.ip,ip.ip.ip.ip /rest/api/2/group/user [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192) ... 4 filtered at com.atlassian.jira.rest.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:55) ... 1 filtered at com.atlassian.jira.rest.v2.issue.scope.RequestScopeInterceptor.intercept(RequestScopeInterceptor.java:39) ... 15 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154) ... 1 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68) ... 86 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 15 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37) ... 62 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.querydsl.core.QueryException: Caught MySQLSyntaxErrorException for select count(*) from (select m.lower_child_name from cwd_membership m inner join cwd_user u on u.id = m.child_id where u.active = ? and m.membership_type = ? and m.directory_id = ? and m.lower_parent_name = ? at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50) at com.querydsl.sql.Configuration.translate(Configuration.java:453) at com.querydsl.sql.AbstractSQLQuery.unsafeCount(AbstractSQLQuery.java:627) at com.querydsl.sql.AbstractSQLQuery.fetchCount(AbstractSQLQuery.java:132) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runMySqlQuery(CountUsersInGroupQueryCallback.java:148) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runQuery(CountUsersInGroupQueryCallback.java:74) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runQuery(CountUsersInGroupQueryCallback.java:23) at com.atlassian.jira.database.DbConnectionManagerImpl.executeQuery(DbConnectionManagerImpl.java:45) at com.atlassian.jira.security.groups.DefaultGroupManager.getUsersInGroupCount(DefaultGroupManager.java:218) at com.atlassian.jira.security.groups.DefaultGroupManager.getUsersInGroupCount(DefaultGroupManager.java:197) at com.atlassian.jira.security.groups.RequestCachingGroupManager.getUsersInGroupCount(RequestCachingGroupManager.java:138) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy237.getUsersInGroupCount(Unknown Source) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) 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:207) at com.sun.proxy.$Proxy2379.getUsersInGroupCount(Unknown Source) at com.atlassian.jira.rest.v2.issue.GroupResource.buildGroupBean(GroupResource.java:418) at com.atlassian.jira.rest.v2.issue.GroupResource.access$500(GroupResource.java:65) at com.atlassian.jira.rest.v2.issue.GroupResource$4.execute(GroupResource.java:304) at com.atlassian.jira.rest.v2.issue.GroupResource.doGroupUpdate(GroupResource.java:364) at com.atlassian.jira.rest.v2.issue.GroupResource.addUserToGroup(GroupResource.java:288) ... 214 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Every derived table must have its own alias at sun.reflect.GeneratedConstructorAccessor462.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) at com.mysql.jdbc.Util.getInstance(Util.java:360) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2030) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at com.querydsl.sql.AbstractSQLQuery.unsafeCount(AbstractSQLQuery.java:616) ... 254 more {code}

    Atlassian JIRA | 10 months ago | Ramon Grunder
    java.lang.reflect.InvocationTargetException
  3. 0

    When accessing Administration > Applications > Application access an "Internal server error" is shown. This is the trace logs: {code:java} 2016-03-12 11:27:15,507 http-nio-8080-exec-2 ERROR cloude8jiraadmin 687x1229x1 zwy1to 121.122.90.212,127.0.0.1 /rest/api/2/group [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192) ... 4 filtered at com.atlassian.jira.rest.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:55) ... 1 filtered at com.atlassian.jira.rest.v2.issue.scope.RequestScopeInterceptor.intercept(RequestScopeInterceptor.java:39) ... 14 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154) ... 1 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68) ... 91 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 15 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37) ... 22 filtered at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:169) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter$$Lambda$660/1377557526.call(Unknown Source) at com.atlassian.servicedesk.internal.util.scala.ScalaJavaInterOp$1.apply(ScalaJavaInterOp.java:25) at com.atlassian.servicedesk.internal.utils.context.CustomerContextUtil$.outOfCustomerContext(CustomerContextUtil.scala:48) at com.atlassian.servicedesk.internal.utils.context.CustomerContextUtil.outOfCustomerContext(CustomerContextUtil.scala) at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.outOfCustomerContext(CustomerContextServiceImpl.java:24) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:164) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:120) at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:112) ... 55 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.querydsl.core.QueryException: Caught MySQLSyntaxErrorException for select count(*) from (select m.lower_child_name from cwd_membership m inner join cwd_user u on u.id = m.child_id where u.active = ? and m.membership_type = ? and m.directory_id = ? and m.lower_parent_name = ? at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50) at com.querydsl.sql.Configuration.translate(Configuration.java:453) at com.querydsl.sql.AbstractSQLQuery.unsafeCount(AbstractSQLQuery.java:627) at com.querydsl.sql.AbstractSQLQuery.fetchCount(AbstractSQLQuery.java:132) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runMySqlQuery(CountUsersInGroupQueryCallback.java:148) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runQuery(CountUsersInGroupQueryCallback.java:74) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runQuery(CountUsersInGroupQueryCallback.java:23) at com.atlassian.jira.database.DbConnectionManagerImpl.executeQuery(DbConnectionManagerImpl.java:45) at com.atlassian.jira.security.groups.DefaultGroupManager.getUsersInGroupCount(DefaultGroupManager.java:218) at com.atlassian.jira.security.groups.DefaultGroupManager.getUsersInGroupCount(DefaultGroupManager.java:197) at com.atlassian.jira.security.groups.RequestCachingGroupManager.getUsersInGroupCount(RequestCachingGroupManager.java:138) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy390.getUsersInGroupCount(Unknown Source) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) 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:207) at com.sun.proxy.$Proxy4346.getUsersInGroupCount(Unknown Source) at com.atlassian.jira.rest.v2.issue.GroupResource.buildGroupBean(GroupResource.java:418) at com.atlassian.jira.rest.v2.issue.GroupResource.getGroup(GroupResource.java:121) ... 227 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Every derived table must have its own alias at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1962) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at com.querydsl.sql.AbstractSQLQuery.unsafeCount(AbstractSQLQuery.java:616) ... 264 more {code}

    Atlassian JIRA | 9 months ago | Cecilia Lu
    java.lang.reflect.InvocationTargetException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h3. Summary When querying {{/rest/api/latest/user/assignable/multiProjectSearch}}, it's possible to get an internal server error if the query parameters indicate to start at a higher number than the amount of users there are. For example if 24 users, and you try to startAt 25 it will fail. h3. Steps to Reproduce Query a project that has a small number of assignable users with a larger number than exists. For example this was reproduced with <BASE_URL>/rest/api/latest/user/assignable/multiProjectSearch?projectKeys=WITI&startAt=100&maxResults=50 on a project that had 26 assignable users. h3. Expected Results An empty set is returned. h3. Actual Results The below JSON response is returned: {code} { errorMessages: [ "Internal server error" ], errors: { } } {code} And an exception is thrown: {noformat} 2016-05-18 15:33:23,390 http-bio-8443-exec-9 ERROR admin 931x5x1 1vl875a 0:0:0:0:0:0:0:1 /rest/api/latest/user/assignable/multiProjectSearch [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192) ... 4 filtered at com.atlassian.jira.rest.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:55) ... 1 filtered at com.atlassian.jira.rest.v2.issue.scope.RequestScopeInterceptor.intercept(RequestScopeInterceptor.java:39) ... 15 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154) ... 1 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68) ... 86 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 16 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37) ... 74 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: java.lang.IndexOutOfBoundsException: start index (100) must not be greater than size (26) at com.google.common.base.Preconditions.checkPositionIndexes(Preconditions.java:383) at com.google.common.collect.ImmutableList.subList(ImmutableList.java:381) at com.google.common.collect.ImmutableList.subList(ImmutableList.java:61) at com.atlassian.jira.rest.v2.issue.UserResource.findBulkAssignableUsers(UserResource.java:960) ... 212 more {noformat} h3. Notes This appears to be due to not validating the {{startAt}} query parameter and the collection is called with a substring, so it throws an exception.

    Atlassian JIRA | 7 months ago | Vit Novak
    java.lang.reflect.InvocationTargetException
  6. 0

    When accessing Administration > Applications > Application access an "Internal server error" is shown when using MySQL as database ({{MySQLSyntaxErrorException: Every derived table must have its own alias}}). The following stack-trace can be seen in the logs: {code} 2016-02-19 15:59:31,469 http-nio-8080-exec-4 ERROR XXXXXXXX 959x1677x3 1yi2j7r xx.xx.xx.xx,192.168.xx.xx /rest/api/2/group [c.a.j.rest.exception.ExceptionInterceptor] Returning internal server error in response java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192) ... 4 filtered at com.atlassian.jira.rest.exception.ExceptionInterceptor.intercept(ExceptionInterceptor.java:55) ... 1 filtered at com.atlassian.jira.rest.v2.issue.scope.RequestScopeInterceptor.intercept(RequestScopeInterceptor.java:39) ... 14 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154) ... 1 filtered at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68) ... 86 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70) ... 15 filtered at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37) ... 62 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.querydsl.core.QueryException: Caught MySQLSyntaxErrorException for select count(*) from (select m.lower_child_name from cwd_membership m inner join cwd_user u on u.id = m.child_id where u.active = ? and m.membership_type = ? and m.directory_id = ? and m.lower_parent_name = ? at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50) at com.querydsl.sql.Configuration.translate(Configuration.java:453) at com.querydsl.sql.AbstractSQLQuery.unsafeCount(AbstractSQLQuery.java:627) at com.querydsl.sql.AbstractSQLQuery.fetchCount(AbstractSQLQuery.java:132) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runMySqlQuery(CountUsersInGroupQueryCallback.java:148) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runQuery(CountUsersInGroupQueryCallback.java:74) at com.atlassian.jira.security.groups.CountUsersInGroupQueryCallback.runQuery(CountUsersInGroupQueryCallback.java:23) at com.atlassian.jira.database.DbConnectionManagerImpl.executeQuery(DbConnectionManagerImpl.java:45) at com.atlassian.jira.security.groups.DefaultGroupManager.getUsersInGroupCount(DefaultGroupManager.java:218) at com.atlassian.jira.security.groups.DefaultGroupManager.getUsersInGroupCount(DefaultGroupManager.java:197) at com.atlassian.jira.security.groups.RequestCachingGroupManager.getUsersInGroupCount(RequestCachingGroupManager.java:138) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at com.sun.proxy.$Proxy237.getUsersInGroupCount(Unknown Source) ... 3 filtered at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) 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:207) at com.sun.proxy.$Proxy2379.getUsersInGroupCount(Unknown Source) at com.atlassian.jira.rest.v2.issue.GroupResource.buildGroupBean(GroupResource.java:418) at com.atlassian.jira.rest.v2.issue.GroupResource.getGroup(GroupResource.java:121) ... 213 more Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Every derived table must have its own alias at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at com.mysql.jdbc.Util.handleNewInstance(Util.java:377) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:978) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2030) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83) at com.querydsl.sql.AbstractSQLQuery.unsafeCount(AbstractSQLQuery.java:616) ... 250 more {code}

    Atlassian JIRA | 10 months ago | Ramon Grunder
    java.lang.reflect.InvocationTargetException

  1. r1chjames 1 times, last 4 days ago
  2. bmacedo 8 times, last 3 weeks ago
  3. aldrinleal 1 times, last 1 month ago
  4. ajinkya_w 96 times, last 2 months ago
  5. davidvanlaatum 4 times, last 2 months ago
18 more registered users
77 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.reflect.InvocationTargetException

    No message provided

    at sun.reflect.NativeMethodAccessorImpl.invoke0()
  2. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  3. com.atlassian.plugins
    DispatchProviderHelper$ResponseOutInvoker$1.invoke
    1. com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:192)
    1 frame