Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C71E310F71 for ; Sat, 19 Oct 2013 15:24:50 +0000 (UTC) Received: (qmail 47551 invoked by uid 500); 19 Oct 2013 15:24:43 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 47480 invoked by uid 500); 19 Oct 2013 15:24:37 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 47468 invoked by uid 99); 19 Oct 2013 15:24:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Oct 2013 15:24:35 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bob.deremer@thingworx.com designates 207.46.163.236 as permitted sender) Received: from [207.46.163.236] (HELO na01-by2-obe.outbound.protection.outlook.com) (207.46.163.236) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Oct 2013 15:24:28 +0000 Received: from BLUPR06MB193.namprd06.prod.outlook.com (10.242.191.143) by BLUPR06MB193.namprd06.prod.outlook.com (10.242.191.143) with Microsoft SMTP Server (TLS) id 15.0.785.10; Sat, 19 Oct 2013 15:24:05 +0000 Received: from BLUPR06MB193.namprd06.prod.outlook.com ([169.254.13.240]) by BLUPR06MB193.namprd06.prod.outlook.com ([169.254.13.179]) with mapi id 15.00.0785.001; Sat, 19 Oct 2013 15:24:05 +0000 From: Bob DeRemer To: Tomcat Users List Subject: RE: possible tomcat 7.0.47 jsr-356 bug: NULL pointer being thrown when DecodeException is caught in PojoMessageHandlerWholeBase.onMessage Thread-Topic: possible tomcat 7.0.47 jsr-356 bug: NULL pointer being thrown when DecodeException is caught in PojoMessageHandlerWholeBase.onMessage Thread-Index: Ac7Mx8+wkBpqsf3cQM2V6KDEDuha/QAF06DQ Date: Sat, 19 Oct 2013 15:24:04 +0000 Message-ID: References: <822d03c2c7ab4e5abad012d850f2f6af@BLUPR06MB193.namprd06.prod.outlook.com> In-Reply-To: <822d03c2c7ab4e5abad012d850f2f6af@BLUPR06MB193.namprd06.prod.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [98.237.127.73] x-forefront-prvs: 00046D390F x-forefront-antispam-report: SFV:NSPM;SFS:(164054003)(377454003)(57704003)(199002)(189002)(5423002)(50944004)(74662001)(74502001)(47446002)(81816001)(31966008)(83072001)(56816003)(66066001)(80022001)(65816001)(4396001)(47976001)(56776001)(81686001)(54316002)(49866001)(50986001)(16236675002)(47736001)(77982001)(79102001)(63696002)(59766001)(76482001)(74316001)(85306002)(74876001)(74706001)(18206015023)(15975445006)(15202345003)(77096001)(16601075003)(80976001)(83322001)(19580405001)(19580395003)(51856001)(76796001)(81342001)(53806001)(74366001)(33646001)(46102001)(76786001)(19300405004)(81542001)(69226001)(54356001)(17760045001)(76576001)(213903007)(24736002);DIR:OUT;SFP:;SCL:1;SRVR:BLUPR06MB193;H:BLUPR06MB193.namprd06.prod.outlook.com;CLIP:98.237.127.73;FPR:;RD:InfoNoRecords;A:1;MX:1;LANG:en; Content-Type: multipart/alternative; boundary="_000_f00a755cb2d742eb8a411c0fa103f79bBLUPR06MB193namprd06pro_" MIME-Version: 1.0 X-OriginatorOrg: thingworx.com X-Virus-Checked: Checked by ClamAV on apache.org --_000_f00a755cb2d742eb8a411c0fa103f79bBLUPR06MB193namprd06pro_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have re-posted to DEV so please disregard From: Bob DeRemer [mailto:bob.deremer@thingworx.com] Sent: Saturday, October 19, 2013 8:46 AM To: Tomcat Users List Subject: possible tomcat 7.0.47 jsr-356 bug: NULL pointer being thrown when= DecodeException is caught in PojoMessageHandlerWholeBase.onMessage I am testing what happens when Encode/Decode Exceptions occur during JSR-35= 6 communication and found that in the following code in onMessage, the ((Ws= Session)session) is NULL. As a result, the actual DecodeException (cause) = is lost. // Can this message be decoded? Object payload; try { payload =3D decode(message); } catch (DecodeException de) { ((WsSession) session).getLocal().onError(session, de); return; } Tracing this further up the stack, I found that Util.getMessageHandlers is = initializing it and passing NULL in for the session: if (decoderMatch.getTextDecoders().size() > 0) { MessageHandlerResult result =3D new MessageHandlerResult( new PojoMessageHandlerWholeText(listener, m, null, endpointConfig, decoderMatch.getTextDecoders(), new Object[= 1], 0, false, -1, -1), MessageHandlerResultType.TEXT); results.add(result); } Is this a bug, or do I need to do something else to get this internal sessi= on initialize - in addition to calling: addMessageHandler(this) in the onOp= en of my Endpoint-derived class? Thanks, Bob DeRemer Senior Director, Architecture and Development [Description: Description: Description: Description: cid:image001.png@01CBE= 3DE.51A12030] http://www.thingworx.com Skype: bob.deremer.thingworx O: 610.594.6200 x812 M: 717.881.3986 --_000_f00a755cb2d742eb8a411c0fa103f79bBLUPR06MB193namprd06pro_--