我在谷歌应用引擎和云sql中开发应用程序 我用java jpa eclipselink编写服务器。 每天几分钟我得到这个例外: “连接关闭后不允许操作” 几分钟后,异常就消失了 我如何解决异常
是的,我在Google上搜索此异常,但未找到答案
附件是我的堆栈跟踪
exception:Exception [EclipseLink-4002] (Eclipse Persistence Services
- 2.5.0.v20130507-3faac2b):
org.eclipse.persistence.exceptions.DatabaseException
(LoggerHelper.java:20)
Internal Exception:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
No operations allowed after connection closed.
Error Code: 0
Call: SELECT users.*, organizationUsers.id as
managementOrganizationUserId,
organizationUsers.managementOrganizationId,organizationUsers.userId
FROM ManagementOrganizationUsersTable as organizationUsers LEFT JOIN
UsersTable as users ON(users.id=organizationUsers.userId AND
users.userRoleType=?) WHERE
organizationUsers.managementOrganizationId=? AND users.userRoleType=?
GROUP BY
organizationUsers.id,organizationUsers.managementOrganizationId,
organizationUsers.userId ORDER BY firstName ASC LIMIT 20 OFFSET 0
bind => [3 parameters bound]
Query: ResultSetMappingQuery(sql="SELECT users.*,
organizationUsers.id as
managementOrganizationUserId,
organizationUsers.managementOrganizationId,organizationUsers.userId
FROM ManagementOrganizationUsersTable as organizationUsers LEFT JOIN
UsersTable as users ON(users.id=organizationUsers.userId AND
users.userRoleType=?) WHERE
organizationUsers.managementOrganizationId=? AND users.userRoleType=?
GROUP BY
organizationUsers.id,organizationUsers.managementOrganizationId,
organizationUsers.userId ORDER BY firstName ASC LIMIT 20 OFFSET 0")
“您的连接设置是什么”
<properties>
<property name="javax.persistence.jdbc.user" value="XXXX" />
<property name="javax.persistence.jdbc.password" value="XXXX" />
<property name="eclipselink.ddl-generation" value="create-tables" />
<property name="eclipselink.connection-pool.node2.max" value="32"/>
</properties>
“在不活动后,您的网络连接是否在您的数据源中被杀死” 我不明白这个问题 谢谢