geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kirk Lund (JIRA)" <>
Subject [jira] [Updated] (GEODE-2013) StatArchiveReader may throw NullPointerException due to missing ResourceType
Date Wed, 02 Nov 2016 21:06:58 GMT


Kirk Lund updated GEODE-2013:
    Summary: StatArchiveReader may throw NullPointerException due to missing ResourceType
 (was: StatArchiveReader may throw NullPointerException while loading StatArchiveFile)

> StatArchiveReader may throw NullPointerException due to missing ResourceType
> ----------------------------------------------------------------------------
>                 Key: GEODE-2013
>                 URL:
>             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:
> {noformat}
> ERROR: Operation "stats" failed because: java.lang.NullPointerException.
> java.lang.NullPointerException
> 	at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.loadInstance(
> 	at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.readResourceInstanceCreateToken(
> 	at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.readToken(
> 	at org.apache.geode.internal.statistics.StatArchiveReader$StatArchiveFile.update(
> 	at org.apache.geode.internal.statistics.StatArchiveReader.update(
> 	at org.apache.geode.internal.statistics.StatArchiveReader.<init>(
> 	at org.apache.geode.internal.SystemAdmin.statistics(
> 	at org.apache.geode.internal.SystemAdmin.invoke(
> 	at org.apache.geode.internal.SystemAdmin.main(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> 	at com.intellij.rt.execution.application.AppMain.main(
> {noformat}
> 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

View raw message