最新在使用 Druid 时遇到了行转列报:xmlagg(xmlparse(content xxxxx||',' wellformed) order by xxxxx).getclobval() 错误的问题,最终通过修改参数得以解决,这里分享给大家!
在执行行转列时,报错信息如下:
Caused by: java.sql.SQLException: sql injection violation, syntax error: syntax error, expect RPAREN, actual IDENTIFIER gp : SELECT
gp.CANTEENID as canteenId,
ct.name as canteenName,
xmlagg(xmlparse(content gp.GOODSID||',' wellformed) order by gp.GOODSID).getclobval() AS goodsIds
FROM
GOODS_PROVIDER gp left join CANTEEN ct on ct.uuid = gp.CANTEENID
WHERE
PROVIDERID = ?
GROUP BY
gp.CANTEENID,
ct.name
at com.alibaba.druid.wall.WallFilter.check(WallFilter.java:725)
修改 wallConfig strictSyntaxCheck 参数为 false,最终得以解决。
: » Druid 行转列报xmlagg(xmlparse(content xxxxx||’,’ wellformed) order by xxxxx).getclobval()错误
原创文章,作者:kepupublish,如若转载,请注明出处:https://blog.ytso.com/251732.html