Pages

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

Thursday, December 5, 2013

ADempiere Email Concerns

I know that people should post in ADempiere forums if they want to ask something. But sometimes I find it hard to find for the topic I'm searching for especially if I really need to meet my deadline. So depending on the questions and my schedule, I sometimes reply and help them with their concerns.

Summary of Emails
  1. Adempiere DocAction Issue
  2. Material Issue Policy

Below are some of the emails I've received and my reply to them:

[Start of Email] Adempiere DocAction Issue -------------------
 This is Kalpana from India. I got your mail id from Ayaz Ahmed. I would like to get a help inadempiere. I face the same issue as it is posted in this forum 


I am trying to debug CompleteIt, PrepareIt,... methods in MClass. But it shows terminated. Then I tried to follow Requisition window, and created new workflow and attached with Docaction as a process. But now workflow is running when i click on complete button. But CompleteIt and PrepareIt methods are not called. So I am unable to debug.

Please help me
----- (below is my reply)


Look for the simplest M class and just replace the name of the class you just created.
Also, make sure that your complete button is the same with other complete button, to check for the terminated one.

Try these first. Make sure you are following or setting it right.
----- (after some more exchange emails, here's our final conversation)
I got it. I have just copied table and column and Classes of Requisition and then renamed as per my class. Now it works fine. Thanks very much for your instructions..

[End of Email] -------------------

[Start of Email] Material Issue Policy -------------------

hello sister .
hope you are good and fine. i am learning adempiere and want to use this software for my company,  but i got a problem in material issue policy . adempiere only use LIFO or FIFO policy. This does not fit for my company. i don't want to issue lot numbered material on lifo or fifo bases . i want to use a lot that i wish rather then lifo or fifo . plz help me how i could issue material according to my wish.
God bless you.
regards
Hassan Aziz (pakistan) 
 ----- (below is my reply)
 Hmm... Let me clear the process first so that we are on the same page.

1st: You want to issue materials right (from first email) but you have to issue the right materials and LIFO or FIFO does not work according to how you do it.

2nd: (In your second email) Are you saying here that you don't have inventory since the raw material is coming from the supplier? Are you using JIT (Just in time) production strategy?

Since I can't get the clear picture of your company, I cannot give you a definite answer.
As of the moment here's what I can think, and you can check if this will work.

Using material receipt, receive the item from Supplier 1 and put it in a temporary location (in the warehouse). You can use ASI lot so you can mark it by day or by pallet or how you measure it in bulk.

Receive the raw material of 2nd supplier and store it in temp location, use ASI to mark it. Then using the manufacturing process (not the small production process but the libero manufacturing process), you can process your production by pointing the source from Temporary location, choose the right ASI, and then produce the final product.

With this you still used the supplier 2 raw material with supplier 1.

For you to manufacture something, you have to at least put the quantity in the system so the system can proceed.

Hope this helps.

If not, then give me a more detailed example highlighting the main problem, it's better if you mention the windows you are going through the system.
----- (after some more exchange emails, here's our final conversation)
 I got the solution as per your instruction . i used different locator and my problem is solved. i am very thankful to you. for your time and help. God bless you.
if you don't mind will you send me your mail address i will send you greeting card of thanks from my country .


[End of Email] -------------------


Some email conversations I had with some users requires more time to resolve, if I'm free I help them but for a fee (because of the time I need to spend to solve the issue).

Lately, due to me becoming involve into this IT Firm "iOSS", I seldom get to have a free time to do freelance work. Also some concerns are too technical that only our Technical Manager can answer, so I route them through the company. This way, the exchange of information is more formal and they don't have to worry about the people disappearing or can't be reached (happens sometimes in freelance jobs).

So if you have concerns about ADempiere, our company entertains technical and business process concerns - starting from business mapping to implementation (on the cloud or on site).

For more information, you can check us out here: http://ioss.com.ph/

Friday, October 25, 2013

ERP Business Process - ADempiere

During my first year studying the business process of this ERP system, I can't but create a flowchart. ADempiere is the first ERP system I've studied, and since then I've been studying the system and the business flow. I haven't had a chance to check the new fork: iDempiere, but I'm excited to check it out.

I hope the flowcharts will help you understand ADempiere ERP system. :)



Then to my surprise, someone from Germany translated the flowchart I've created and was kind enough to inform me and email me a copy.

GERMAN VERSION of Sales Order Map, thanks to Thomas Kreser of Catura.de


Here's the link to may ADempiere Wiki Page - Jairah.