package cn.com.ksource.student.action;import cn.com.ebis.commons.dao.CommDao;
import cn.com.ebis.commons.dao.MethodNotFoundException;
import cn.com.ebis.commons.dao.ValueObject;
import cn.com.ebis.frame.busirealization.transaction.IBusiness;
import cn.com.ebis.frame.exception.GeneralException;
import cn.com.ebis.struts.action.PaginationForm;
import org.apache.log4j.Category;import java.sql.SQLException;
import java.util.ArrayList;public class FindAllStudentaction extends IBusiness {
private transient Category cat = Category.getInstance(this.getClass());
private ValueObject vo = new ValueObject("student_zhangbin"); @Override
public void execute() throws GeneralException {
try {
CommDao dao = new CommDao(this.getFrameconn());
System.out.println("测试dao1");
ArrayList arrayList = dao.find(vo);/*
* //这行代码有问题? 测试dao1 sql=select
* .id,.name,.sex,.birthday,.department,.isvalid
* from where 1=1 -- param=[]
* DAO ERROR: dao message is :
* call dao location is :
* FindAllStudentaction.java:23:execute() ;
* execute model name is :
* student_zhangbin ; execute
* sql is : select
* .id,.name,.sex,.birthday,.department,.isvalid
* from where 1=1 ERROR : sql
* execute error !
* java.sql.SQLException:
* ORA-00936: 缺失表达式
*/
System.out.println("测试dao2");
// dao.find(valueObject, subjoin)
PaginationForm pageForm = new PaginationForm();
pageForm.setList(arrayList);
this.getFormHM().put("arrayList", pageForm); } catch (SQLException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
}
import cn.com.ebis.commons.dao.MethodNotFoundException;
import cn.com.ebis.commons.dao.ValueObject;
import cn.com.ebis.frame.busirealization.transaction.IBusiness;
import cn.com.ebis.frame.exception.GeneralException;
import cn.com.ebis.struts.action.PaginationForm;
import org.apache.log4j.Category;import java.sql.SQLException;
import java.util.ArrayList;public class FindAllStudentaction extends IBusiness {
private transient Category cat = Category.getInstance(this.getClass());
private ValueObject vo = new ValueObject("student_zhangbin"); @Override
public void execute() throws GeneralException {
try {
CommDao dao = new CommDao(this.getFrameconn());
System.out.println("测试dao1");
ArrayList arrayList = dao.find(vo);/*
* //这行代码有问题? 测试dao1 sql=select
* .id,.name,.sex,.birthday,.department,.isvalid
* from where 1=1 -- param=[]
* DAO ERROR: dao message is :
* call dao location is :
* FindAllStudentaction.java:23:execute() ;
* execute model name is :
* student_zhangbin ; execute
* sql is : select
* .id,.name,.sex,.birthday,.department,.isvalid
* from where 1=1 ERROR : sql
* execute error !
* java.sql.SQLException:
* ORA-00936: 缺失表达式
*/
System.out.println("测试dao2");
// dao.find(valueObject, subjoin)
PaginationForm pageForm = new PaginationForm();
pageForm.setList(arrayList);
this.getFormHM().put("arrayList", pageForm); } catch (SQLException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
}
测试dao1
sql=select .id,.name,.sex,.birthday,.department,.isvalid from where 1=1 -- param=[]
DAO ERROR: dao message is :
call dao location is : FindAllStudentaction.java:23:execute() ;
execute model name is : student_zhangbin ;
execute sql is : select .id,.name,.sex,.birthday,.department,.isvalid from where 1=1
ERROR : sql execute error !
java.sql.SQLException: ORA-00936: 缺失表达式