Bug 1459502

Summary: oVirt can not upgrade JDBC driver due to a postgres-jdbc driver regression issue
Product: [oVirt] ovirt-engine Reporter: Eli Mesika <emesika>
Component: Database.CoreAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: Lucie Leistnerova <lleistne>
Severity: high Docs Contact:
Priority: high    
Version: 4.2.0CC: bugs, emesika, gshereme, mgoldboi, mperina
Target Milestone: ovirt-4.3.0Flags: rule-engine: ovirt-4.3+
pstehlik: testing_ack+
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.0_alpha Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-13 07:46:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1459499, 1460723    
Bug Blocks:    

Description Eli Mesika 2017-06-07 10:11:23 UTC
Description of problem:

We want to upgrade JDBC driver to latest driver 42.1.1 
However a regression issue cause our stored procedures to throw NullPointerExceptions when the driver is trying to get the meta-data on the result set returned from the call 


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

See full details in blocking BZ

Comment 1 Martin Perina 2017-06-07 10:25:20 UTC
(In reply to Eli Mesika from comment #0)
> Description of problem:
> 
> We want to upgrade JDBC driver to latest driver 42.1.1 
> However a regression issue cause our stored procedures to throw
> NullPointerExceptions when the driver is trying to get the meta-data on the
> result set returned from the call 

Last working version of postgresql-jdbc is 9.2, everything newer breaks engine until fixed on upstream

Comment 2 Martin Perina 2017-06-07 12:59:09 UTC
Targeting to 4.2, but at the moment we just need to wait until it's fixed at least on upstream

Comment 3 Eli Mesika 2017-06-07 21:08:15 UTC
I have got the suggest fix on postgres JDBC driver and tested it , it solved the sample program I used to demonstrate the issue however engine still failed with :


017-06-07 23:13:15,706+03 ERROR [org.ovirt.engine.core.bll.network.macpool.MacPoolPerCluster] (ServerService Thread Pool -- 52) [] Error initializing: PreparedStatementCallback; bad SQL grammar [select * from  getallmacpoolrangesbymacpoolid()]; nested exception is org.postgresql.util.PSQLException: ERROR: function getallmacpoolrangesbymacpoolid() does not exist
  Hint: No function matches the given name and argument types. You might need to add explicit type casts.
  Position: 16

But the above exception was when using spring 4.2.4.RELEASE
So, I did another try with spring 4.3.8.RELEASE

The application worked and  all DAO tests also passed with no issues.

So , bottom line we should use :

1) postgres 42.1.2
2) spring 4.3.8

Comment 4 Eli Mesika 2017-07-30 08:33:54 UTC
After PG JDBC Driver 42.1.3 was released and another issue[1] we have found in one of our SP code was resolved and merged to master, we can go ahead now and use PG 9.5

Comment 5 Greg Sheremeta 2018-05-22 23:59:39 UTC
4.2.2 is out

Comment 6 Martin Perina 2018-05-31 13:37:17 UTC
Upgrading to 42.2.2 should bypass regression in JDBC drivers around Spring Framework support

Comment 7 Lucie Leistnerova 2018-12-13 21:21:26 UTC
ovirt-engine installed on fedora with postgresql-jdbc 42.2.2, no NullPointerException, engine running without problems

verified in ovirt-engine-4.3.0-0.4.master.20181212102908.git1eda2787ea4.fc28.noarch

Comment 8 Sandro Bonazzola 2019-02-13 07:46:49 UTC
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.