Skip to content

[WFLY-21409] Update org.jboss.as.jpa.container.NonTxEmCloser.popCall to check for null container managed stateless session/entity manager#19578

Merged
scottmarlow merged 1 commit intowildfly:mainfrom
scottmarlow:WFLY-21409_check_for_null_NonTxEmCloser_popCall
Jan 30, 2026
Merged

[WFLY-21409] Update org.jboss.as.jpa.container.NonTxEmCloser.popCall to check for null container managed stateless session/entity manager#19578
scottmarlow merged 1 commit intowildfly:mainfrom
scottmarlow:WFLY-21409_check_for_null_NonTxEmCloser_popCall

Conversation

@scottmarlow
Copy link
Contributor

https://issues.redhat.com/browse/WFLY-21409

This is to address a minor (e.g. ignored) NPE that only occurs with TRACE logging enabled for Persistence:

2026-01-29 11:02:32,150 TRACE [org.jboss.as.jpa] (default task-2) Could not close (non-transactional) container managed stateless session. This shouldn't impact application functionality (only read operations occur in non-transactional mode): java.lang.NullPointerException: Cannot invoke "java.lang.AutoCloseable.close()" because "statelessSession" is null
at org.jboss.as.jpa@40.0.0.Beta1-SNAPSHOT//org.jboss.as.jpa.container.NonTxEmCloser.popCall(NonTxEmCloser.java:61)

…to check for null container managed stateless session/entity manager

Signed-off-by: Scott Marlow <scott.marlow@ibm.com>
@scottmarlow
Copy link
Contributor Author

I happened to notice the problem while testing locally with TRACE logging enabled for org.jboss.as.jpa.

@scottmarlow scottmarlow merged commit 5e8b9c9 into wildfly:main Jan 30, 2026
13 of 14 checks passed
@scottmarlow scottmarlow deleted the WFLY-21409_check_for_null_NonTxEmCloser_popCall branch January 30, 2026 13:33
@scottmarlow
Copy link
Contributor Author

Thanks for the review Brian!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants