Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019989Openbravo ERPA. Platformpublic2012-03-09 09:162012-04-01 20:39
alostale 
alostale 
immediatecriticalhave not tried
closedfixed 
5
 
 
Core
No
0019989: Having active alerts, application doesn't work in Oracle
Using Oracle, if there are active alert rules, after login an error message is shown and the application is not loaded.

This is what appears in openbravo.log

ERROR org.openbravo.client.kernel.KernelServlet - Error executing action org.openbravo.client.application.AlertActionHandler error: java.lang.ClassCastException: java.lang.Long cannot be cast to java.math.BigInteger
java.lang.IllegalStateException: java.lang.ClassCastException: java.lang.Long cannot be cast to java.math.BigInteger
    at org.openbravo.client.application.AlertActionHandler.execute(AlertActionHandler.java:128)

The problem is caused because in executed SQL count(*) is converted to BigInteger when using PostgreSQL whereas it is a Long when in Oracle.
-Set an alert rule as active
-Relog in the application -> Error is shown
Regression QA
related to defect 00199853.0MP10 closed alostale AlertActionHandler response is unnecessary big 
has duplicate defect 0019990 closed alostale It is not possible to log in using an Oracle context 
Issue History
2012-03-09 09:16alostaleNew Issue
2012-03-09 09:16alostaleAssigned To => alostale
2012-03-09 09:16alostaleModules => Core
2012-03-09 09:16alostaleRelationship addedrelated to 0019985
2012-03-09 09:17alostaleNote Added: 0046217
2012-03-09 09:18alostaleTag Attached: Regression QA
2012-03-09 09:59alostaleRelationship addedhas duplicate 0019990
2012-03-09 11:23alostaleNote Added: 0046222
2012-03-09 11:24hgbotCheckin
2012-03-09 11:24hgbotNote Added: 0046223
2012-03-09 11:24hgbotStatusnew => resolved
2012-03-09 11:24hgbotResolutionopen => fixed
2012-03-09 11:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4fdfa4d1c5ba42558a2ecd03f3e5708ba708691b [^]
2012-03-16 16:12marvintmStatusresolved => closed
2012-04-01 20:39hudsonbotCheckin
2012-04-01 20:39hudsonbotNote Added: 0047076

Notes
(0046217)
alostale   
2012-03-09 09:17   
Bug introduced by 0019985 because it was not tested in Oracle, assuming it would behave in the same way in both DBs.
(0046222)
alostale   
2012-03-09 11:23   
This fix should be no risky.

Test plan: same as for 0019958 including both Oracle and PG.
(0046223)
hgbot   
2012-03-09 11:24   
Repository: erp/devel/pi
Changeset: 4fdfa4d1c5ba42558a2ecd03f3e5708ba708691b
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Mar 09 11:23:03 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4fdfa4d1c5ba42558a2ecd03f3e5708ba708691b [^]

fixed bug 19989: Having active alerts, application doesn't work in Oracle

  SQL query creted with OBDal.getInstance().getSession().createSQLQuery returns for
  count(*) a Long object in Oracle and a BigInteger in PostgreSQL causing casting
  problems. It has been replaced by a PreparedStatement.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java
---
(0047076)
hudsonbot   
2012-04-01 20:39   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/640de9acc2d5 [^]

Maturity status: Test