Thanks Steve.
We have been running GF with Derby for the TimerPool without a single problem for, well, for 10 years or so. PROD, yes.
I also considered this to be the default but I do not know that.
Anyways, if you can help us to resolve this issue now it would be great.
5T11:51:42.879+0200|INFO|Payara 5.2020|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=19;_ThreadName=RunLevelControllerThread-1598349051281;_TimeMillis=1598349102879;_LevelValue=800;|==> Restoring Timers ... |#]
[#|2020-08-25T11:51:42.943+0200|INFO|Payara 5.2020|org.eclipse.persistence.session./file:/srv/payara5/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App|_ThreadID=19;_ThreadName=RunLevelControllerThread-1598349051281;_TimeMillis=1598349102943;_LevelValue=800;|EclipseLink, version: Eclipse Persistence Services - 2.7.6.payara-p1|#]
[#|2020-08-25T11:51:43.992+0200|INFO|Payara 5.2020|javax.enterprise.system.core.transaction.com.sun.jts.CosTransactions|_ThreadID=19;_ThreadName=RunLevelControllerThread-1598349051281;_TimeMillis=1598349103992;_LevelValue=800;|JTS5014: Recoverable JTS instance, serverId=[100]|#]
[#|2020-08-25T11:51:44.348+0200|INFO|Payara 5.2020|org.eclipse.persistence.session./file:/srv/payara5/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection|_ThreadID=19;_ThreadName=RunLevelControllerThread-1598349051281;_TimeMillis=1598349104348;_LevelValue=800;|/file:/srv/payara5/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful|#]
[#|2020-08-25T11:51:44.426+0200|WARNING|Payara 5.2020|org.eclipse.persistence.session./file:/srv/payara5/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App|_ThreadID=19;_ThreadName=RunLevelControllerThread-1598349051281;_TimeMillis=1598349104426;_LevelValue=900;|Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.6.payara-p1): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: java.lang.reflect.UndeclaredThrowableException
Error Code: 0
Call: SELECT "TIMERID", "APPLICATIONID", "BLOB", "CONTAINERID", "CREATIONTIMERAW", "INITIALEXPIRATIONRAW", "INTERVALDURATION", "LASTEXPIRATIONRAW", "OWNERID", "PKHASHCODE", "SCHEDULE", "STATE" FROM "EJB__TIMER__TBL" WHERE (("OWNERID" = ?) AND ("STATE" = ?))
bind => [2 parameters bound]
Query: ReadAllQuery(name="findTimersByOwnerAndState" referenceClass=TimerState sql="SELECT "TIMERID", "APPLICATIONID", "BLOB", "CONTAINERID", "CREATIONTIMERAW", "INITIALEXPIRATIONRAW", "INTERVALDURATION", "LASTEXPIRATIONRAW", "OWNERID", "PKHASHCODE", "SCHEDULE", "STATE" FROM "EJB__TIMER__TBL" WHERE (("OWNERID" = ?) AND ("STATE" = ?))")
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:342)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:691)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:567)
at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2099)
at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:603)
at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:265)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:275)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:261)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:332)
at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:744)
at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2759)
[...]
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.sql.SQLException: java.lang.reflect.UndeclaredThrowableException
at com.sun.gjc.spi.jdbc40.ProfiledConnectionWrapper40.prepareStatement(ProfiledConnectionWrapper40.java:247)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1595)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1544)
at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:806)
at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:628)
... 75 more
Caused by: java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy397.prepareStatement(Unknown Source)
at com.sun.gjc.spi.base.ConnectionHolder.prepareStatement(ConnectionHolder.java:609)
at com.sun.gjc.spi.jdbc40.ProfiledConnectionWrapper40.prepareCachedStatement(ProfiledConnectionWrapper40.java:372)
at com.sun.gjc.spi.jdbc40.ProfiledConnectionWrapper40.prepareCachedStatement(ProfiledConnectionWrapper40.java:66)
at com.sun.gjc.spi.ManagedConnectionImpl.prepareCachedStatement(ManagedConnectionImpl.java:1080)
at com.sun.gjc.spi.jdbc40.ProfiledConnectionWrapper40.prepareStatement(ProfiledConnectionWrapper40.java:243)
... 79 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.gjc.spi.JdbcObjectsFactory$1.invoke(JdbcObjectsFactory.java:143)
... 85 more
Caused by: org.h2.jdbc.JdbcSQLException: Table "EJB__TIMER__TBL" not found; SQL statement:
SELECT "TIMERID", "APPLICATIONID", "BLOB", "CONTAINERID", "CREATIONTIMERAW", "INITIALEXPIRATIONRAW", "INTERVALDURATION", "LASTEXPIRATIONRAW", "OWNERID", "PKHASHCODE", "SCHEDULE", "STATE" FROM "EJB__TIMER__TBL" WHERE (("OWNERID" = ?) AND ("STATE" = ?)) [42102-196]
Can you please let me know if H2 db will be a suitable replacement for this scenario, and if so, how I can make it work so Payara will find the timer tables once it is starting?
Thanks!!
java -cp /srv/payara5/h2db/bin/h2.jar org.h2.tools.Shell
Once I would connect to H2 we could use 'run script...' to run the mentioned script then.
But where is the H2 database located that I would run the script on?
Pretty worth documenting this... especially when introducing this kind of change!
Thanks.
/path/to/payara/payara5/h2db/bin
, to find the h2db binariesjava -jar h2.jar
(this will start the H2 Admin UI server and open browser with the Admin UI URL)jdbc:h2:/path/to/payara/payara5/glassfish/domains/domain1/lib/databases/ejbtimer
This email, its contents and attachments contain information from J2 Global, Inc. and/or its affiliates which may be privileged, confidential or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution or use of the contents of this message is prohibited. If you have received this email in error, please notify the sender by reply email and delete the original message and any copies.--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/e3fc097a-6165-4e26-9656-7e47309169d0n%40googlegroups.com.
sql> runscript from '/srv/payara5/glassfish/lib/install/databases/ejbtimer_h2.sql';
Error: org.h2.jdbc.JdbcSQLException: The database is read only; SQL statement:
URL jdbc:h2:/srv/payara5/glassfish/domains/domain1/lib/databases/ejbtimer;ACCESS_MODE_DATA=rws
Did not work..
Also, I keep username/pass for db login empty - which seems to work fine.
Correct?
0-08-27T18:53:51.701+0200|INFO|Payara 5.2020|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=27;_ThreadName=RunLevelControllerThread-1598547198981;_TimeMillis=1598547231701;_LevelValue=800;|==> Restoring Timers ... |#]
[#|2020-08-27T18:53:51.777+0200|INFO|Payara 5.2020|org.eclipse.persistence.session./file:/srv/payara5/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App|_ThreadID=27;_ThreadName=RunLevelControllerThread-1598547198981;_TimeMillis=1598547231777;_LevelValue=800;|EclipseLink, version: Eclipse Persistence Services - 2.7.6.payara-p1|#]
[#|2020-08-27T18:53:52.342+0200|INFO|Payara 5.2020|javax.enterprise.system.core.transaction.com.sun.jts.CosTransactions|_ThreadID=27;_ThreadName=RunLevelControllerThread-1598547198981;_TimeMillis=1598547232342;_LevelValue=800;|JTS5014: Recoverable JTS instance, serverId=[100]|#]
[#|2020-08-27T18:53:52.569+0200|INFO|Payara 5.2020|org.eclipse.persistence.session./file:/srv/payara5/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App.connection|_ThreadID=27;_ThreadName=RunLevelControllerThread-1598547198981;_TimeMillis=1598547232569;_LevelValue=800;|/file:/srv/payara5/glassfish/domains/domain1/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App login successful|#]
[#|2020-08-27T18:53:52.644+0200|INFO|Payara 5.2020|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=27;_ThreadName=RunLevelControllerThread-1598547198981;_TimeMillis=1598547232644;_LevelValue=800;|There are no EJB Timers owned by this server|#]
[#|2020-08-27T18:53:52.644+0200|INFO|Payara 5.2020|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=27;_ThreadName=RunLevelControllerThread-1598547198981;_TimeMillis=1598547232644;_LevelValue=800;|<== ... Timers Restored.|#]