getappmap / getappmap/appmap-java
NullPointerException occurred while recording AppMap in application that uses Jdbi library to fetch data from database
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 88
- Forks
- 17
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 1
Description
In Spring Boot application that uses Jdbi library to fetch data from database the NullPointerException exception occurred while recording AppMap.
java.lang.NullPointerException: null
at com.appland.appmap.process.hooks.SqlQuery.isMock(SqlQuery.java:35)
at com.appland.appmap.process.hooks.SqlQuery.getDbName(SqlQuery.java:46)
at com.appland.appmap.process.hooks.SqlQuery.recordSql(SqlQuery.java:78)
at com.appland.appmap.process.hooks.SqlQuery.prepareStatement(SqlQuery.java:124)
at com.sun.proxy.$Proxy151.prepareStatement(Unknown Source)
at org.jdbi.v3.core.statement.DefaultStatementBuilder.create(DefaultStatementBuilder.java:57)
at org.jdbi.v3.core.statement.SqlStatement.createStatement(SqlStatement.java:1803)
at org.jdbi.v3.core.statement.SqlStatement.internalExecute(SqlStatement.java:1768)
at org.jdbi.v3.core.result.ResultProducers.lambda$getResultSet$2(ResultProducers.java:64)
at org.jdbi.v3.core.result.ResultIterable.lambda$of$0(ResultIterable.java:54)
at org.jdbi.v3.core.result.ResultIterable.findFirst(ResultIterable.java:203)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the stack trace in SqlQuery.java, especially isMock at line 35, then follow getDbName, recordSql, and prepareStatement. Reproduce the failure in a Spring Boot application using Jdbi to fetch database data, and verify that AppMap recording completes without the NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100