-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Description
GlassFish Version (and build number)
8.0.0-M14
JDK version
21
OS
Windows 10 Pro
Database
Built-in Derby
Problem Description
I tried to use CDI Startup event observation or EJB @Singleton/Startup with a @PostConstruct method to initialize some Sample Data, failed.
After digging into the Glassfish server.log, there are some class loading exception when deploying the archive.
A sample DataInitializer written with CDI, like this.
@Transactional
@ApplicationScoped
//@Singleton
//@Startup
public class DataInitializer {
@Inject
PostRepository postRepository;
@Inject
CommentRepository commentRepository;
public void init(@Observes Startup event) {}The test classes:
https://github.com/hantsy/jakartaee11-sandbox/blob/master/data/src/test/java/com/example/it/RepositoryWithDataInitializerTest.java
Steps to reproduce
- Clone https://github.com/hantsy/jakartaee11-sandbox/blob/master/data
- Run the above two tests.
The Glassfish server.log uploaded on Github actions.
https://github.com/hantsy/jakartaee11-sandbox/actions/runs/19353316149/artifacts/4564248729
Impact of Issue
No response
Metadata
Metadata
Assignees
Labels
No labels