Cannot set null value in AO on MSSQL

Description

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:

Environment

None

Testing Notes

Add notes...

Activity

Show:
Alex Courtis
November 19, 2015, 8:56 AM

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.

Alex Courtis
November 19, 2015, 9:23 AM

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?

Scott Goodhew
November 19, 2015, 11:57 PM

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.

Renat Sabitov
November 20, 2015, 1:03 AM

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.

Fixed

Assignee

Alex Courtis

Reporter

Scott Goodhew

Labels

Add-on Type

None

Team

None

CC

None

Risk factor

None

QA Kickoff Status

None

QA Demo Status

None

Story Points

1

Sprint

None

Fix versions

Affects versions

Priority

Critical