Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0019140
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2011-11-22 16:052011-11-30 12:30
ReporterroklenardicView Statuspublic 
Assigned Tomarvintm 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisiondf9e03f9dfea
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0MP5.1SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0019140: update.database does not work on a fresh sources folder

DescriptionOne should be able to do an update/upgrade in the following way:
# rename existing OpenbravoERP sources (let's say 3.0MP3) folder to OpenbravoERP-old
# clone MP5.1 sources into a new OpenbravoERP folder
# copy config files and custom modules from OpenbravoERP-old to OpenbravoERP folder
# run ant core.lib wad.lib trl.lib
# run ant update.database -Dforce=yes
# run compile.complete
However, it fails on step 4, the update database fails because it's looking for some HeartBeatData and AlertData classes that have not been compiled yet. It fails on apply.modules step:

[javac] Compiling 1 source file to /DEVELOP/openbravo/deployment3/build.apply/classes
    [javac] /DEVELOP/openbravo/deployment3/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java:56: cannot find symbol
    [javac] symbol : class HeartbeatData
    [javac] location: package org.openbravo.erpCommon.businessUtility
    [javac] import org.openbravo.erpCommon.businessUtility.HeartbeatData;
    [javac] ^
    [javac] /DEVELOP/openbravo/deployment3/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java:57: cannot find symbol
    [javac] symbol : class RegistrationData
    [javac] location: package org.openbravo.erpCommon.businessUtility
    [javac] import org.openbravo.erpCommon.businessUtility.RegistrationData;
    [javac] ^
    [javac] /DEVELOP/openbravo/deployment3/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java:714: cannot find symbol
    [javac] symbol : class HeartbeatData
    [javac] location: class org.openbravo.erpCommon.ad_process.HeartbeatProcess
    [javac] final HeartbeatData[] hbData = HeartbeatData.selectSystemProperties(connectionProvider);
    [javac] ^
    [javac] /DEVELOP/openbravo/deployment3/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java:714: cannot find symbol
    [javac] symbol : variable HeartbeatData
    [javac] location: class org.openbravo.erpCommon.ad_process.HeartbeatProcess
    [javac] final HeartbeatData[] hbData = HeartbeatData.selectSystemProperties(connectionProvider);
    [javac] ^
    [javac] /DEVELOP/openbravo/deployment3/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java:739: cannot find symbol
    [javac] symbol : class RegistrationData
    [javac] location: class org.openbravo.erpCommon.ad_process.HeartbeatProcess
    [javac] final RegistrationData[] rData = RegistrationData.select(connectionProvider);
    [javac] ^
    [javac] /DEVELOP/openbravo/deployment3/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java:739: cannot find symbol
    [javac] symbol : variable RegistrationData
    [javac] location: class org.openbravo.erpCommon.ad_process.HeartbeatProcess
    [javac] final RegistrationData[] rData = RegistrationData.select(connectionProvider);
    [javac] ^
    [javac] /DEVELOP/openbravo/deployment3/src/org/openbravo/erpCommon/utility/Alert.java:77: cannot find symbol
    [javac] symbol : class AlertData
    [javac] location: class org.openbravo.erpCommon.utility.Alert
    [javac] AlertData[] data = null;
    [javac] ^
    [javac] /DEVELOP/openbravo/deployment3/src/org/openbravo/erpCommon/utility/Alert.java:79: cannot find symbol
    [javac] symbol : variable AlertData
    [javac] location: class org.openbravo.erpCommon.utility.Alert
    [javac] data = AlertData.select(conn, String.valueOf(alertRuleId), recordId);
    [javac] ^
    [javac] /DEVELOP/openbravo/deployment3/src/org/openbravo/erpCommon/utility/Alert.java:81: cannot find symbol
    [javac] symbol : variable AlertData
    [javac] location: class org.openbravo.erpCommon.utility.Alert
    [javac] data = AlertData.selectByDescription(conn, String.valueOf(alertRuleId), description);
    [javac] ^
    [javac] /DEVELOP/openbravo/deployment3/src/org/openbravo/erpCommon/utility/Alert.java:84: cannot find symbol
    [javac] symbol : variable AlertData
    [javac] location: class org.openbravo.erpCommon.utility.Alert
    [javac] AlertData.insert(conn, description, String.valueOf(alertRuleId), recordId, referencekeyId);
    [javac] ^
    [javac] 10 errors
 
BUILD FAILED
/DEVELOP/openbravo/deployment3/build.xml:715: The following error occurred while executing this line:
/DEVELOP/openbravo/deployment3/build.xml:785: The following error occurred while executing this line:
/DEVELOP/openbravo/deployment3/src/build.xml:175: Compile failed; see the compiler error output for details.
Steps To ReproduceSee above
Proposed Solutionthe update.database task should compile any classes deemed necessary for its operation if they are not present yet.
TagsRegression
Attached Fileszip file icon update.database.log.zip [^] (211,848 bytes) 2011-11-22 20:29

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0043078)
roklenardic (developer)
2011-11-22 16:08

The current workaround is the following:
ant generate.entities
ant compile -Dtab=xxx
ant update.database -Dforce=yes
(0043082)
shuehner (administrator)
2011-11-22 17:12

Hi Rok,

can you add a more complete output of the log? i.e. full output of the ant update.database?

as some important lines just before the ones you are posting are important.
As what is failing technically is the mini-compile step before apply.modules and not the update.database itself (but same for the user).
But that apply.module does have a mini-compile of the needed parts already, but it seems not be working correctly.
(0043099)
roklenardic (developer)
2011-11-22 20:29

Attached, with debugging turned on.
(0043137)
shuehner (administrator)
2011-11-24 09:35

Problem clear now.
Reproducable with:
- rm -rf build
- ant apply.module
Because of some changes done elsewhere in the erp the manually maintained list of xsql files for the ant compile.apply.module target needs to be updated.
(0043164)
shuehner (administrator)
2011-11-24 14:23

Issue present in MP5 + MP5.1. Issue not present in MP4.2
(0043187)
hgbot (developer)
2011-11-24 16:52

Repository: erp/devel/pi
Changeset: df9e03f9dfeaf533b11b620b69d9c403c28aa020
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Thu Nov 24 16:51:51 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/df9e03f9dfeaf533b11b620b69d9c403c28aa020 [^]

Fixed 19140: fix apply.module without having sources compiled before
Add three more xsql files to manually maintained list of xsql files
being processed in compile.apply.module target as those are not indirect
compile time dependency of apply.module

---
M src/build.xml
---
(0043188)
shuehner (administrator)
2011-11-24 16:57

Notes for review:

Change is in special compile.apply.module target only run as dependency of apply.module. Change is to process three more xsql files in this compile step. After that sql the javac step will automatically pick up the extra 3 java files generated by this change making the compilation work again.

How to test that bug as reported is fixed:
start with configured workspace (at least Openbravo.properties present + pointing to a database + create.database ran).
rm -rf build
ant core.lib
ant generate.entities
ant apply.module

This sequence of steps forces the compile.apply.module to recompile all needed parts and thus checks if it contains all needed files.

Side-effects: I don't expect this change to have any functional side-effects, as only 3 extra xsql files are compiled in apply.module (into the build/ folder). So later incremental compile (i.e. smartbuild) will just not reprocess them as they are uptodate.
Compile-time impact: None as total files process for compile.apply.module is too big compared to the 3 extra files.
(0043191)
alostale (developer)
2011-11-24 18:00

Reviewed and working fine on pi@df9e03f9dfea

Tested before the fix to check it failed and after it to confirm it works.

Code reviewed.
(0043440)
hudsonbot (developer)
2011-11-30 12:30

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/01809c7b3135 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2011-11-22 16:05 roklenardic New Issue
2011-11-22 16:05 roklenardic Assigned To => marvintm
2011-11-22 16:05 roklenardic Modules => Core
2011-11-22 16:08 roklenardic Note Added: 0043078
2011-11-22 17:12 shuehner Note Added: 0043082
2011-11-22 17:12 shuehner Status new => feedback
2011-11-22 20:29 roklenardic File Added: update.database.log.zip
2011-11-22 20:29 roklenardic Note Added: 0043099
2011-11-24 09:35 shuehner Note Added: 0043137
2011-11-24 09:35 shuehner Status feedback => new
2011-11-24 14:23 shuehner Note Added: 0043164
2011-11-24 16:52 shuehner Tag Attached: Regression
2011-11-24 16:52 hgbot Checkin
2011-11-24 16:52 hgbot Note Added: 0043187
2011-11-24 16:52 hgbot Status new => resolved
2011-11-24 16:52 hgbot Resolution open => fixed
2011-11-24 16:52 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/df9e03f9dfeaf533b11b620b69d9c403c28aa020 [^]
2011-11-24 16:57 shuehner Note Added: 0043188
2011-11-24 18:00 alostale Note Added: 0043191
2011-11-24 18:00 alostale Status resolved => closed
2011-11-30 12:30 hudsonbot Checkin
2011-11-30 12:30 hudsonbot Note Added: 0043440


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker