Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LruCache - Lock is null #803

Closed
pizzi80 opened this issue Apr 19, 2024 · 4 comments
Closed

LruCache - Lock is null #803

pizzi80 opened this issue Apr 19, 2024 · 4 comments

Comments

@pizzi80
Copy link
Contributor

pizzi80 commented Apr 19, 2024

the internal lock is transient
so if you restart tomcat and use a ViewScoped bean
the internal lock is null

java.lang.NullPointerException: Cannot invoke "java.util.concurrent.locks.Lock.lock()" because "this.lock" is null
    at org.omnifaces.util.cache.LruCache.withLock(LruCache.java:87)
    at org.omnifaces.util.cache.LruCache.get(LruCache.java:103)
    at org.omnifaces.util.cache.LruCache.get(LruCache.java:42)
    at org.omnifaces.cdi.viewscope.ViewScopeStorageInSession.getBeanStorage(ViewScopeStorageInSession.java:83)
    at org.omnifaces.cdi.viewscope.ViewScopeStorageInSession$Proxy$_$$_WeldClientProxy.getBeanStorage(Unknown Source)
    at org.omnifaces.cdi.viewscope.ViewScopeManager.getBeanStorage(ViewScopeManager.java:192)
    at org.omnifaces.cdi.viewscope.ViewScopeManager.getBean(ViewScopeManager.java:128)
    at org.omnifaces.cdi.viewscope.ViewScopeManager$Proxy$_$$_WeldClientProxy.getBean(Unknown Source)
@BalusC
Copy link
Member

BalusC commented Apr 21, 2024

Ay crap. Overlooked that part. I'm having vacations atm and can't quickly release a hotfix. You'll need to have patience until sometime after may 4.

@pizzi80
Copy link
Contributor Author

pizzi80 commented Apr 22, 2024

No worries, have a nice holiday!

... in the meantime I'll use a local build of my fork ... ;)

I've have made a lot of PR(s) 😜

@BalusC
Copy link
Member

BalusC commented May 5, 2024

Oh, this duplicates #802. I've already fixed it via that ticket and will release 4.4.1 as soon as possible when there are no unworkaroundable 4.4 bugs in remaining issues.

@BalusC BalusC closed this as completed May 5, 2024
@BalusC
Copy link
Member

BalusC commented May 5, 2024

4.4.1 has been released and will be in Maven central soon.

Thank you very much for reporting!

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

No branches or pull requests

2 participants