Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C62DF200BB3 for ; Wed, 2 Nov 2016 22:06:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C4D9A160AF0; Wed, 2 Nov 2016 21:06:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E3785160B0A for ; Wed, 2 Nov 2016 22:06:02 +0100 (CET) Received: (qmail 86043 invoked by uid 500); 2 Nov 2016 21:06:02 -0000 Mailing-List: contact issues-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list issues@geode.incubator.apache.org Received: (qmail 86034 invoked by uid 99); 2 Nov 2016 21:06:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2016 21:06:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id B8CAF1A7F62 for ; Wed, 2 Nov 2016 21:06:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id xAqymtxRNHjy for ; Wed, 2 Nov 2016 21:06:00 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 63A145F610 for ; Wed, 2 Nov 2016 21:05:59 +0000 (UTC) Received: (qmail 85227 invoked by uid 99); 2 Nov 2016 21:05:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2016 21:05:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 895EC2C1F5A for ; Wed, 2 Nov 2016 21:05:58 +0000 (UTC) Date: Wed, 2 Nov 2016 21:05:58 +0000 (UTC) From: "Kirk Lund (JIRA)" To: issues@geode.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (GEODE-2013) StatArchiveReader may throw NullPointerException while loading StatArchiveFile MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 02 Nov 2016 21:06:04 -0000 [ https://issues.apache.org/jira/browse/GEODE-2013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kirk Lund updated GEODE-2013: ----------------------------- Description: StatArchiveReader will throw a NullPointerException while loading a Resource from a stat archive file that is missing the corresponding ResourceType. GEODE-2012 can result in a stat archive file that is missing a ResourceType. Example of stack trace: ERROR: Operation "stats" failed because: java.lang.NullPointerException. java.lang.NullPointerException at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.loadInstance(StatArchiveReader.java:3049) at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.readResourceInstanceCreateToken(StatArchiveReader.java:3159) at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.readToken(StatArchiveReader.java:3308) at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.update(StatArchiveReader.java:2884) at org.apache.geode.internal.statistics.StatArchiveReader.update(StatArchiveReader.java:145) at org.apache.geode.internal.statistics.StatArchiveReader.(StatArchiveReader.java:77) at org.apache.geode.internal.SystemAdmin.statistics(SystemAdmin.java:1136) at org.apache.geode.internal.SystemAdmin.invoke(SystemAdmin.java:2063) at org.apache.geode.internal.SystemAdmin.main(SystemAdmin.java:1977) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) The NullPointerException is not helpful. The StatArchiveReader should be changed to provide an IllegalStateException with a message that provides helpful information about what's wrong/missing. Message should be "ResourceType is missing for resourceTypeId n" where "n" is the id for the missing ResourceType. was: ERROR: Operation "stats" failed because: java.lang.NullPointerException. java.lang.NullPointerException at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.loadInstance(StatArchiveReader.java:3049) at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.readResourceInstanceCreateToken(StatArchiveReader.java:3159) at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.readToken(StatArchiveReader.java:3308) at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.update(StatArchiveReader.java:2884) at org.apache.geode.internal.statistics.StatArchiveReader.update(StatArchiveReader.java:145) at org.apache.geode.internal.statistics.StatArchiveReader.(StatArchiveReader.java:77) at org.apache.geode.internal.SystemAdmin.statistics(SystemAdmin.java:1136) at org.apache.geode.internal.SystemAdmin.invoke(SystemAdmin.java:2063) at org.apache.geode.internal.SystemAdmin.main(SystemAdmin.java:1977) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) > StatArchiveReader may throw NullPointerException while loading StatArchiveFile > ------------------------------------------------------------------------------ > > Key: GEODE-2013 > URL: https://issues.apache.org/jira/browse/GEODE-2013 > Project: Geode > Issue Type: Bug > Components: statistics > Affects Versions: 1.0.0-incubating > Reporter: Kirk Lund > Assignee: Kirk Lund > > StatArchiveReader will throw a NullPointerException while loading a Resource from a stat archive file that is missing the corresponding ResourceType. GEODE-2012 can result in a stat archive file that is missing a ResourceType. > Example of stack trace: > ERROR: Operation "stats" failed because: java.lang.NullPointerException. > java.lang.NullPointerException > at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.loadInstance(StatArchiveReader.java:3049) > at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.readResourceInstanceCreateToken(StatArchiveReader.java:3159) > at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.readToken(StatArchiveReader.java:3308) > at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.update(StatArchiveReader.java:2884) > at org.apache.geode.internal.statistics.StatArchiveReader.update(StatArchiveReader.java:145) > at org.apache.geode.internal.statistics.StatArchiveReader.(StatArchiveReader.java:77) > at org.apache.geode.internal.SystemAdmin.statistics(SystemAdmin.java:1136) > at org.apache.geode.internal.SystemAdmin.invoke(SystemAdmin.java:2063) > at org.apache.geode.internal.SystemAdmin.main(SystemAdmin.java:1977) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) > The NullPointerException is not helpful. The StatArchiveReader should be changed to provide an IllegalStateException with a message that provides helpful information about what's wrong/missing. Message should be "ResourceType is missing for resourceTypeId n" where "n" is the id for the missing ResourceType. -- This message was sent by Atlassian JIRA (v6.3.4#6332)