Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011515Openbravo ERPA. Platformpublic2009-11-26 12:532009-12-01 00:00
plujan 
shuehner 
immediatemajorhave not tried
closedfixed 
5
main 
 
Core
No
0011515: Using the Virtual Appliances, I cannot activate Heartbeat because an incorrect os.version processing
Butler server process the os.version by removing all the letters and keeping just the numbers.
Virtual Appliances os.version are something like:
2.6.29.6-0.6.smp.gcc4.1.x86.i686

And after the function, it results in: 26296064186686

Generating the following exception:
java.lang.NumberFormatException: For input string: "26296064186686"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Integer.parseInt(Integer.java:459)
        at java.lang.Integer.parseInt(Integer.java:497)
        at org.openbravo.butler.hearbeat.Component.hashCode(Component.java:141)
        at java.util.HashMap.put(HashMap.java:372)
        at org.openbravo.butler.hearbeat.HeartbeatServlet.doPost(HeartbeatServlet.java:83)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at org.openbravo.base.HttpBaseServlet.service(HttpBaseServlet.java:244)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Use a Virtual Appliance for Openbravo. I tried with VMWare
Go to Module Management and try to install a new module
You will be prompted to activate heartbeat. Accept.
You will get an error:
      
   An internal error has occurred. Please contact your system administrator.
   2009-11-26 10:48:17.601 - Server returned HTTP response code: 500 for URL: https://butler.openbravo.com:443/heartbeat-server/heartbeat [^]

Check in Butler server, you will see in the log the exception shown in Description.
No tags attached.
related to defect 0011459 closed shuehner If an entry is added in Available Updates in Butler, when heartbeat requests an update there is an error because of UUIDs 
Issue History
2009-11-26 12:53plujanNew Issue
2009-11-26 12:53plujanAssigned To => alostale
2009-11-26 13:27shuehnerRelationship addedrelated to 0011459
2009-11-26 13:28shuehnerNote Added: 0022180
2009-11-26 13:29shuehnerIssue Monitored: shuehner
2009-11-26 13:30alostaleAssigned Toalostale => iperdomo
2009-11-26 16:39plujanNote Added: 0022189
2009-11-26 16:39plujanPriorityurgent => immediate
2009-11-26 16:42shuehnerAssigned Toiperdomo => shuehner
2009-11-26 18:10plujanStatusnew => scheduled
2009-11-26 18:10plujanfix_in_branch => pi
2009-11-27 17:37hgbotCheckin
2009-11-27 17:37hgbotNote Added: 0022235
2009-11-27 17:37hgbotStatusscheduled => resolved
2009-11-27 17:37hgbotResolutionopen => fixed
2009-11-27 17:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.butler/rev/098732b07ee157494c29992bc6ea00be07c265f9 [^]
2009-11-30 12:48plujanNote Added: 0022256
2009-11-30 12:48plujanStatusresolved => closed
2009-12-01 00:00anonymoussf_bug_id0 => 2906320

Notes
(0022180)
shuehner   
2009-11-26 13:28   
Problem is the hashCode method inside the Component.java file. It removes all non-numeric chars from the received or version and parses the remaining chars into an Integer. Which will overflow if the number contains enough digits.
(0022189)
plujan   
2009-11-26 16:39   
Raising priority to immediate since it is stopping current QA cycle
(0022235)
hgbot   
2009-11-27 17:37   
Repository: erp/pmods/org.openbravo.butler
Changeset: 098732b07ee157494c29992bc6ea00be07c265f9
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Nov 27 17:36:44 2009 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.butler/rev/098732b07ee157494c29992bc6ea00be07c265f9 [^]

Fixed 11515, Fixed 11459: Fix incoming heartbeat and available updates
- Fix parsing code for incoming os.version
- Convert 'available update notification' code to works with 2.50 (UUIDs)
- add junit testcase for 11515 issue

---
M src-test/org/openbravo/butler/heartbeat/test/HeartbeatTest.java
M src/org/openbravo/butler/hearbeat/Component.java
M src/org/openbravo/butler/hearbeat/HeartbeatServlet.java
M src/org/openbravo/butler/hearbeat/UpdateService.java
---
(0022256)
plujan   
2009-11-30 12:48   
Verified using virtual appliance