oracle 数据库时报错 :

java.sql.SQLException: sql injection violation, syntax error, expect DIMENSION, actual COMMA : select a.material_type num,d.text material_type, c.equipment_model model ,c.serial_number  from mv_spm_spt_material_info a, t_ept_config b, t_ept_base_info c ,t_base_dictionary d  where b.material_id = a.id and b.equipment_id = c.base_id and a.material_type = d.value  and d.key = 'MATERIAL_TYPE' and a.module_level = 'A' and a.module_type = 'B000'  and c.serial_number = '116381' 
	at com.alibaba.druid.wall.WallFilter.check(WallFilter.java:582)
	at com.alibaba.druid.wall.WallFilter.connection_prepareStatement(WallFilter.java:185)
	at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:446)
	at com.alibaba.druid.filter.FilterAdapter.connection_prepareStatement(FilterAdapter.java:928)
	at com.alibaba.druid.filter.FilterEventAdapter.connection_prepareStatement(FilterEventAdapter.java:122)
	at com.alibaba.druid.filter.FilterChainImpl.connection_prepareStatement(FilterChainImpl.java:446)
	at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.prepareStatement(ConnectionProxyImpl.java:342)
	at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:311)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:74)
	at com.sun.proxy.$Proxy32.prepareStatement(Unknown Source)
        from www.1b23.com

由于配置了druid连接池的 wall 拦截器,SQL防火墙拦截了你的SQL,解决办法: 关闭 druid 的 wall 拦截