Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

NullPointerException in version 0.89.1 - StagemonitorJdbcEventListener #486

Open
zacharydem opened this issue Aug 13, 2021 · 0 comments
Open

Comments

@zacharydem
Copy link

Stack-trace of the exception:

Caused by: java.lang.NullPointerException
at org.stagemonitor.jdbc.StagemonitorJdbcEventListener$MetaData.access$000(StagemonitorJdbcEventListener.java:117)
at org.stagemonitor.jdbc.StagemonitorJdbcEventListener.onAfterAnyExecute(StagemonitorJdbcEventListener.java:141)

Configuration that is causing the issue:

stagemonitor.applicationName=OurApplicationName
stagemonitor.active=false
stagemonitor.web.widget.enabled=false
stagemonitor.profiler.active=false
stagemonitor.instanceName=OurInstanceName
stagemonitor.instrument.include=com.packageone, com.packagetwo

Current workaround:

Add stagemonitor.profiler.jdbc.collectSql=false to the configuration


The StagemonitorJdbcEventListener#onAfterAnyExecute method attempts to access information from dataSourceUrlMap, but that map is only populated when stagemonitor is active and the CorePlugin has been initialized (see StagemonitorJdbcEventListener#onConnectionWrapped).

Stagemonitor being inactive should supersede the stagemonitor.profiler.jdbc.collectSql setting to ensure that StagemonitorJdbcEventListener#onAfterAnyExecute only executes when it has all the necessary data to do so. If stagemonitor is disabled, it should not be necessary to disable individual plugins.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant