开发者社区> 问答> 正文

Druid 执行SQL报错?报错

@wenshao

filters=mergeStat,slf4j   执行语句 desc station name  报错了

14:23:45.519 [main] [ERROR] (StatFilter.java:147) merge sql error, dbType mysql, sql : 
desc station name
com.alibaba.druid.sql.parser.ParserException: syntax error, IDENTIFIER name, pos 17
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:299) ~[druid-2.10.jar:na]
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:107) ~[druid-2.10.jar:na]
at com.alibaba.druid.sql.parser.SQLStatementParser.parseStatementList(SQLStatementParser.java:102) ~[druid-2.10.jar:na]
at com.alibaba.druid.sql.visitor.ParameterizedOutputVisitorUtils.parameterize(ParameterizedOutputVisitorUtils.java:53) ~[druid-2.10.jar:na]
at com.alibaba.druid.filter.stat.StatFilter.mergeSql(StatFilter.java:145) [druid-2.10.jar:na]
at com.alibaba.druid.filter.stat.StatFilter.createSqlStat(StatFilter.java:629) [druid-2.10.jar:na]
at com.alibaba.druid.filter.stat.StatFilter.internalBeforeStatementExecute(StatFilter.java:397) [druid-2.10.jar:na]
at com.alibaba.druid.filter.stat.StatFilter.statementExecuteQueryBefore(StatFilter.java:335) [druid-2.10.jar:na]
at com.alibaba.druid.filter.FilterEventAdapter.statement_executeQuery(FilterEventAdapter.java:299) [druid-2.10.jar:na]
at com.alibaba.druid.filter.FilterChainImpl.statement_executeQuery(FilterChainImpl.java:2358) [druid-2.10.jar:na]
at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.executeQuery(StatementProxyImpl.java:211) [druid-2.10.jar:na]
at com.alibaba.druid.pool.DruidPooledStatement.executeQuery(DruidPooledStatement.java:143) [druid-2.10.jar:na]

展开
收起
爱吃鱼的程序员 2020-06-22 15:14:10 1270 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    14:39:05.207[main][ERROR](StatFilter.java:147)mergesqlerror,dbTypemysql,sql: 
    createtableifnotexistslogback_2013_11(
    id int(11)NOTNULLAUTO_INCREMENT,
    msg varchar(5000)CHARACTERSETutf8COLLATEutf8_general_ciNULLDEFAULTNULL,
    logger varchar(500)CHARACTERSETutf8COLLATEutf8_general_ciNULLDEFAULTNULL,
    thread varchar(100)CHARACTERSETutf8COLLATEutf8_general_ciNULLDEFAULTNULL,
    time datetimeNULLDEFAULTNULL,
    lv int(11)NULLDEFAULTNULL,
    PRIMARYKEY(id),
    INDEXlv(lv)USINGBTREE 
    )
    ENGINE=MyISAM
    DEFAULTCHARACTERSET=utf8COLLATE=utf8_general_ci
    AUTO_INCREMENT=1
    CHECKSUM=0
    ROW_FORMAT=DYNAMIC
    DELAY_KEY_WRITE=0
    ;
    com.alibaba.druid.sql.parser.ParserException:syntaxerror,expectRPAREN,actualIDENTIFIERUSING,pos471
    druid什么版本?ghub前天刚出的代码,应该是最新版本。我也遇到这问题。


    [ERROR]通过商品中间件补全应开信息时异常
    org.mybatis.spring.MyBatisSystemException:nestedexceptionisorg.apache.ibatis.exceptions.PersistenceException: 
    ###Errorupdatingdatabase.Cause:com.taobao.db.parsing.sql.parser.ParserException:syntaxerror,IDENTIFIER无质保,pos64
    ###Cause:com.taobao.db.parsing.sql.parser.ParserException:syntaxerror,IDENTIFIER无质保,pos64
    atorg.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
    atorg.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)
    at$Proxy10.update(UnknownSource)
    atorg.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:251)
    atorg.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:82)
    atorg.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:40)
    at$Proxy72.completeShuldBillDetail(UnknownSource)
    ....

    2020-06-23 11:57:21
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
SQL Server 2017 立即下载
GeoMesa on Spark SQL 立即下载
原生SQL on Hadoop引擎- Apache HAWQ 2.x最新技术解密malili 立即下载