[CONJ-453] NullPointerException when useBatchMultiSend is false or using Aurora Created: 2017-04-07  Updated: 2017-06-19  Resolved: 2017-06-19

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: 1.5.9
Fix Version/s: 2.0.0-RC, 1.6.0

Type: Bug Priority: Major
Reporter: Matthew Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None


 Description   

A NullPointerException occurs in AbstractMultiSend when useBatchMultiSend is false. This happens on line 241 of AstractMultiSend.java On "AbstractQueryProtocol.readScheduler.execute(futureReadTask);"

The reason is that readScheduler is not set in AbstractQueryProtocol constructor:

if (options.useBatchMultiSend && readScheduler == null) {
synchronized (AbstractQueryProtocol.class) {
if (readScheduler == null)

{ readScheduler = SchedulerServiceProviderHolder.getBulkScheduler(); }

}
}

It looks as if there is no code to do synchronous batch in "executeBatchStandard". We have implemented a synchronous version, and are willing to contribute.



 Comments   
Comment by Thiyagarajan [ 2017-06-18 ]

Is the above issue is resolved? we used aurora to execute the batch statements and getting the below exception.
Caused by: java.lang.NullPointerException: null
at org.mariadb.jdbc.internal.protocol.AbstractMultiSend.executeBatchStandard(AbstractMultiSend.java:241) ~[mariadb-java-client-1.5.9.jar:na]

when will we expect the fix.

Thanks

Comment by Diego Dupin [ 2017-06-19 ]

Hi tmurugan1990 This, has been corrected in version 1.6.0
Last version is 1.6.1 for java 7, 2.0.2 using java 8.

Sorry that this task state hasn't been changed accordingly !

Generated at Thu Feb 08 03:15:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.