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

NPE when get result from JCache - @CacheResult #5000

Closed
ciment7 opened this issue Nov 19, 2020 · 7 comments
Closed

NPE when get result from JCache - @CacheResult #5000

ciment7 opened this issue Nov 19, 2020 · 7 comments
Assignees
Labels
Status: Abandoned User has not supplied reproducers for bug report, soon to be closed if user doesn’t come back Type: Bug Label issue as a bug defect

Comments

@ciment7
Copy link

ciment7 commented Nov 19, 2020

Description


Hi,

I`m running war application on payara 5.201 (Jakarta EE 8). Sometimes (usually when the application is under heavy load) I got this exception:

caused by: java.lang.NullPointerException
	at java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
	at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl.getJndiNameEnvironment(ComponentEnvManagerImpl.java:161)
	at fish.payara.appserver.context.JavaEEContextUtilImpl.createInvocationContext(JavaEEContextUtilImpl.java:222)
	at fish.payara.appserver.context.JavaEEContextUtilImpl.setInstanceComponentId(JavaEEContextUtilImpl.java:190)
	at fish.payara.nucleus.hazelcast.PayaraHazelcastSerializer.read(PayaraHazelcastSerializer.java:73)
	at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:48)
	at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:187)

This exception I get when I hit cache by JCache API - @CacheResult. I use multiple payara nodes clustered with multicast options.

This is my snippet of code:

 @CacheResult
    public MyObject getScheduleById(@CacheKey Long myObjectId) {
        ...
        
    }

Expected Outcome

It should never throw exception :)

Current Outcome

Less than 1% of all requests finish with exception.

Steps to reproduce (Only for bug reports)

When the cache is under heavy load.

Environment

  • Payara Version: 5.201
  • Edition: Full
  • JDK Version: java-11-openjdk-11.0.8.10-0.el8_2.x86_64
  • Operating System: Linux (Centos 8)
@AlanRoth AlanRoth added the Status: Open Issue has been triaged by the front-line engineers and is being worked on verification label Nov 19, 2020
@AlanRoth AlanRoth self-assigned this Nov 19, 2020
@AlanRoth
Copy link

Hi @ciment7, can you please try to reproduce this issue in the latest version of Payara Community? (5.2020.6) Please also provide a reproducer ideally following the SSCCE rules: http://www.sscce.org/. It will greatly help us to find the cause and fix it.

@AlanRoth AlanRoth added Status: Pending Waiting on the issue requester to give more details or share a reproducer and removed Status: Open Issue has been triaged by the front-line engineers and is being worked on verification labels Nov 19, 2020
@lprimak
Copy link
Contributor

lprimak commented Nov 19, 2020

I think this will be fixed when this PR (or it's subsets) are merged: #4762

@ciment7
Copy link
Author

ciment7 commented Nov 20, 2020

Hi @ciment7, can you please try to reproduce this issue in the latest version of Payara Community? (5.2020.6) Please also provide a reproducer ideally following the SSCCE rules: http://www.sscce.org/. It will greatly help us to find the cause and fix it.

yes of course, I will try to reproduce this bug on the latest version of Payara Community. I will notify you then. Thanks.

@AlanRoth AlanRoth added the Type: Bug Label issue as a bug defect label Nov 23, 2020
@AlanRoth
Copy link

Hi @ciment7, do you have any updates on the status of the reproducer?

@AlanRoth AlanRoth added Status: Abandoned User has not supplied reproducers for bug report, soon to be closed if user doesn’t come back and removed Status: Pending Waiting on the issue requester to give more details or share a reproducer labels Nov 25, 2020
@lprimak
Copy link
Contributor

lprimak commented Nov 28, 2020

#5010 should fix this issue

@ciment7
Copy link
Author

ciment7 commented Nov 30, 2020

Hi @ciment7, do you have any updates on the status of the reproducer?

Hi, I can not reproduce NPE on my local machine or test environment. I don`t have any idea how to reproduce NPE. I wrote stress test, but without the exceptions.

@AlanRoth
Copy link

AlanRoth commented Dec 1, 2020

Hi @ciment7,

Without a way of reproducing this issue reliably, I will have to close it. @lprimak believes #5010 will resolve this issue, so I recommend to wait until that is implemented and released and to try to see if it alleviates your problems.

Feel free to reopen the issue if you find a simple way of reproducing the problem.

Thank you,
Alan

@AlanRoth AlanRoth closed this as completed Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Abandoned User has not supplied reproducers for bug report, soon to be closed if user doesn’t come back Type: Bug Label issue as a bug defect
Projects
None yet
Development

No branches or pull requests

3 participants