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

PlatformDependent#getClassLoader fails in restrictive classloader env… #6251

Closed
wants to merge 1 commit into
base: 4.1
from

Conversation

Projects
None yet
3 participants
@Scottmitch
Member

Scottmitch commented Jan 19, 2017

…ironment

Motivation:
#6042 only addressed PlatformDependent#getSystemClassLoader but getClassLoader is also called in an optional manner in some common code paths but fails to catch a general enough exception to continue working.

Modifications:

  • Calls to getClassLoader which can continue if results fail should catch Throwable

Result:
More resilient code in the presense of restrictive class loaders.
Fixes #6246.

@Scottmitch Scottmitch added the defect label Jan 19, 2017

@Scottmitch Scottmitch added this to the 4.1.8.Final milestone Jan 19, 2017

@Scottmitch Scottmitch self-assigned this Jan 19, 2017

@Scottmitch Scottmitch requested a review from normanmaurer Jan 19, 2017

@Scottmitch

This comment has been minimized.

Show comment
Hide comment
@Scottmitch

Scottmitch Jan 19, 2017

Member

@jesperpedersen - please verify this fix. Also I'm not sure why you get NoClassDefFoundError in the first place. You mentioned in #6038 (comment) WildFly is using an isolated classloader environment based on JBoss Modules. ... any ideas why PlatformDependent0 would no be loaded?

Member

Scottmitch commented Jan 19, 2017

@jesperpedersen - please verify this fix. Also I'm not sure why you get NoClassDefFoundError in the first place. You mentioned in #6038 (comment) WildFly is using an isolated classloader environment based on JBoss Modules. ... any ideas why PlatformDependent0 would no be loaded?

@normanmaurer

This comment has been minimized.

Show comment
Hide comment
@normanmaurer
Member

normanmaurer commented Jan 19, 2017

@Scottmitch one nit...

@jesperpedersen

This comment has been minimized.

Show comment
Hide comment
@jesperpedersen

jesperpedersen Jan 19, 2017

This works, with the following log message:

08:57:10,909 WARNING [io.netty.channel.DefaultChannelId] (management-handler-thread - 3) Failed to find the current process ID from ''; using a random value: 970346034

jesperpedersen commented Jan 19, 2017

This works, with the following log message:

08:57:10,909 WARNING [io.netty.channel.DefaultChannelId] (management-handler-thread - 3) Failed to find the current process ID from ''; using a random value: 970346034
@Scottmitch

This comment has been minimized.

Show comment
Hide comment
@Scottmitch

Scottmitch Jan 19, 2017

Member

@jesperpedersen - Thanks for verifying. That warning makes sense ... as I said I'm still not sure why the class loading would fail in your environment.

Member

Scottmitch commented Jan 19, 2017

@jesperpedersen - Thanks for verifying. That warning makes sense ... as I said I'm still not sure why the class loading would fail in your environment.

PlatformDependent#getClassLoader fails in restrictive classloader env…
…ironment

Motivation:
#6042 only addressed PlatformDependent#getSystemClassLoader but getClassLoader is also called in an optional manner in some common code paths but fails to catch a general enough exception to continue working.

Modifications:
- Calls to getClassLoader which can continue if results fail should catch Throwable

Result:
More resilient code in the presense of restrictive class loaders.
Fixes #6246.
@Scottmitch

This comment has been minimized.

Show comment
Hide comment
@Scottmitch

Scottmitch Jan 19, 2017

Member

4.1 (9a4aa61) 4.0 (7528f11)

Member

Scottmitch commented Jan 19, 2017

4.1 (9a4aa61) 4.0 (7528f11)

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