Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
1.5.8
I am making the same call to a store procedure multiple times with very little change in the arguments. The first call succeeds but the second call creates a null pointer exception.
The problem is caused at line 487 of MariaDbConnection class. That is when the callableStatementCache is adding a new callableStatement. That callableStatement has a the sql field populated but the value for the items that is added to the callableStatementCache has null sql field. When that value is fetched on line 479 the clone fails with a NullPointerException because the sql field cannot be null.
Below is the stack trace.
java.lang.NullPointerException
at org.mariadb.jdbc.MariaDbServerPreparedStatement.prepare(MariaDbServerPreparedStatement.java:143) at org.mariadb.jdbc.MariaDbServerPreparedStatement.clone(MariaDbServerPreparedStatement.java:134) at org.mariadb.jdbc.AbstractCallableProcedureStatement.clone(AbstractCallableProcedureStatement.java:99) at org.mariadb.jdbc.MariaDbProcedureStatement.clone(MariaDbProcedureStatement.java:119) at org.mariadb.jdbc.MariaDbProcedureStatement.clone(MariaDbProcedureStatement.java:62) at org.mariadb.jdbc.MariaDbConnection.prepareCall(MariaDbConnection.java:479) at com.zaxxer.hikari.pool.ProxyConnection.prepareCall(ProxyConnection.java:289) at com.zaxxer.hikari.pool.HikariProxyConnection.prepareCall(HikariProxyConnection.java)
{"report":{"fcp":1350.1999998092651,"ttfb":321.2999999523163,"pageVisibility":"visible","entityId":60514,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ddddd78f-81c5-4f53-89ba-6e3241255526","navigationType":0,"readyForUser":1402.3999998569489,"redirectCount":0,"resourceLoadedEnd":987.5,"resourceLoadedStart":329.39999985694885,"resourceTiming":[{"duration":396.7000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":329.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":329.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":726.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":397.60000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":329.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":329.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":727.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":574.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":329.7999999523163,"connectEnd":329.7999999523163,"connectStart":329.7999999523163,"domainLookupEnd":329.7999999523163,"domainLookupStart":329.7999999523163,"fetchStart":329.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":730.8999998569489,"responseEnd":904.2999999523163,"responseStart":756.1999998092651,"secureConnectionStart":329.7999999523163},{"duration":651,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":329.89999985694885,"connectEnd":329.89999985694885,"connectStart":329.89999985694885,"domainLookupEnd":329.89999985694885,"domainLookupStart":329.89999985694885,"fetchStart":329.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":732.1999998092651,"responseEnd":980.8999998569489,"responseStart":757.1999998092651,"secureConnectionStart":329.89999985694885},{"duration":430.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":330,"connectEnd":330,"connectStart":330,"domainLookupEnd":330,"domainLookupStart":330,"fetchStart":330,"redirectEnd":0,"redirectStart":0,"requestStart":732.2999999523163,"responseEnd":760.8999998569489,"responseStart":759.1999998092651,"secureConnectionStart":330},{"duration":433.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":330,"connectEnd":330,"connectStart":330,"domainLookupEnd":330,"domainLookupStart":330,"fetchStart":330,"redirectEnd":0,"redirectStart":0,"requestStart":732.5,"responseEnd":763.0999999046326,"responseStart":760.1999998092651,"secureConnectionStart":330},{"duration":433.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":330.19999980926514,"connectEnd":330.19999980926514,"connectStart":330.19999980926514,"domainLookupEnd":330.19999980926514,"domainLookupStart":330.19999980926514,"fetchStart":330.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":732.6999998092651,"responseEnd":763.5,"responseStart":761.6999998092651,"secureConnectionStart":330.19999980926514},{"duration":401.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":330.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":330.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":732.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":437.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":330.39999985694885,"connectEnd":330.39999985694885,"connectStart":330.39999985694885,"domainLookupEnd":330.39999985694885,"domainLookupStart":330.39999985694885,"fetchStart":330.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":737.5999999046326,"responseEnd":767.6999998092651,"responseStart":765,"secureConnectionStart":330.39999985694885},{"duration":402.39999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":330.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":330.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":732.8999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":436.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":330.59999990463257,"connectEnd":330.59999990463257,"connectStart":330.59999990463257,"domainLookupEnd":330.59999990463257,"domainLookupStart":330.59999990463257,"fetchStart":330.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":737.7999999523163,"responseEnd":766.6999998092651,"responseStart":763.8999998569489,"secureConnectionStart":330.59999990463257},{"duration":643,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":331.2999999523163,"connectEnd":331.2999999523163,"connectStart":331.2999999523163,"domainLookupEnd":331.2999999523163,"domainLookupStart":331.2999999523163,"fetchStart":331.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":873.1999998092651,"responseEnd":974.2999999523163,"responseStart":972.6999998092651,"secureConnectionStart":331.2999999523163},{"duration":656,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":331.5,"connectEnd":331.5,"connectStart":331.5,"domainLookupEnd":331.5,"domainLookupStart":331.5,"fetchStart":331.5,"redirectEnd":0,"redirectStart":0,"requestStart":969.6999998092651,"responseEnd":987.5,"responseStart":985.3999998569489,"secureConnectionStart":331.5},{"duration":230,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1099.2999999523163,"connectEnd":1099.2999999523163,"connectStart":1099.2999999523163,"domainLookupEnd":1099.2999999523163,"domainLookupStart":1099.2999999523163,"fetchStart":1099.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1293.5,"responseEnd":1329.2999999523163,"responseStart":1326.5999999046326,"secureConnectionStart":1099.2999999523163}],"fetchStart":0,"domainLookupStart":138,"domainLookupEnd":147,"connectStart":147,"connectEnd":167,"secureConnectionStart":156,"requestStart":167,"responseStart":321,"responseEnd":326,"domLoading":325,"domInteractive":1457,"domContentLoadedEventStart":1457,"domContentLoadedEventEnd":1496,"domComplete":2549,"loadEventStart":2549,"loadEventEnd":2550,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1437.3999998569489},{"name":"bigPipe.sidebar-id.end","time":1438},{"name":"bigPipe.activity-panel-pipe-id.start","time":1438.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1440.8999998569489},{"name":"activityTabFullyLoaded","time":1503.5}],"measures":[],"correlationId":"e4d5fbda1ff67d","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":80,"dbReadsTimeInMs":8,"dbConnsTimeInMs":15,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}