Thread: Netty warning issue

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Netty warning issue 
    Registered Member
    Join Date
    May 2016
    Posts
    63
    Thanks given
    0
    Thanks received
    0
    Discord
    View profile
    Rep Power
    11
    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  
    Nalore - Coming soon...

    Tutus Frutus's Avatar
    Join Date
    Feb 2018
    Posts
    422
    Thanks given
    166
    Thanks received
    204
    Discord
    View profile
    Rep Power
    662
    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?

    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2016
    Posts
    63
    Thanks given
    0
    Thanks received
    0
    Discord
    View profile
    Rep Power
    11
    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  
    Nalore - Coming soon...

    Tutus Frutus's Avatar
    Join Date
    Feb 2018
    Posts
    422
    Thanks given
    166
    Thanks received
    204
    Discord
    View profile
    Rep Power
    662
    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: [Only registered and activated users can see links. ]

    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: [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. ]
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    May 2016
    Posts
    63
    Thanks given
    0
    Thanks received
    0
    Discord
    View profile
    Rep Power
    11
    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  
    Nalore - Coming soon...

    Tutus Frutus's Avatar
    Join Date
    Feb 2018
    Posts
    422
    Thanks given
    166
    Thanks received
    204
    Discord
    View profile
    Rep Power
    662
    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.

    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    May 2016
    Posts
    63
    Thanks given
    0
    Thanks received
    0
    Discord
    View profile
    Rep Power
    11
    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,556
    Thanks given
    652
    Thanks received
    640
    Rep Power
    358
    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
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  9. #9  
    Registered Member
    hc747's Avatar
    Join Date
    Dec 2013
    Age
    23
    Posts
    1,448
    Thanks given
    3,135
    Thanks received
    672
    Discord
    View profile
    Rep Power
    1029
    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 [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. ]
    Reply With Quote  
     

  10. #10  
    Nalore - Coming soon...

    Tutus Frutus's Avatar
    Join Date
    Feb 2018
    Posts
    422
    Thanks given
    166
    Thanks received
    204
    Discord
    View profile
    Rep Power
    662
    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.

    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    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
  •