1
votes

I used the library Netty 3.8.5 and it worked fine. But when I changed the library in version 4.0.0, the applet has stopped working. Error log:

network: Cache entry not found [url: file:/D:/java/Сlient/dist/lib/netty-common-4.0.0.Alpha5.jar, version: null]
network: Cache entry not found [url: file:/D:/java/Сlient/dist/lib/netty-common-4.0.0.Alpha5.jar, version: null]
security: Validate the certificate chain using CertPath API
security: The certificate hasnt been expired, no need to check timestamping info
security: Found jurisdiction list file
security: No need to checking trusted extension for this certificate
security: The CRL support is disabled
security: The OCSP support is disabled
security: This OCSP End Entity validation is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
network: Cache entry not found [url: file:/D:/java/Сlient/dist/lib/netty-common-4.0.0.Alpha5.jar, version: null]
basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
network: Cache entry not found [url: file:/D:/java/Сlient/dist/lib/netty-buffer-4.0.0.Alpha5.jar, version: null]
security: Validate the certificate chain using CertPath API
security: The certificate hasnt been expired, no need to check timestamping info
security: Found jurisdiction list file
security: No need to checking trusted extension for this certificate
security: The CRL support is disabled
security: The OCSP support is disabled
security: This OCSP End Entity validation is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
network: Cache entry not found [url: file:/D:/java/Сlient/dist/lib/netty-buffer-4.0.0.Alpha5.jar, version: null]
basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
java.lang.ExceptionInInitializerError
    at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:457)
    at io.netty.channel.DefaultChannelPipeline$HeadHandler.bind(DefaultChannelPipeline.java:1538)
    at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1126)
    at io.netty.channel.DefaultChannelPipeline$10.run(DefaultChannelPipeline.java:1134)
    at io.netty.channel.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:186)
    at io.netty.channel.socket.nio.NioEventLoop.run(NioEventLoop.java:210)
    at io.netty.channel.SingleThreadEventExecutor$1.run(SingleThreadEventExecutor.java:80)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at io.netty.util.internal.DetectionUtil.<clinit>(DetectionUtil.java:43)
    ... 8 more
Ignored exception: java.lang.ExceptionInInitializerError
окт 21, 2012 8:09:56 PM io.netty.channel.DefaultChannelPipeline
WARNING: An exceptionCaught() event was fired, and it reached at the end of the pipeline.  It usually means the last inbound handler in the pipeline did not handle the exception.
java.lang.ExceptionInInitializerError
    at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:457)
    at io.netty.channel.DefaultChannelPipeline$HeadHandler.bind(DefaultChannelPipeline.java:1538)
    at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:1126)
    at io.netty.channel.DefaultChannelPipeline$10.run(DefaultChannelPipeline.java:1134)
    at io.netty.channel.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:186)
    at io.netty.channel.socket.nio.NioEventLoop.run(NioEventLoop.java:210)
    at io.netty.channel.SingleThreadEventExecutor$1.run(SingleThreadEventExecutor.java:80)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at io.netty.util.internal.DetectionUtil.<clinit>(DetectionUtil.java:43)
    ... 8 more

basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@147c327
security: Reset deny session certificate store

I use the example of DiscardServer https://github.com/netty/netty/tree/master/example/src/main/java/io/netty/example/discard without any changes.

This line causes the error:

ChannelFuture f = b.bind().sync();

All files are signed. When I run DiscardServer separately (not in an applet), everything works fine

My code:

public class Applet extends JApplet
{
        @Override
    public void init()
    {   
            try {
                new DiscardServer(1020).run();
            } catch (Exception ex) {
                Logger.getLogger(Applet.class.getName()).log(Level.SEVERE, null, ex);
            }
    }
}

DiscardServer: https://github.com/netty/netty/tree/master/example/src/main/java/io/netty/example/discard

1

1 Answers

0
votes

I think it was a bug that I just fixed... Could you try to use the snapshot[1] and let me know if it works. Here is the issue[2].

[1] https://oss.sonatype.org/content/repositories/snapshots/io/netty/netty/4.0.0.Alpha6-SNAPSHOT/

[2] https://github.com/netty/netty/issues/669