Connection对象不为空,为什么创建Statement对象时却报conn关闭

今天在公司用java开发时,发现一个很奇怪的问题,我在操作数据库的时修改,Connection对象不为空,但在创建Statement对象时却报链接已关闭。请教各位大虾了。
************************** conn is not null
java.sql.SQLException: Connection is closed.
        at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.
checkOpen(PoolingDataSource.java:174)
        at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.
createStatement(PoolingDataSource.java:203)
        at com.forlink.forwf.kernel.dao.dbdao.WorkItemDBDao.getWorkItemsCount(Un
known Source)

你可能感兴趣的:(java,DAO,apache,sql)