java.lang.reflect.InvocationTargetException 错误

mysql错误

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.elan.quick.config.SqlSessionInterceptor.invoke(SqlSessionInterceptor.java:36)
at com.sun.proxy. P r o x y 123. s e l e c t L i s t ( U n k n o w n S o u r c e ) a t o r g . a p a c h e . i b a t i s . b i n d i n g . M a p p e r M e t h o d . e x e c u t e F o r M a n y ( M a p p e r M e t h o d . j a v a : 139 ) a t o r g . a p a c h e . i b a t i s . b i n d i n g . M a p p e r M e t h o d . e x e c u t e ( M a p p e r M e t h o d . j a v a : 76 ) a t o r g . a p a c h e . i b a t i s . b i n d i n g . M a p p e r P r o x y . i n v o k e ( M a p p e r P r o x y . j a v a : 59 ) a t c o m . s u n . p r o x y . Proxy123.selectList(Unknown Source) at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:139) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:76) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59) at com.sun.proxy. Proxy123.selectList(UnknownSource)atorg.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:139)atorg.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:76)atorg.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)atcom.sun.proxy.Proxy157.selectTotal(Unknown Source)
at com.elan.expo.schedule.DashSchedule.getTotalExceldata(DashSchedule.java:186)
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 org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93)
at java.util.concurrent.Executors R u n n a b l e A d a p t e r . c a l l ( E x e c u t o r s . j a v a : 511 ) a t j a v a . u t i l . c o n c u r r e n t . F u t u r e T a s k . r u n ( F u t u r e T a s k . j a v a : 266 ) a t j a v a . u t i l . c o n c u r r e n t . S c h e d u l e d T h r e a d P o o l E x e c u t o r RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ScheduledThreadPoolExecutor RunnableAdapter.call(Executors.java:511)atjava.util.concurrent.FutureTask.run(FutureTask.java:266)atjava.util.concurrent.ScheduledThreadPoolExecutorScheduledFutureTask.access 201 ( S c h e d u l e d T h r e a d P o o l E x e c u t o r . j a v a : 180 ) a t j a v a . u t i l . c o n c u r r e n t . S c h e d u l e d T h r e a d P o o l E x e c u t o r 201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor 201(ScheduledThreadPoolExecutor.java:180)atjava.util.concurrent.ScheduledThreadPoolExecutorScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutorKaTeX parse error: Expected 'EOF', got '#' at position 152: …Exception: \##̲# Error queryin…Proxy189.query(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)
… 26 more
Caused by: com.foundationdb.sql.parser.SQLParserException: Encountered " <SINGLEQUOTED_STRING> "‘企业id’ “” at line 1, column 25.
Was expecting one of:

<BACKQUOTED_IDENTIFIER> …
<DOUBLEQUOTED_IDENTIFIER> …

at com.foundationdb.sql.parser.SQLParser.parseStatement(SQLParser.java:106)
at com.job1001.util.DynamicUtil.executeInvocation(DynamicUtil.java:59)
at com.job1001.plugins.DynamicOtherSQLPlugin.intercept(DynamicOtherSQLPlugin.java:71)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)
… 28 more
Caused by: com.foundationdb.sql.parser.ParseException: Encountered " <SINGLEQUOTED_STRING> "‘企业id’ “” at line 1, column 25.
Was expecting one of:

<BACKQUOTED_IDENTIFIER> …
<DOUBLEQUOTED_IDENTIFIER> …

at com.foundationdb.sql.parser.SQLGrammar.generateParseException(SQLGrammar.java:22325)
at com.foundationdb.sql.parser.SQLGrammar.jj_consume_token(SQLGrammar.java:22170)
at com.foundationdb.sql.parser.SQLGrammar.internalIdentifier(SQLGrammar.java:15458)
at com.foundationdb.sql.parser.SQLGrammar.identifier(SQLGrammar.java:15467)
at com.foundationdb.sql.parser.SQLGrammar.asClause(SQLGrammar.java:4570)
at com.foundationdb.sql.parser.SQLGrammar.derivedColumn(SQLGrammar.java:4543)
at com.foundationdb.sql.parser.SQLGrammar.selectSublist(SQLGrammar.java:4529)
at com.foundationdb.sql.parser.SQLGrammar.selectColumnList(SQLGrammar.java:4481)
at com.foundationdb.sql.parser.SQLGrammar.selectList(SQLGrammar.java:4475)
at com.foundationdb.sql.parser.SQLGrammar.querySpecification(SQLGrammar.java:4424)
at com.foundationdb.sql.parser.SQLGrammar.simpleTable(SQLGrammar.java:4378)
at com.foundationdb.sql.parser.SQLGrammar.nonJoinQueryPrimary(SQLGrammar.java:4357)
at com.foundationdb.sql.parser.SQLGrammar.nonJoinQueryTerm(SQLGrammar.java:4246)
at com.foundationdb.sql.parser.SQLGrammar.queryExpression(SQLGrammar.java:4151)
at com.foundationdb.sql.parser.SQLGrammar.preparableSelectStatement(SQLGrammar.java:2259)
at com.foundationdb.sql.parser.SQLGrammar.preparableSQLDataStatement(SQLGrammar.java:2127)
at com.foundationdb.sql.parser.SQLGrammar.StatementPart(SQLGrammar.java:1870)
at com.foundationdb.sql.parser.SQLGrammar.Statement(SQLGrammar.java:1768)
at com.foundationdb.sql.parser.SQLGrammar.parseStatement(SQLGrammar.java:1754)
at com.foundationdb.sql.parser.SQLParser.parseStatement(SQLParser.java:103)
… 31 more
java.lang.NullPointerException
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:142)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:76)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)
at com.sun.proxy. P r o x y 157. s e l e c t T o t a l ( U n k n o w n S o u r c e ) a t c o m . e l a n . e x p o . s c h e d u l e . D a s h S c h e d u l e . g e t T o t a l E x c e l d a t a ( D a s h S c h e d u l e . j a v a : 186 ) a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e 0 ( N a t i v e M e t h o d ) a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e ( N a t i v e M e t h o d A c c e s s o r I m p l . j a v a : 62 ) a t s u n . r e f l e c t . D e l e g a t i n g M e t h o d A c c e s s o r I m p l . i n v o k e ( D e l e g a t i n g M e t h o d A c c e s s o r I m p l . j a v a : 43 ) a t j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( M e t h o d . j a v a : 497 ) a t o r g . s p r i n g f r a m e w o r k . s c h e d u l i n g . s u p p o r t . S c h e d u l e d M e t h o d R u n n a b l e . r u n ( S c h e d u l e d M e t h o d R u n n a b l e . j a v a : 84 ) a t o r g . s p r i n g f r a m e w o r k . s c h e d u l i n g . s u p p o r t . D e l e g a t i n g E r r o r H a n d l i n g R u n n a b l e . r u n ( D e l e g a t i n g E r r o r H a n d l i n g R u n n a b l e . j a v a : 54 ) a t o r g . s p r i n g f r a m e w o r k . s c h e d u l i n g . c o n c u r r e n t . R e s c h e d u l i n g R u n n a b l e . r u n ( R e s c h e d u l i n g R u n n a b l e . j a v a : 93 ) a t j a v a . u t i l . c o n c u r r e n t . E x e c u t o r s Proxy157.selectTotal(Unknown Source) at com.elan.expo.schedule.DashSchedule.getTotalExceldata(DashSchedule.java:186) 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 org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93) at java.util.concurrent.Executors Proxy157.selectTotal(UnknownSource)atcom.elan.expo.schedule.DashSchedule.getTotalExceldata(DashSchedule.java:186)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)atjava.lang.reflect.Method.invoke(Method.java:497)atorg.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84)atorg.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)atorg.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93)atjava.util.concurrent.ExecutorsRunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access 201 ( S c h e d u l e d T h r e a d P o o l E x e c u t o r . j a v a : 180 ) a t j a v a . u t i l . c o n c u r r e n t . S c h e d u l e d T h r e a d P o o l E x e c u t o r 201(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor 201(ScheduledThreadPoolExecutor.java:180)atjava.util.concurrent.ScheduledThreadPoolExecutorScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

查看 Mapper.xml

是否 as 后面接的是 单引号,将as后面的单引号改为双引号 问题解决

select t.cid,t.cn,
sum(case t.eduId1 when '本科以下' then t.num else 0 end) as '本科以下',
sum(case t.eduId1 when '本科' then t.num else 0 end) as '本科',
sum(case t.eduId1 when '硕士' then t.num else 0 end) as '硕士',
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值