Internal Exception: java.sql.SQLException: Invalid state, the Connection object is closed. [message #879932] |
Fri, 01 June 2012 02:43  |
Eclipse User |
|
|
|
I have a JSF application that uses Eclipse Persistence Services - 2.1.1.v20100817-r8050, and I sometimes get the following error:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Invalid state, the Connection object is closed.
Error Code: 0
Call: SELECT XXXXX FROM XXXXX
bind => [/Home/Footer/]
Query: ReadAllQuery(name="WWW.find" referenceClass=WWW sql="SELECT XXXXX FROM XXXXX")
I have no idea what is causing it. The exception is thrown in the following function on the "return q.getResultList();" line.
public List<WWW> find(String url) {
}
EntityManager em = getEntityManager();
try {
Query q = em.createNamedQuery("WWW.find");
q.setParameter("url", url);
return q.getResultList();
} finally {
em.close();
}
}
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03554 seconds