Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occurred saving the clm attributes: java.lang.NullPointerException #1047

Closed
schmidt-galen-heb opened this issue Oct 20, 2022 · 1 comment · Fixed by #1051
Closed
Labels
bug Something isn't working as designed/intended

Comments

@schmidt-galen-heb
Copy link

Description

After upgrading to Java Agent 7.10.0 and enabling Code Level Metrics, the agent is logging messages similar to the following thousands of times every minute (millions of times/day):

2022-10-20T15:46:33,995+0000 [1 114] com.newrelic ERROR: An error occurred saving the clm attributes: java.lang.NullPointerException: Cannot invoke "com.newrelic.agent.Transaction.getTransactionCounts()" because the return value of "com.newrelic.agent.tracers.AbstractTracer.getTransaction()" is null

We've upgraded several of our applications to 7.10.0, and we're seeing the error messages from all of them.

The error appears to be coming from DefaultTracer.java

Expected Behavior

The agent should gracefully handle the case where it attempts to save clm attributes outside of a transaction.

Troubleshooting or NR Diag results

Steps to Reproduce

Unfortunately I'm not 100% sure what the exact steps to reproduce the issue are, but it appears to be caused by the agent attempting to inject Code Level Metrics outside of a transaction.

I'll update this section with more details once I can determine the exact steps to reproduce the issue.

Your Environment

All of the applications use Spring Boot 2.7.3, and Java 17:

Arch: amd64
OS: Linux
OS version: 4.14.291-218.527.amzn2.x86_64

Framework: java
Java VM: OpenJDK 64-Bit Server VM
Java VM version: 17.0.4.1+1
Java version: 17.0.4.1
Java vendor: Eclipse Adoptium

Agent Version: 7.10.0

Dispatcher: Apache Tomcat
Dispatcher Version: 9.0.65

JVM arguments: -Dnewrelic.config.file=/usr/lib/newrelic/conf/newrelic.yaml, -Dnewrelic.environment=stg, -Duser.timezone=UTC, -XX:+DisableExplicitGC, -XX:+PrintCommandLineFlags, -XX:+UseG1GC, -XX:InitialRAMPercentage=70.0, -XX:MaxMetaspaceSize=256m, -XX:MaxRAMPercentage=70.0, -XX:MinRAMPercentage=70.0, -XX:TieredStopAtLevel=1, -Xshare:off, -javaagent:/usr/lib/newrelic/newrelic.jar

Additional context

@schmidt-galen-heb schmidt-galen-heb added the bug Something isn't working as designed/intended label Oct 20, 2022
@workato-integration
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as designed/intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants