Table/View 'EJB__TIMER__TBL' does not exist

跟風遠走 提交于 2019-12-04 04:05:58

问题


I have an application that runs on Glassfish 3.0.1. I've already successfully installed it on a few instances, but now I'm trying to set up a new server. Looking at the log, the deployment goes fine at first, but then I get this:

 [#|2010-12-06T17:53:38.020+0000|WARNING|glassfish3.0.1|org.eclipse.persistence.session.file:/opt/sun/glassfish/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App|_ThreadID=31;_ThreadName=Thread-1;|
Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'EJB__TIMER__TBL' does not exist.
Error Code: 30000
Call: SELECT TIMERID, BLOB, INITIALEXPIRATIONRAW, SCHEDULE, INTERVALDURATION, OWNERID, STATE, LASTEXPIRATIONRAW, PKHASHCODE, CREATIONTIMERAW, CONTAINERID FROM EJB__TIMER__TBL WHERE (((CONTAINERID = ?) AND (OWNERID = ?)) AND (STATE = ?))
bind => [84650008375328779, server, 0]
Query: ReadAllQuery(name="findTimersByContainerAndOwnerAndState" referenceClass=TimerState sql="SELECT TIMERID, BLOB, INITIALEXPIRATIONRAW, SCHEDULE, INTERVALDURATION, OWNERID, STATE, LASTEXPIRATIONRAW, PKHASHCODE, CREATIONTIMERAW, CONTAINERID FROM EJB__TIMER__TBL WHERE (((CONTAINERID = ?) AND (OWNERID = ?)) AND (STATE = ?))")
    at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
    at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:687)
    at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:530)
    at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:529)
    at org.eclipse.persistence.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:133)
    at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:205)
    at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:191)
    at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:
 [snip]

All the properties for the __TimerPool connection pool have the default values (so it uses the embedded Derby driver). As far as I can tell, the settings are the same as my other servers - so why is it failing on this one?


EDIT

I was able to make it work by copying the timer DB from a working instance of Glassfish (located at $GLASSFISH_HOME/glassfish/domains/domain1/lib/databases/ejbtimer). I'd still like to know what caused this problem.

The weird thing is, my application is using timers, but none of them are persistent (or at least, they shouldn't be). So there's no reason why Glassfish is even looking at this DB, right?


回答1:


It's happened to me when I've overwritten those files while GF is still running, say, as part of an upgrade gone bad. The solution I found was the same as you: shut down a working GF, and copy over files under <gfhome>/domains/domain1/lib/database.



来源:https://stackoverflow.com/questions/4369512/table-view-ejb-timer-tbl-does-not-exist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!