View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Show collection (0 pages)
Collections help

Search

ERP 2.50:Update Tips

Contents

Introduction

This page is designed to include some tips related to rebuilding the system when installing or upgrading modules, or upgrading Openbravo Core.

Before rebuilding

Before rebuilding the system, it's very important to make sure you've exported all the modules you had in development in the system. To be sure of this, mark all your developed modules as "In development", and then do:

ant export.database

This should export all the modules to xml files.

If you don't do this, the rebuild task could revert some non-exported developments.

While rebuilding

While rebuilding the system, it's very important that you do not close the Rebuild Window, or stop Tomcat or the database service.

Be patient, some rebuild tasks can take a while (specially if you are upgrading Openbravo Core).

After having rebuilt the system

In case the build was successful

If the rebuild was completely successful, you will get a green "Build succesful" message. You then need to restart Tomcat to be able to use the new installed modules, or the new version of Core. You can do this through the Rebuild Window by choosing the "Restart application container" option, and clicking on "Continue". Wait until you see the the login window again, and you are good to go!

In case the build had warnings

If the build had warnings, this means two things:

Here are some tips of what you could do in case there were warnings:

In case the build had errors

If the build has errors, the build process is interrupted. As the build process is stopped, the application can be in a potentially unstable state. You will only be able to login using a user which has System Administrator role permission. Your objective in this case should be to fix the errors that caused the problems, and do a new rebuild which is succesful. Here are some tips on what you could try:

In case module download hangs up

If the modules are being installed/updated online, it is possible the download process hangs up in case the Internet connection does not work properly or in case of problems in the remote server.

This can be noticed if after accepting the module(s) license the following window does not appear in a long time. Note that the download process can take several minutes to be completed depending on the number of modules downloaded and on the size of them. If you look in your log file you will see a line like INFO org.openbravo.erpCommon.modules.ImportModule - Installing /ws/pi-2/openbravo/modules/org.openbravo.examples.search.bankAccount/src-db/database/sourcedata/AD_REFERENCE.xml for each downloaded file and finishes with INFO org.openbravo.erpCommon.modules.ImportModule - Inserting in DB info for module: Bank Account Search, if this line does not appear is because the download did not finish.

The solution for this issue depends on whether the download was for an update or for a new module installation.

Update

In this case you will find in the backup_install directory a zip with the sources for the module (or core) as it was before the process. You will have to unzip it in the modules directory if it is a module or in the root openbravo directory for core.

After this you will be able to try to update the module again in the same way or download the obx file and update it locally from file system.

Installation

Go to modules directory and delete the folder for the module you were trying to update which is not complete.

After this you will be able to try to install the module again in the same way or download the obx file and install it locally from file system.

In case the build hangs up

Blocked database objects

If the process hangs up in the database update step, it is possible there was a blocked table that is causing a deadlock. These blocks can be produced by other processes/users accessing to database.

To solve this issue, you can follow these steps which are explained more in detail below:

Check for blocked objects

This check consists in executing a query in database. To do it you will have to connect to your openbravo database using a database client (for example psql for PostgreSQL or sqlplus for Oracle) with a user with dbadmin privileges.

 
 SELECT c.relname, a.current_query
   FROM pg_locks l, pg_class c, pg_stat_activity a
  WHERE l.relation = c.oid
    AND c.relname NOT LIKE 'pg%'
    AND a.procpid = l.pid;
 
SELECT S.PROCESS,
S.USERNAME,
O.OBJECT_NAME,
O.OBJECT_TYPE,
s.PROGRAM, 
O.OWNER OWNER
FROM v$lock l,dba_objects o,v$session s
WHERE l.ID1 = o.OBJECT_ID
AND s.SID =l.SID
AND l.TYPE IN ('TM','TX');

These queries will return a list of the blocked tables and the process that caused the block.

Unlock blocked objects

If the previous step is positive (there are blocked objects), it will be necessary to unlock them before continuing.

The steps to perform are:

Rerun the build

Once there are no blocked objects you will be able to run the build process again by executing in command line:

ant update.database compile.complete -Dforce=yes

Known issues of past revisions of Openbravo

When updating from 2.50 MP10, an "Error checking access" is raised, but the build continues

In some (rare) cases when doing a rebuild of the system through the application, it could happen that the build raises an error, sometimes with the following message:

Error checking access

and/or complaining about a missing database object, with a message similar to this one:

Error: SQL error in query: SELECT ACCESSLEVEL FROM AD_FORM. Exception:org.postgresql.util.PSQLException: ERROR: relation "ad_table" does not exist

This error is shown due to a bug in 2.50MP10. The build process continues, and should finish correctly, even if the final shown message is the one of an error. If there are no further issues shown in the build, the build was indeed done correctly, and you have to execute the command ant smartbuild and restart your Tomcat server to access the application.

Retrieved from "http://wiki.openbravo.com/wiki/ERP_2.50:Update_Tips"

This page has been accessed 25,152 times. This page was last modified on 14 June 2011, at 11:04. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.