Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033013Openbravo ERPA. Platformpublic2016-05-20 10:502016-05-20 15:12
alostale 
alostale 
immediatemajoralways
closedfixed 
5
 
3.0PR16Q2 
AugustoMauch
Core
Production - QA Approved
2015-11-23
3.0PR16Q1
http://code.openbravo.com/erp/devel/pi/rev/0533c8d6569d7ca75ba77ecb7bcb224b1ff681a1 [^]
No
0033013: error in Instance Activation window when using an expired license
When an instance is activated with an expired license, Instance Activation window displays an internal error in UI instead of the correct one notifying the license has expired.
Try to activate an instance with an expired license.
  1. In UI you get the error attached as screenshot
  2. The following trace appears in log:
  java.lang.IllegalArgumentException: No enum constant org.openbravo.erpCommon.obps.ModuleLicenseRestrictions.MsgSeverity.Error
        at java.lang.Enum.valueOf(Enum.java:236)
        at org.openbravo.erpCommon.obps.ModuleLicenseRestrictions$MsgSeverity.valueOf(ModuleLicenseRestrictions.java:52)
        at org.openbravo.erpCommon.obps.ActivationKey.getActivationMessage(ActivationKey.java:842)
        at org.openbravo.erpCommon.ad_forms.InstanceManagement.printPageActive(InstanceManagement.java:326)
        at org.openbravo.erpCommon.ad_forms.InstanceManagement.doPost(InstanceManagement.java:67)
If suffering this situation, please contact Openbravo support.
No tags attached.
blocks defect 0033012 closed alostale error in Instance Activation window when using an expired license 
Issue History
2016-05-20 10:52alostaleTypedefect => backport
2016-05-20 10:52alostaleTarget Version => 3.0PR16Q2
2016-05-20 11:50hgbotCheckin
2016-05-20 11:50hgbotNote Added: 0086600
2016-05-20 11:50hgbotStatusscheduled => resolved
2016-05-20 11:50hgbotResolutionopen => fixed
2016-05-20 11:50hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR16Q2/rev/8ba59409c278336329d5163a4a712d530f1fa48e [^]
2016-05-20 11:51alostaleReview Assigned To => AugustoMauch
2016-05-20 15:12AugustoMauchNote Added: 0086622
2016-05-20 15:12AugustoMauchStatusresolved => closed

Notes
(0086600)
hgbot   
2016-05-20 11:50   
Repository: erp/backports/3.0PR16Q2
Changeset: 8ba59409c278336329d5163a4a712d530f1fa48e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri May 20 11:08:28 2016 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR16Q2/rev/8ba59409c278336329d5163a4a712d530f1fa48e [^]

fixed bug 33013: error in Instance Activation when using an expired license

  When using a license within an erroneous state (such as expired), message severity
  was incorrectly obtained from the enum, causing an exception to be thrown.

  Fixed by using MsgSeverity.forType method instead of valueOf. forType method
  was designed with this purpose.

  In addition, some other changes have been done on MsgSeverity enum:
   * valueOf method is static so no need to invoke it on an instance (to may be
     another one, which is weird).
   * checking with actual type rather than with toString (which might change)
   * reversed comparision order to prevent NPE in case param in null

---
M src/org/openbravo/erpCommon/obps/ActivationKey.java
M src/org/openbravo/erpCommon/obps/ModuleLicenseRestrictions.java
---
(0086622)
AugustoMauch   
2016-05-20 15:12   
Code reviewed and verified in [1]@8ba59409c278

[1] https://code.openbravo.com/erp/backports/3.0PR16Q2 [^]