ConcurrentStatisticsImpl#getSecondLevelCacheStatistics() throws NPE if second level cache is not activated

Description

When deploying an application on Wildfly (which works) and displaying the deployment, a NPE occurs:

which happens, I assume, because we have no second level cache active. Comparing the code with e.g. version 5.0.0, there was the following check:

compared to 5.2.2:

Maybe this points in the right direction.

Environment

None

Activity

Show:
Gail Badner
January 9, 2017, 7:33 PM

, does this happen with 5.2.6?

Also, please attach a complete a stacktrace.

Johannes Geiger
January 10, 2017, 11:23 AM

Complete Stacktrace:

Hibernate 5.2.6:

Nope, see the following stacktrace:

Gail Badner
January 11, 2017, 5:28 AM

This does not affect 5.0 or 5.1 branches.

David Carr
May 3, 2017, 7:55 AM

I am also getting this error with JBoss EAP 7 integrating Hibernate 5.2.7. Occurring when I try to view deployments in the JBoss EAP Management console, but the application otherwise works fine.

I want to add this comment so there's a few extra search terms (i.e. the Wildfly error code) to lead here.

Vlad Mihalcea
May 12, 2017, 8:32 AM

Applied PR upstream.

Assignee

Unassigned

Reporter

Johannes Geiger

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Affects versions

Priority

Major
Configure