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();
}
}
}

解决方案 »

  1.   

    我想查询所有记录的!这是控制台显示信息:<Info> <OTP-102> :system log init,writeLog=false
    测试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: 缺失表达式
      

  2.   

    select .id,.name,.sex,.birthday,.department,.isvalid from where 1=1 from 都没表吗
      

  3.   

    select from 后没有表名,太粗心了。