Bug 53607 - No message set for PING: TcpPingInterceptor fail with NullPointerException in ChannelData.getDataPackageLength()
No message set for PING: TcpPingInterceptor fail with NullPointerException in...
Status: RESOLVED FIXED
Product: Tomcat 6
Classification: Unclassified
Component: Cluster
unspecified
PC All
: P2 normal (vote)
: default
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-07-26 18:33 UTC by F.Arnoud
Modified: 2012-08-27 21:41 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description F.Arnoud 2012-07-26 18:33:54 UTC
I added 
        data.setMessage(new XByteBuffer(TCP_PING_DATA, false));

to TcpPingInterceptor send ping message function by:

    protected void sendPingMessage(Member[] members) {
        if ( members == null || members.length == 0 ) return;
        ChannelData data = new ChannelData(true);//generates a unique Id
        data.setAddress(getLocalMember(false));
        data.setTimestamp(System.currentTimeMillis());
        data.setOptions(getOptionFlag());
        data.setMessage(new XByteBuffer(TCP_PING_DATA, false));
        try {
            super.sendMessage(members, data, null);
        }catch (ChannelException x) {
            log.warn("Unable to send TCP ping.",x);
        }
    }


error also for Tomcat 6
regards
fred
Comment 1 Keiichi Fujino 2012-07-31 08:29:05 UTC
Thanks for the patch.
Fixed in trunk and 7.0.x and will be included in 7.0.30 onwards.
Proposed for 6.0.x.
Comment 2 Mark Thomas 2012-08-27 21:41:07 UTC
Fixed in 6.0.x and will be included in 6.0.36 onwards.