Bug 53607 - No message set for PING: TcpPingInterceptor fail with NullPointerException in ChannelData.getDataPackageLength()
Summary: No message set for PING: TcpPingInterceptor fail with NullPointerException in...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Cluster (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
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.