Open MedMahmoud0207 opened 2 years ago
The same behaviour described above happens when deploying on Payara Server 5.2022.3 (Full) instead of docker
Hi @MedMahmoud0207,
The reproducer you shared doesn't appear to contain all the files for the reproducer, in sources\project\app\src\main\java\someapp
only App.java is present, no other classes such as the application scoped Library class you mention in the reproducer. Could you please share the complete reproducer with all the source files?
Thanks, James
Hi @JamesHillyard, Thanks for your feedback
The Library class is in a .jar dependency included under sources\project\app\libs\lib.jar
and the source code of this lib.jar is under sources\libs\lib
Regards,
Hello @JamesHillyard ,
Hope you were able to find the file you asked for, anyway I will be close in case any further infos are needed.
Thanks
Hi @MedMahmoud0207,
I've escalated this issue to our platform development team as FISH-6640
. Thanks.
Today is 02/02/2023. I got the same issue with the latest version of Payara Micro 6.2023.1. I don't understand it has been 6 months since the issue was reported, but the issue is still there? I did not have the issue with Wildfly.
Description
Hello, I was trying to migrate from payara/micro:4.181 to payara/micro:5.2022.3 and I noticed that the initialization method with observer [@Initialized(ApplicationScoped.class) ServletContext init] is not invoked inside Jar files.
public void init(@Observes @Initialized(ApplicationScoped.class) ServletContext init)
It is invoked correcly when using payara/micro:4.181 though.
Expected Outcome
The init method is invoked to execute some initialization logic
Current Outcome
The init method is not invoked when inside a .jar dependency
Steps to reproduce
To reproduce the described behaviour:
uncomment the line corresponding to the version of payara/micro you want to run the app with.
reproduce_observer_issue.zip
Environment