payara / Payara

Payara Server is an open source middleware platform that supports reliable and secure deployments of Java EE (Jakarta EE) and MicroProfile applications in any environment: on premise, in the cloud or hybrid.
http://www.payara.fish
Other
883 stars 305 forks source link

Bug Report: EJB Timer Service is not available? / FISH-7815 #6381

Open cidylong opened 1 year ago

cidylong commented 1 year ago

Brief Summary

Create an EJB module (jar), deploy it to a payara service instance, payara server throws:

"remote failure: Error occurred during deployment: Failed to create automatic timers for ThssAppScheduler -- EJB Timer Service is not available. Please see server.log for more details. Command deploy failed."

Expected Outcome

EJB timer should works fine

Current Outcome

"remote failure: Error occurred during deployment: Failed to create automatic timers for ThssAppScheduler -- EJB Timer Service is not available. Please see server.log for more details. Command deploy failed."

Reproducer

Develop a simple EJB module with maven build by NetBeans -18

@Singleton
@ApplicationScoped
@Startup
public class ThssAppScheduler implements Serializable {
 .......
@Schedule(hour = "12", minute = "4", second = "5", info = "Lunch time event scratcher.")
public void eventScratcher() {
.......
}
.......
}

compile and deploy it to payara server instance result as:

Screenshot 2023-08-28 at 8 25 10 pm

server log as: server_293.log

tired to configure payara server instance by add-opens and checked payara server instance configure, seems --add-opens is fine,

Screenshot 2023-08-28 at 8 36 14 pm

tried to re-configure payara-executor-service-configuration as well. configure as:

Screenshot 2023-08-28 at 8 39 40 pm

restart-domain and redeploy it to server instance.

There is nothing changed, same error.

Operating System

Rocky Linux 9

JDK Version

Oracle JDK 17.0.7

Payara Distribution

Payara Server Full Profile

svendiedrichsen commented 1 year ago

@cidylong You are mixing CDI and EJB annotations with your provided code example class. Please remove the ApplicationScoped annotation and try again.

cidylong commented 1 year ago

Tried to check service instance configure to make sure

Screenshot 2023-08-28 at 9 01 45 pm

change EJB Timer service to database by given jdbc/__TimerPool to Timer Datasouces and change Persistence Service to DataGrid and Database, restart domain and redeploy application.

EJB Timer service is still not available.

cidylong commented 1 year ago

@svendiedrichsen , Thank you for your advice, ApplicationScoped removed, re-compile, re-deploy it, failed again, same error. "EJB Timer Service is not available"

cidylong commented 1 year ago

@svendiedrichsen , from server log, we can see:

[2023-08-28T19:31:17.295+1000] [Payara 6.2023.8] [INFO] [] [org.eclipse.persistence.session./file:/home/payara/payara6/glassfish/domains/production/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App] [tid: _ThreadID=125 _ThreadName=admin-thread-pool::admin-listener(2)] [timeMillis: 1693215077295] [levelValue: 800] [[

EclipseLink, version: Eclipse Persistence Services - 4.0.1.payara-p1.v202304041433]]

seems EJB Time service is fine, very confused.

svendiedrichsen commented 1 year ago

@cidylong I don't know about how to configure the timer service. I have always used the default configured one.

cidylong commented 1 year ago

Please help on this issue anyone if you have an idea? this is quite important for regular application.

kalinchan commented 1 year ago

Hi @cidylong, I have been able to reproduce this issue and have raised FISH-7815

cidylong commented 1 year ago

@kalinchan, When the bug will be fixed or which version expected?