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

FISH-10136 Fix NPE in Payara Micro and Embedded #7065

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

Pandrex247
Copy link
Member

@Pandrex247 Pandrex247 commented Nov 13, 2024

Description

Adds a fallout clause for if field doesn't exist. The field in question belonged in Mojarra, who have since potentially fixed the issue themselves in eclipse-ee4j/mojarra#5479?

Without this change, the following error is thrown on application deployment/undeployment (most prominently in Micro and Embedded)

[2024-11-13T08:49:24.762+0200] [] [WARNING] [] [jakarta.enterprise.web.util] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1731480564762] [levelValue: 900] [[
  Error clearing BeanELResolver cache
java.lang.NullPointerException
	at org.glassfish.web.loader.WebappClassLoader.clearBeanResolver(WebappClassLoader.java:2677)
	at org.glassfish.web.loader.WebappClassLoader.clearBeanELResolverCache(WebappClassLoader.java:2666)
	at org.glassfish.web.loader.WebappClassLoader.stop(WebappClassLoader.java:2054)
	at org.glassfish.web.loader.WebappClassLoader.preDestroy(WebappClassLoader.java:2017)

Need to look into if this entire block of code is still required any more; it seems quite closely tied to Mojarra who have potentially resolved it themselves? Would need to follow it through carefully across redeployments to see if we're still holding on to anything on our side.

Originally introduced here: #6677

Important Info

Blockers

None

Testing

New tests

None

Testing Performed

Started Payara Micro and deployed clusterjsp - no explosions.

Started Payara Server and redeployed classloader-data-api several times - the number of class loaders didn't continually increase.

Testing Environment

Windows 11, Zulu JDK 11.0.25

Documentation

N/A

Notes for Reviewers

None

@Pandrex247 Pandrex247 changed the title FISH-10136 FISH-10136 Fix NPE in Payara Micro and Embedded Nov 13, 2024
Copy link
Contributor

@breakponchito breakponchito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return;
}

// TODO: Review whether this is still required; Mojarra may have fixed this themselves in PR#5479?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Mojarra fixed this.
It's not applicable to any other Faces implementation,
so I think it's safe to remove it and all it's dependent methods below.
Please double-check with ClassLoaderLeak detector:
https://gist.github.com/lprimak/973ce6289dc1e5ed86dc09b62008de97

@lprimak
Copy link
Contributor

lprimak commented Nov 23, 2024

Even easier fix:

Just change the error log from WARNING to FINE.
But either way would be the correct fix :)

Mojarra handles this itself now, we should no longer need this on our side

Signed-off-by: Andrew Pielage <[email protected]>
@Pandrex247 Pandrex247 marked this pull request as ready for review November 26, 2024 17:06
@Pandrex247 Pandrex247 merged commit be91067 into payara:main Nov 27, 2024
1 check passed
@Pandrex247 Pandrex247 deleted the FISH-10136-Fix-Micro-NPE branch November 27, 2024 10:02
@Pandrex247 Pandrex247 restored the FISH-10136-Fix-Micro-NPE branch December 2, 2024 12:02
@Pandrex247 Pandrex247 mentioned this pull request Dec 2, 2024
Pandrex247 added a commit to Pandrex247/Payara that referenced this pull request Dec 4, 2024
FISH-10136 Fix NPE in Payara Micro and Embedded
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.

3 participants