I have a issue with netty 3.1 it gives me a warning and I tried to upgrade it to a newer 3.1 but didn’t work if anyone can help me upgrade it to netty 4.1 I would really appreciate it my discord’s neeewby#8938
I have a issue with netty 3.1 it gives me a warning and I tried to upgrade it to a newer 3.1 but didn’t work if anyone can help me upgrade it to netty 4.1 I would really appreciate it my discord’s neeewby#8938
You might want to show what warning it gives you, and why is a warning an issue? Should work fine untill you read the new documentation?
[Only registered and activated users can see links. ] [Only registered and activated users can see links. ]
You might want to show what warning it gives you, and why is a warning an issue? Should work fine untill you read the new documentation?
WARNING: An illegal
reflective access operation has occurred
WARNING: Illegal reflective access by org.jboss.netty.util.internal.ByteBufferUtil (file:/C:/Users/Administrator/Desktop/eclipse-workspace/DawnX%20Server/lib/netty-3.4.6.Final.jar) to method java.nio.DirectByteBuffer.cleaner()
WARNING: Please consider reporting this to the maintainers of org.jboss.netty.util.internal.ByteBufferUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: An illegal
reflective access operation has occurred
WARNING: Illegal reflective access by org.jboss.netty.util.internal.ByteBufferUtil (file:/C:/Users/Administrator/Desktop/eclipse-workspace/DawnX%20Server/lib/netty-3.4.6.Final.jar) to method java.nio.DirectByteBuffer.cleaner()
WARNING: Please consider reporting this to the maintainers of org.jboss.netty.util.internal.ByteBufferUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Netty should still work despite the warnings, you might want to use Java 8 (JDK 1.8).. that should get rid of it in general...
I think it shows this message in Java 9 and above.
IF, it genuinely doesn't work, I found this hotfix on github:
Code:
private static void disableWarning() {
try {
Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
theUnsafe.setAccessible(true);
Unsafe u = (Unsafe) theUnsafe.get(null);
Class cls = Class.forName("jdk.internal.module.IllegalAccessLogger");
Field logger = cls.getDeclaredField("logger");
u.putObjectVolatile(cls, u.staticFieldOffset(logger), null);
} catch (Exception e) {
// ignore
}
}
Source: [Only registered and activated users can see links. ]
Originally Posted by Tutus Frutus
Netty should still work despite the warnings, you might want to use Java 8 (JDK 1.8).. that should get rid of it in general...
I think it shows this message in Java 9 and above.
IF, it genuinely doesn't work, I found this hotfix on github:
Code:
private static void disableWarning() {
try {
Field theUnsafe = Unsafe.class.getDeclaredField("theUnsafe");
theUnsafe.setAccessible(true);
Unsafe u = (Unsafe) theUnsafe.get(null);
Class cls = Class.forName("jdk.internal.module.IllegalAccessLogger");
Field logger = cls.getDeclaredField("logger");
u.putObjectVolatile(cls, u.staticFieldOffset(logger), null);
} catch (Exception e) {
// ignore
}
}
Source: [Only registered and activated users can see links. ]
Do note: You should probably rewrite the code to not use Reflectives anymore... the code is just to log/catch the warning.. apparently it still works, but it's an ugly hotfix.
The site also states someone did not have the issue with this version: 4.1.43.Final.
[Only registered and activated users can see links. ] [Only registered and activated users can see links. ]
after a certain amount of time the server auto updates for some reason like say 3 hours it will update with out warning and im not to sure why i thought netty would be the issue because when it closes that shows up
after a certain amount of time the server auto updates for some reason like say 3 hours it will update with out warning and im not to sure why i thought netty would be the issue because when it closes that shows up
This warning most likely has nothing to do with it. You have any output in the console when the server "updates"? And what exactly do you mean with "update"? Does it just crash? Or does it restart entirely on it's own?
Project thread
[Only registered and activated users can see links. ]
after a certain amount of time the server auto updates for some reason like say 3 hours it will update with out warning and im not to sure why i thought netty would be the issue because when it closes that shows up
The warning you're receiving is because you're using reflection in a JVM where it's access pattern has been deprecated (Java 9+). Switch to [Only registered and activated users can see links. ] and you'll stop receiving it. The automatic restarting / updating is unrelated to this.
[Only registered and activated users can see links. ] [Only registered and activated users can see links. ]
after a certain amount of time the server auto updates for some reason like say 3 hours it will update with out warning and im not to sure why i thought netty would be the issue because when it closes that shows up
As clem and hc pointed out, the warning is unrelated to crashing or w/e... it's a simple deprecated feature.
The auto-update might actually be something in your code or a weird way to handle crashes.
You should answer Clem's questions so we can help you further.
[Only registered and activated users can see links. ] [Only registered and activated users can see links. ]