getappmap / appmap-java

AppMap client agent for Java
Other
82 stars 16 forks source link

NullPointerException occurred while recording AppMap in application that uses Jdbi library to fetch data from database #181

Open romach opened 1 year ago

romach commented 1 year ago

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)
kgilpin commented 1 year ago

@apotterri this may be an appmap-java issue?

apotterri commented 1 year ago

Yup, looks like it. I'll move it there.