Thread: Netty warning issue

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Netty warning issue 
    Super Donator

    Join Date
    May 2016
    Posts
    71
    Thanks given
    2
    Thanks received
    1
    Rep Power
    32
    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
    Reply With Quote  
     

  2. #2  
    Development Services

    Tutus Frutus's Avatar
    Join Date
    Feb 2018
    Posts
    466
    Thanks given
    228
    Thanks received
    217
    Rep Power
    687
    Quote Originally Posted by newby View Post
    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?

    Attached image
    Attached image
    Reply With Quote  
     

  3. #3  
    Super Donator

    Join Date
    May 2016
    Posts
    71
    Thanks given
    2
    Thanks received
    1
    Rep Power
    32
    Quote Originally Posted by Tutus Frutus View Post
    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
    Reply With Quote  
     

  4. #4  
    Development Services

    Tutus Frutus's Avatar
    Join Date
    Feb 2018
    Posts
    466
    Thanks given
    228
    Thanks received
    217
    Rep Power
    687
    Quote Originally Posted by newby View Post
    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: https://github.com/netty/netty/issues/7254

    Quote Originally Posted by Tutus Frutus View Post
    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: https://github.com/netty/netty/issues/7254
    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.

    Attached image
    Attached image
    Reply With Quote  
     

  5. #5  
    Super Donator

    Join Date
    May 2016
    Posts
    71
    Thanks given
    2
    Thanks received
    1
    Rep Power
    32
    For some reason the server will auto update after a certain amount of time I thought it was because of this warning tho
    Reply With Quote  
     

  6. #6  
    Development Services

    Tutus Frutus's Avatar
    Join Date
    Feb 2018
    Posts
    466
    Thanks given
    228
    Thanks received
    217
    Rep Power
    687
    Quote Originally Posted by newby View Post
    For some reason the server will auto update after a certain amount of time I thought it was because of this warning tho
    Nah, I doubt it lol.

    Attached image
    Attached image
    Reply With Quote  
     

  7. #7  
    Super Donator

    Join Date
    May 2016
    Posts
    71
    Thanks given
    2
    Thanks received
    1
    Rep Power
    32
    Quote Originally Posted by Tutus Frutus View Post
    Nah, I doubt it lol.
    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
    Reply With Quote  
     

  8. #8  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Quote Originally Posted by newby View Post
    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
    Reply With Quote  
     

  9. #9  
    Registered Member
    hc747's Avatar
    Join Date
    Dec 2013
    Age
    26
    Posts
    1,474
    Thanks given
    3,312
    Thanks received
    691
    Rep Power
    1098
    Quote Originally Posted by newby View Post
    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 JDK/JRE 8 and you'll stop receiving it. The automatic restarting / updating is unrelated to this.
    Reply With Quote  
     

  10. #10  
    Development Services

    Tutus Frutus's Avatar
    Join Date
    Feb 2018
    Posts
    466
    Thanks given
    228
    Thanks received
    217
    Rep Power
    687
    Quote Originally Posted by newby View Post
    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.

    Attached image
    Attached image
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. netty 5 issue
    By Dr. Client in forum Help
    Replies: 0
    Last Post: 12-09-2015, 07:13 PM
  2. Rs Rebuild Netty issue
    By Nicholas in forum Help
    Replies: 0
    Last Post: 09-29-2013, 12:22 AM
  3. Netty Issue?
    By relex lawl in forum Help
    Replies: 6
    Last Post: 11-28-2012, 04:04 AM
  4. Netty Issue
    By Daniel in forum Application Development
    Replies: 3
    Last Post: 05-28-2012, 12:52 AM
  5. Replies: 52
    Last Post: 10-13-2011, 11:34 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •