log.txt 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. [2018-06-26 10:05:10] [ERROR] - getDistrictInfoList
  2. org.springframework.jdbc.BadSqlGrammarException:
  3. ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by id desc' at line 1
  4. ### The error may exist in file [D:\projects\XiangJuWu\target\classes\com\izouma\awesomeadmin\dao\DistrictInfoMapper.xml]
  5. ### The error may involve com.izouma.awesomeadmin.dao.DistrictInfoMapper.queryAllDistrictInfo-Inline
  6. ### The error occurred while setting parameters
  7. ### SQL: select id, del_flag, full_name, short_name, code, lat, lng, remark from district_info WHERE del_flag = 'N' and `code` LIKE CONCAT(LEFT(?, 4), '%') AND `code` != ?; order by id desc
  8. ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by id desc' at line 1
  9. ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by id desc' at line 1
  10. at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
  11. at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
  12. at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
  13. at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
  14. at com.sun.proxy.$Proxy37.selectList(Unknown Source)
  15. at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)
  16. at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:122)
  17. at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:64)
  18. at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53)
  19. at com.sun.proxy.$Proxy50.queryAllDistrictInfo(Unknown Source)
  20. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  21. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  22. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  23. at java.lang.reflect.Method.invoke(Method.java:498)
  24. at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
  25. at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
  26. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
  27. at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
  28. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
  29. at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
  30. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
  31. at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
  32. at com.sun.proxy.$Proxy51.queryAllDistrictInfo(Unknown Source)
  33. at com.izouma.awesomeadmin.service.impl.DistrictInfoServiceImpl.getDistrictInfoList(DistrictInfoServiceImpl.java:30)
  34. at test.com.izouma.admintemplate.datasource.DistrictInfoServiceTest.test(DistrictInfoServiceTest.java:42)
  35. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  36. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  37. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  38. at java.lang.reflect.Method.invoke(Method.java:498)
  39. at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
  40. at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
  41. at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
  42. at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
  43. at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
  44. at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
  45. at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
  46. at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
  47. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
  48. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
  49. at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
  50. at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
  51. at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
  52. at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
  53. at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
  54. at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
  55. at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
  56. at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
  57. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
  58. at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
  59. at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
  60. at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
  61. at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
  62. at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
  63. Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by id desc' at line 1
  64. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  65. at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  66. at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  67. at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  68. at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
  69. at com.mysql.jdbc.Util.getInstance(Util.java:384)
  70. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
  71. at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
  72. at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
  73. at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926)
  74. at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2444)
  75. at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2834)
  76. at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2838)
  77. at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
  78. at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1307)
  79. at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)
  80. at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:62)
  81. at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:78)
  82. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  83. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  84. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  85. at java.lang.reflect.Method.invoke(Method.java:498)
  86. at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
  87. at com.sun.proxy.$Proxy103.query(Unknown Source)
  88. at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62)
  89. at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:303)
  90. at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:154)
  91. at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:102)
  92. at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:82)
  93. at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:120)
  94. at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:113)
  95. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  96. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  97. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  98. at java.lang.reflect.Method.invoke(Method.java:498)
  99. at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
  100. ... 49 more