Pages

Wednesday, December 17, 2014

Accounting Notes: What goes to where

Below are my notes on Adempeire / iDempiere account postings

Purchase Order: No Posting unless you enable SO/PO Commitment posting

Material Receipt
Product > Accounting: Product Asset (DR)
Business Partner Group > Accounting: Not-invoiced Receipts (CR)

Invoice (Vendor)
Product > Accounting: Inventory Clearing (DR)
Business Partner > Vendor Accounting: Vendor Liability (CR)

Instead of repeating what's in the wiki, I'm just resharing the documentation.
http://www.adempiere.com/ADempiere_Accounting

It was a little bit cluttered, but just read it through, you'll be able to understand it. Based on my initial testing last Dec 2014 for modules AR and AP, posting still looks okay and what's being used by iDempiere 2.1 :)

Monday, November 24, 2014

Updating iDempiere 2.0 to 2.1

First of, all of the solutions are here
http://www.globalqss.com/wiki/index.php/IDempiere/Importing_DB_Seed_Manually

Except for some bumps I've encountered in applying the database migration script
1) I'm using windows so running
sh syncApplied_2.1.sh 
means I have to download CYGwin, there are other tools but this is what I used.

2) After successfully running sync applied, I feel like I need a complete version of migration scripts, because I don't want a problem. So I have to double check the last check point I had when I ran my first migration script and that was i2.0z (found under idempiere\migration\i2.0z). So I have to update my trunk to latest 2.1 branch release by using
hg pull && hg update release-2.1 
inside my local idempiere home folder.

3) After having all the scripts needed, apparently I realized that I don't need step 1 if I have updated my trunk. So I've created a bat that will execute all the sql files in i2.0z folder, since there are lots of sql file.

4) But, I've encountered this generate_uuid() function missing or not existing, so I have to search all over the net to find the solution...

first I found this: https://idempiere.atlassian.net/browse/IDEMPIERE-274
the above link didn't work for me, and I'm not sure why so I tried this

second solution: psql -d idempiere -U adempiere -c 'CREATE EXTENSION "uuid-ossp"'
from: http://www.globalqss.com/wiki/index.php/IDempiere/Importing_DB_Seed_Manually

But again it didn't work because I'm having problem with those freaking quotes!
So my third solution is: http://blog.hardmax.com.pe/2013/11/04/postgres-error-function-uuid_generate_v4-does-not-exist-despues-de-restaurar-idempiere-solucionado/

And it almost did not work in step 3 when I tried using this (instead of what is in the website)
idempiere=# SELECT adempiere.generate_uuid();
But the problem with that is, I have to put adempiere schema in all sql files in migration folder, and I cannot do that. That's crazy!

5) I found a site that modifies postgresql.conf here http://www.mkyong.com/database/postgresql-how-to-change-default-schema/

But when I restarted my server, I had problems running SELECT adempiere.generate_uuid(); again. So I had to close the cmd and recreate the extension. And viola! It WORKS!!! :D

So, I hope this documentation will help other struggling implementer who are updating their idempiere system to 2.1.

Tuesday, May 13, 2014

POSTGRESQL WINDOWS X64: ENABLING UUID-OSSP.SQL

This documentation came from this web page: GraceBatumbya
I've posted it here as a back-up, if ever something happens to the website. All credits goes back to the website I mentioned above.

The background to this is that for that for over 6 months now, I have been working on developing a PostgreSQL Adapter for NexJ Express, a part of Open Health Tools. Though most of the development is done in Java, I have also learnt a lot about PostgreSQL.


The Problem:
Although PostgreSQL has a UUID type, the UUID generation is dependent on the UUID-OSSP.sql module which in turn depends on the OSSP-UUID library.

The PostgreSQL installer for Windows includes the UUID-OSSP.sql module for x86 builds but not for x64 builds (lastest version that I checked was PostgreSQL 9.0.4).

When I asked on #postgresql irc channel, one of the things I was told was that there was not OSSP-UUID library build for windows x64.

The Solution: (tested with PG 9.0.4 x64 build)

Turns out that there was a build of OSSP-UUID for x64 windows in the wild. Thanks to Hiroshi Saito, who replied to my message on the pg_general mailing list.
  1. Download pg90_uuid_ossp_x64.zip,
  2. Unzip the contents of the zip to path/to/PostgreSQL/9.0/
  3. Open psql and install uuid-ossp.sql using the command:
    \i 'path/to/PostgeSQL/9.0/share/contrib/uuid-ossp.sql'
Also, Hiroshi provides the source if you interested on compiling OSSP-UUID on x64 windows for yourself.

Monday, January 27, 2014

Eclipse Debug: Java Heap Out of Memory Problem

Recently, I've been hearing this comment from new java developers
java.lang.OutOfMemoryError: Java heap space

It only means that the allocated java memory is not enough, mainly the allocated runtime memory.

I've found a good resource that will give you instruction on how to update JRE memory in Windows 7.
http://www.wikihow.com/Increase-Java-Memory-in-Windows-7

1) Go to Control Panel
2) Search for Java
3) Go to Java tab
4) Click View
5) (from the link post above)
Modify the parameter. To modify the parameter, double click in the "Runtime Parameters" column and,
type -Xmx512m that assigns 512MB memory for the Java.
type -Xmx1024m that assigns 1GB memory for the Java.
type -Xmx2048m that assigns 2GB memory for the Java.
type -Xmx3072m that assigns 3GB memory for the Java, and so on.
Please note, it begins with a minus sign and ends to an m.
Also note, there is no blank space between characters.

PS: I'm putting this here as a bookmark or note for myself. So if this is helping you too, then thanks to wikihow for posting the direction. :)

More notes about JVM memory below:


This is a quick picture explanation of what a heap memory and non-heap memory is.
Got the image from this website: JVM Memory and Java Heap Space

Another good resource with lots of parameter arguments, check it out here: JVM Heap Space Arguments