User:Tspc

From AdempiereWiki

Jump to: navigation, search
Tony's User Boxes
Name This user real name is : Tony Snook
This user has a Sourceforge account.


Contents

Introduction

  • My name is Tony Snook and I am from Melbourne, Australia.
  • I can be contacted at tspc @ dodo.com.au
  • For the last 14 years I have been employed as the IT Manager for a company that manufactures scientific equipment. Before this I mainly worked as a C Programmer, writing software for embedded systems, Windows and DOS.
  • I have been following the development of Compiere/Adempiere over the last few years and had hoped to implement it at our organization. But due to a lack of resources, the project had to be postponed.
  • I have some experience with Java, Oracle, Postgresql, Redhat Enterprise Server, Fedora, WinXP, Kettle(Pentaho). In the past 2 years I have posted several bug trackers, committed several solutions and answered questions in forums.
  • My involvement with Adempiere is both as a hobby and some self-education, as I would like to gradually venture back into a programming/developer career.

Applying Migration Scripts

The appears to be a number of issues with the current methods of applying migration scripts.

  • Current methods
    • Manually applying each script using tools like
      • (for Oracle) sqlplus, toad, sqldeveloper, ....
      • (for PostgreSQL) psql, pgAdmin, ....
    • Using the ant build scripts which make use of sqlplus for Oracle and psql for PostgreSQL

Problems Include:

  • large number of migration scripts and their size
 makes it difficult to notice that an error has occured
  • error handling varies depending on the tool and database used
 SQLPLUS does not return an error code for any SQLPLUS (SP2-xxx) errors
  • rolling back after errors
 need to ensure that only completely successful scripts are applied and the partially completed script is rolled back.
  • reporting errors
 person applying the script must be notified that an error has occurred
  • keeping track of which scripts have been applied
 records need to be kept of which scripts have been applied to the current installation
  • how migration scripts are corrected
 -correcting a script once it has been committed to trunk can cause problems if someone has already applied the script
 -in some cases it is necessary to apply a script to undo the change and then apply the correct script


PL/Java

PL/Java Info (Tested on Fedora 7 (Linux), and Postgresql 8.2.6, PL/Java 1.3.0)

Recent security releases, of Postgresql, have altered the API for SetUserId to include an additional parameter indicating if we're in a security definer context.

  • If you are running any of the following postgresql releases, then you need to upgrade PL/Java
    • 8.0.x where x >= 15
    • 8.1.x where x >= 11
    • 8.2.x where x >= 6 (I needed it and I am running 8.2.5-11) Joseph.brower 11:52, 18 January 2008 (EST)
    • 8.3.x where x >= 0
  • Goto PL/Java CVS Information and check out the latest CVS of PL/Java.
    • Once you have the source, simply build the source with the 'make' comand.
  • If you are upgrading from pljava 1.3.0, then this is a minor upgrade.
  • I simply copied the binaries over the top of the existing installation.
 cp /build/pljava.jar /usr/var/lib/pljava/
 cp /build/deployer.jar /usr/var/lib/pljava/
 cp /build/objs/pljava.so /usr/var/lib/pljava/
  • su to postgres and restart postgresql
 su - postgres
 pg_ctl stop
 pg_ctl start
 exit
  • Your PL/Java should now be updated.

PL/Java Problems

  • If you are having problems with PL/Java, please check the following:
 Your postgresql.conf should contain the following lines:
 dynamic_library_path = '\$libdir:/usr/lib/pljava' 
 custom_variable_classes = 'pljava' 
 pljava.classpath = '/usr/lib/pljava/pljava.jar'
 
 Where /usr/lib/pljava is the path to your PL/Java installation (on some systems /opt/pljava ) and contains the following files: 
 deploy.jar
 install.sql
 pljava.jar
 pljava.so
 uninstall.sql

PL/Java Links


Adempiere-Libero Branch

Tasks, Issues And Observations

  • Libero Manufacturing installation documentation out of date and needs to be revised.
    • Wiki needs to be updated to reflect new structure. Libero is now an extension.
  • Libero Manufacturing Manual is out of date and needs to be revised.


Mercurial DVCS

Converting from SVN to Mercurial

Upgrading Postgresql 8.1 to 8.3 on CentOS 5.x


  • First, download the latest CentOS yum setup rpm:
 wget http://yum.pgsqlrpms.org/reporpms/8.3/pgdg-centos-8.3-6.noarch.rpm
  • Install the rpm package:
 chmod +x pgdg-centos-8.3-6.noarch.rpm
 rpm -Uvh pgdg-centos-8.3-6.noarch.rpm 
  • Edit /etc/yum.repos.d/CentOS-Base.repo:
    • add a line to exclude postgres related packages in both the base and updates sections.
    • You should end up with something like this:
   [base]
   name=CentOS-$releasever - Base
   mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
   #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
   gpgcheck=1
   gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
   exclude=postgresql*
   #released updates
   [updates]
   name=CentOS-$releasever - Updates
   mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
   #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
   gpgcheck=1
   gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
   exclude=postgresql*
  • Dump all databases using the clean option:
 pg_dumpall -U postgres -c > /var/backup/postgres/postgres_all.sql
 Note: Also make sure you have an ADempiere backup, just in case. (ExpDat.jar)
  • Update server to latest version:
 yum update 
  • Stop the server and move your old data directory:
 service postgresql stop
 mv /var/lib/pgsql/data /var/lib/pgsql/data_8.1 
  • Init a new postgres 8.3 database cluster:
 service postgresql initdb 
  • Update the configuration settings as necessary:
    • /var/lib/pgsql/postgresql.conf
    • /var/lib/pgsql/data/pg_hba.conf
  • Just to be on the safe side, make sure the permissions on the config files are correct (should be owned by user postgres):
 chown postgres:postgres /var/lib/pgsql/data/*.conf 
  • Start the database cluster:
 service postgresql start
  • Check that the connection to the server is working (and fix your config if it isn't):
 psql -U postgres 
  • Restore the dump of all databases:
 psql -U postgres < /var/backup/postgres/postgres_all.sql 

And that's it, upgrade complete, yay!



Adempiere Related Interests

  • Manufacturing Module (Victor's contribution)
  • Data Transformation (Pentaho/Kettle)
  • Bazaar / Community


Steps Toward Creating More Contributors and How To Keep Them

Disagreements +1 / Arguments -1
Disagreements are expected in any team environment.
Arguments only make us look unprofessional and turn contributors and clients away.
Remember that we all make mistakes
Even "experts" are not infallible.
It is all part of the learning process and there is always more to learn.
Patience is a virtue
Try to assist 'newbies' in their learning process and encourage them to keep contributing.
We so easily forget we were all beginners at one point in time.
Feedback, Feedback, Feedback
When someone makes a contribution, give them feed back.
  • 'good job'
  • 'perhaps it would be better if you looked at it this way'
  • 'This article in the Wiki might help .....'
Nothing discourages a newcomer more than silence.
Constructive feedback will keep them coming back.
All contributions are priceless
Everyone comes here with different levels of experience and areas of expertise.
We also have various amounts of time available.
If we only value major contributors from the most experienced developers, then the community will slowly fade away.
Firstly because newcomers will not feel welcome and secondly because the same developers are always being left with the bulk of the workload.
Even one solitary contribution is infinitely more than no contribution at all.


Interesting Links

 Database Independence
 Examining the Logic behind Database Independence
 10 golden rules for running an open source project
Personal tools