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

Error java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled when using the RakUtils class #40

Open
AzaleeX opened this issue Apr 10, 2024 · 0 comments

Comments

@AzaleeX
Copy link

AzaleeX commented Apr 10, 2024

Error java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled when using the RakUtils class

While running my application that utilizes the CloudburstMC and Netty libraries, I encountered the following error:

java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled
    at org.cloudburstmc.netty.util.RakUtils.<clinit>(RakUtils.java:28)
    ...

The error seems to be due to an attempt to access the private constructor of the DefaultChannelPipeline class from Netty using reflection. This occurs in the RakUtils class of the CloudburstMC library.

Steps to Reproduce:

  1. Integrate the CloudburstMC library into a project.
  2. Try to execute a feature that uses the RakUtils class.

Relevant Code:
Snippet from the RakUtils class:

static {
    try {
        Constructor<DefaultChannelPipeline> constructor = DefaultChannelPipeline.class.getDeclaredConstructor(Channel.class);
        constructor.setAccessible(true);
        DEFAULT_CHANNEL_PIPELINE_CONSTRUCTOR = constructor;
    } catch (NoSuchMethodException e) {
        throw new AssertionError("Unable to find DefaultChannelPipeline(Channel) constructor", e);
    }
}

Environment:
Operating System: Windows, Linux, Debian
Java Version: 17
CloudburstMC Library Version: latest
Netty Version: latest

I am willing to provide additional information or conduct tests to resolve this issue.

Thank you !

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

1 participant