2010-12-06 55 views
3

我有一個在Glassfish 3.0.1上運行的應用程序。我已經成功地在幾個實例上安裝了它,但現在我正在嘗試設置一個新的服務器。查看日誌,部署雲處罰款,但後來我得到這個:表/視圖'EJB__TIMER__TBL'不存在

[#|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] 

所有的__TimerPool連接池屬性有默認值(所以它使用嵌入式Derby驅動程序)。據我所知,這些設置與我的其他服務器相同 - 那麼爲什麼它會失敗?


編輯

我能夠使其通過複製的Glassfish的工作實例(位於$GLASSFISH_HOME/glassfish/domains/domain1/lib/databases/ejbtimer)定時器DB工作。我仍然想知道是什麼導致了這個問題。

奇怪的是,我的應用程序正在使用定時器,但它們都不是持久性的(或者至少它們不應該是)。所以Glassfish甚至沒有理由看這個數據庫,對吧?

回答

0

當我在GF運行時覆蓋這些文件時,發生了這種情況,例如,升級過程中出現了一些問題。我找到的解決方案和你一樣:關閉一個工作的GF,並在<gfhome>/domains/domain1/lib/database下複製文件。