[ 
https://issues.apache.org/jira/browse/THRIFT-2597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell updated THRIFT-2597:
---------------------------------
    Component/s: Java - Library

> Thrift 0.9.1 - NullPointerException when I  stop server in addShutdownHook
> --------------------------------------------------------------------------
>
>                 Key: THRIFT-2597
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2597
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Library
>    Affects Versions: 0.9.1
>            Reporter: vongosling
>
> when I press Ctrl+C in commandline to stop server,I found this exception
> java.lang.NullPointerException
>       at 
> org.apache.thrift.server.TThreadedSelectorServer.gracefullyShutdownInvokerPool(TThreadedSelectorServer.java:280)
>       at 
> org.apache.thrift.server.TThreadedSelectorServer.waitForShutdown(TThreadedSelectorServer.java:246)
>       at 
> org.apache.thrift.server.AbstractNonblockingServer.serve(AbstractNonblockingServer.java:95)
>       at 
> com.alibaba.apush.server.BackendThriftServer$1.run(BackendThriftServer.java:54)
>       at java.lang.Thread.run(Thread.java:724)
> my code like this:
>  Runtime.getRuntime().addShutdownHook(new Thread() {
>             @Override
>             public void run() {
>                 backendThriftServer.stop();
>             }
>         });



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to