java.sql.Date的构造函数一定要带参数:
Constructor Summary
Date(int year, int month, int day)
Deprecated. instead use the constructor Date(long date)
Date(long date)
Constructs a Date object using the given milliseconds time value.
Constructor Summary
Date(int year, int month, int day)
Deprecated. instead use the constructor Date(long date)
Date(long date)
Constructs a Date object using the given milliseconds time value.
pDate!=null?pstmt.setDate(2,java.sql.Date.valueOf(pDate)):pstmt.setDate(2,null);2、如果是当前日期,就不要这个参数了,直接在存储过程中处理,取sysdate就可以了