|
版本: |
|
小版本号: |
|
|
|
数据库: |
|
服务器操作系统: |
|
应用服务器: |
|
客户端操作系统: |
|
浏览器: |
|
|
|
我自己写了一个action,用sql删除表里的数据;页面上有个删除按钮,点击调用action,数据正常删除;但是控制台报错。请问这是什么原因?
action如下:
public static Table deleteAllProduct(){
String sql="delete from ZG_PU_Product p where p.fid is not null ";
HashMap<String, String> sqlDetail = new HashMap<String, String>();
sqlDetail.put(DatabaseProduct.DEFAULT.name(), sql);
Table t = SQL.select(sqlDetail, null, "/zgs_oa/purchase/data");
return t;
}
报错信息如下:
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150039; 提示: 执行sql: delete from ZG_PU_Product p where p.fid is not null , binds: []出错
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.system.data.SQL.select(Unknown Source)
at com.justep.system.data.SQL.select(Unknown Source)
at Purchase.deleteAllProduct(Purchase.java:213)
... 28 more
Caused by: java.sql.SQLException: ORA-00900: 无效 SQL 语句
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
at oracle.jdbc.driver.T4C8Odscrarr.receive(T4C8Odscrarr.java:214)
at oracle.jdbc.driver.T4CPreparedStatement.doDescribe(T4CPreparedStatement.java:729)
at oracle.jdbc.driver.OracleStatement.describe(OracleStatement.java:3454)
at oracle.jdbc.driver.OracleResultSetMetaData.<init>(OracleResultSetMetaData.java:57)
at oracle.jdbc.driver.OracleResultSetImpl.getMetaData(OracleResultSetImpl.java:138)
at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getMetaData(DelegatingResultSet.java:322)
at org.apache.tomcat.dbcp.dbcp.DelegatingResultSet.getMetaData(DelegatingResultSet.java:322)
... 31 more
|
|