Upgrade From FW 2.1 To FW 2.2: SQL Count Can No Longer Be Casted Into Integer

(Doc ID 944855.1)

Last updated on OCTOBER 18, 2016

Applies to:

Oracle Utilities Customer Care and Billing - Version: 2.2.0 and later   [Release: 2.2 and later ]
Oracle Utilities SDK - Version: 2.2.0.0 and later    [Release: 2.2 and later]
Oracle Utilities Framework - Version: 2.2.0 and later    [Release: 2.2 and later]
Oracle Enterprise Taxation Management - Version: 2.2.0 and later ]
Information in this document applies to any platform.

Goal

When upgrading from ETM 2.1.5 to ETM 2.2.0 and compiling CM code developed on SDK 2.1.5 using SDK 2.2.0, a runtime exception is being raised since an HQL change is observed.
HQL change: CMPNIDAO.java: selecting count in sql can no longer be casted into (Integer). Instead of returning an integer, a long type is returned.

The workaround is to replace the following code in the CM java class:
count = (Integer)iter.next();
with
Long l = (Long)iter.next();
count = Integer.valueOf(l.intValue());

Is this workaround feasible? Is there a way to recover from the problem without modifying the current CM code?

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms