I cannot set a null value when running on MSSQL 1.1.3.
This breaks at minimum the HipChat plugin in Bitbucket Server 4.0.4 and 4.1.x
It is pretty simple to reproduce using AO 1.1.3, sqljdbc-4.2.6420
Entity:
Test:
Exception:
Add notes...
Added tests for the newer version of the jdbc driver, as well as the current.
Made AO java 8 only as this driver contains java 8 bytecode.
Grrrr cannot reproduce.
Added a test specifically for this issue: https://bitbucket.org/activeobjects/ao/branch/issue-1.1/AO-699?dest=v1.1.x#Lactiveobjects-integration-test/src/test/java/net/java/ao/it/TestSetStringNull.javaT11
However it was all successful: https://ecosystem-bamboo.internal.atlassian.com/browse/AOLIB-CD310-3
we're going to need you to set us up with a reproducer... might be environmental?
The problem is a discrepancy between com.atlassian.activeobjects.internal.JdbcDriverDatabaseProviderFactory in the plugin and net.java.ao.DatabaseProvider in the core project.
When the tests run in the core project they pick the MsJdbcSQLServerDatabaseProvider but plugin doesn't know about that database provider and always picks SQLServerDatabaseProvider which doesn't have a valid implementation of putNull since was fixed.
Yes, the AO plugin decides what provider to use based on database type provided by the application.
The AO library decides based on connection string uri.
We need to have a test case in AO plugin where we feed connection string to the application and to AO library and make sure the provider is the same in both cases.
The solution is sub-optimal, however safest. See PRs: