Talk:Adempiere Install for Windows & PostgreSQL

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

It should be noted that the manual installation steps of pljava is not needed if pljava is selected during installation of postgresql 8.2.x

Installation Problems

What would be nice to have is some one to confirm that when pljava is installed during installation of postgresql 8.2.x the manual installation steps of pljava are not needed.

The reason I say this is that when we run the pljava install we are using the database name.

> java org.postgresql.pljava.deploy.Deployer -install -user adempiere > -database adempiere -password adempiere

So I think you need to have created the database first and then run the install script for pljava to create hooks of some kind into the adempiere database.

It also does get confusing when you read in the WIKI at the end of step 14

>NOTE: Maybe dump restore make PL/Java deployment (see step 8) unnecessary.

According to my understanding of the postgresql install (see link) the manual installation steps of pljava is not needed if pljava is selected during installation of postgresql 8.n

As a novice user I feel this is confusing and needs to be clarified in the wiki.

Error Dump (success?)

I successfully imported the Adempiere_pg.dmp into the database, following all the steps in this guide, and I checked the log for errors.

I get many "already exists" errors, which I assume are harmless, but the later ones are worrying, I'd like to know if they're normal, as I've got them in every single installation I've performed (including a few VMWare virtual machines where I installed XP from scratch)

Here is my log:

psql:adempiere_pg.dmp:37: ERROR:  schema "sqlj" already exists
psql:adempiere_pg.dmp:52: ERROR:  function "java_call_handler" already exists with same argument types
psql:adempiere_pg.dmp:63: ERROR:  language "java" already exists
psql:adempiere_pg.dmp:74: ERROR:  function "javau_call_handler" already exists with same argument types
psql:adempiere_pg.dmp:85: ERROR:  language "javau" already exists
psql:adempiere_pg.dmp:93: ERROR:  language "plpgsql" already exists
psql:adempiere_pg.dmp:693: ERROR:  function "add_type_mapping" already exists with same argument types
psql:adempiere_pg.dmp:706: ERROR:  function "drop_type_mapping" already exists with same argument types
psql:adempiere_pg.dmp:719: ERROR:  function "get_classpath" already exists with same argument types
psql:adempiere_pg.dmp:732: ERROR:  function "install_jar" already exists with same argument types
psql:adempiere_pg.dmp:745: ERROR:  function "install_jar" already exists with same argument types
psql:adempiere_pg.dmp:758: ERROR:  function "remove_jar" already exists with same argument types
psql:adempiere_pg.dmp:771: ERROR:  function "replace_jar" already exists with same argument types
psql:adempiere_pg.dmp:784: ERROR:  function "replace_jar" already exists with same argument types
psql:adempiere_pg.dmp:797: ERROR:  function "set_classpath" already exists with same argument types
psql:adempiere_pg.dmp:21253: ERROR:  relation "classpath_entry" already exists
psql:adempiere_pg.dmp:21269: ERROR:  relation "jar_entry" already exists
psql:adempiere_pg.dmp:21284: ERROR:  relation "jar_entry_entryid_seq" already exists
psql:adempiere_pg.dmp:21320: ERROR:  relation "jar_repository" already exists
psql:adempiere_pg.dmp:21335: ERROR:  relation "jar_repository_jarid_seq" already exists
psql:adempiere_pg.dmp:21368: ERROR:  relation "typemap_entry" already exists
psql:adempiere_pg.dmp:21384: ERROR:  relation "typemap_entry_mapid_seq" already exists
psql:adempiere_pg.dmp:103087: ERROR:  insert or update on table "classpath_entry" violates foreign key constraint "classpath_entry_jarid_fkey"
DETAIL:  Key (jarid)=(1) is not present in table "jar_repository".
psql:adempiere_pg.dmp:103107: ERROR:  insert or update on table "jar_entry" violates foreign key constraint "jar_entry_jarid_fkey"
DETAIL:  Key (jarid)=(1) is not present in table "jar_repository".
psql:adempiere_pg.dmp:103118: ERROR:  insert or update on table "jar_repository" violates foreign key constraint "jar_repository_deploymentdesc_fkey"
DETAIL:  Key (deploymentdesc)=(1) is not present in table "jar_entry".
psql:adempiere_pg.dmp:109072: ERROR:  multiple primary keys for table "classpath_entry" are not allowed
psql:adempiere_pg.dmp:109082: ERROR:  relation "jar_entry_jarid_key" already exists
psql:adempiere_pg.dmp:109092: ERROR:  multiple primary keys for table "jar_entry" are not allowed
psql:adempiere_pg.dmp:109102: ERROR:  relation "jar_repository_jarname_key" already exists
psql:adempiere_pg.dmp:109112: ERROR:  multiple primary keys for table "jar_repository" are not allowed
psql:adempiere_pg.dmp:109122: ERROR:  multiple primary keys for table "typemap_entry" are not allowed
psql:adempiere_pg.dmp:130329: ERROR:  constraint "classpath_entry_jarid_fkey" for relation "classpath_entry" already exists
psql:adempiere_pg.dmp:130339: ERROR:  constraint "jar_entry_jarid_fkey" for relation "jar_entry" already exists
psql:adempiere_pg.dmp:130349: ERROR:  constraint "jar_repository_deploymentdesc_fkey" for relation "jar_repository" already exists

I'm sure it would benefit everyone in this wiki to know if these are fatal or just normal warnings.Maximus 13:40, 17 April 2007 (EDT)

This happen because you do the pljava deployment ( step 8 ) and then the dump restore. i.e step 8, 10, 11 and 12 is not needed. Hengsin 04:35, 20 April 2007 (EDT)

Actually I was skipping to step #13 as the instructions suggested. I didn't do any of the manual stuff. It seems that this page has been changed a lot, that new "drop schema sqlj cascade" did the trick, apparently. Now all I get is this:

psql:adempiere_pg.dmp:93: ERROR:  language "plpgsql" already exists

Maximus 18:19, 24 April 2007 (EDT)

RE: Install on Windows XP + PostgreSQL

By: pst-bkk I ever have that problem also. What I did to solve it is, to install JDK first of all others.

in brief,

1. install JDK. I use 1.6.0_01 and it is fine.

2. check that path is OK.

     path should have "c:\program files\java\jdk1.6.0_01\bin;C:\Program

Files\Java\jre1.6.0_01\bin;C:\Program Files\Java\jre1.6.0_01\bin\client;"

3. also add path "C:\Program Files\PostgreSQL\8.2\bin". This will help you in other step.

4. Install postgresql

5. Install Adempiere. Do not delete c:\adempiere\jboss dir when use run_setup.bat. If deleted, it will not find some .xml file and adempiere will not success installed. I do not know why the install manual tell me to delete it.

6. import database

My first installation is 3 days trial. After I use above sequence, I could install it success within 1 hours.


In step 5:


host    all         all          md5
host    all         all        trust

Should be in step 6, because this MUST NOT be skipped, no matter how you installed postgresql (assuming you clicked on "accept connections from any client", otherwise you can only set up as "localhost" in adempiere, which is not recommended). You do not need to restart the service after this change. Note that a 16 after the "/" symbol will ignore the last two IP numbers, just like 24 ignores the last IP number (and 32 requires the complete number exactly). I use for my portable demo installation. Maximus 20:23, 14 May 2007 (EDT)

Schemas adempiere and sqlj at Step 4 needed

  • You may have to create 2 schemas besides the public at the end of Step 4
  • Create schemas adempiere and sglj under the Databases/adempiere/Schemas of your pgAdmin window
  • Otherwise the data import complains that those schemas are non-existent
- Red1 20:07, 27 November 2007 (EST)

Growing pains

I see obvious signs of growing pains! ;-)

Should this document be used in preference to instructions found at Installation Steps or is this document a supplement to that one? --Vjg 15:02, 22 December 2007 (EST)

As the title says...

This is a tutorial step by step for Windows XP and PostgreSQL. Maybe the other document is more schematic and formal. Have you problem with this? --Bepivin 09:36, 28 December 2007 (EST)

Titles are almost meaningless without context and currency. I haven't attempted an install with these instructions, but I was quite curious about how this related to the standard installation instructions. Several of the steps presented here appear automated in the standard instructions. Mine is a question of overlap and concurrency. If these are to replace the standard instructions, then I think that should be clearly stated. I didn't see any such definitive statement. --Vjg 21:19, 2 January 2008 (EST)

Problems with PostgreSql 8.2.6

I wish to report that I received a fatal error during PlJava installation with PostgreSql 8.2.6 (I tried on a Windows 2003 Server EE and on a Windows 2000 Advanced Server)

However using PostgreSql 8.2.5 all went well. --danilopompei 17:00, 15 January 2008 (UTC)

My PostgreSql already contains lots of data.. Enormous data

Do i really need to uninstall it? Or is it OK if i could just re.install it?

PLJava No Longer Needed in new ADempiere

Since version 343 and 353 the PG no longer needs PLJava capability. - Red1 05:12, 20 February 2009 (PST)

Edits to bring up to date for 3.6.0.

I've done a through edit of this important page to bring it up to date for 3.6.0, add it to the TOC and link to other install pages to reduce duplication. Below are some of the information bits removed.

Start the Adempiere Java Client

To start Adempiere, you can:

  • Create a start menu item pointing to C:\Adempiere\RUN_Adempiere.bat and then click it.
  • Use the Webstart feature, which is the preferred method for larger installations where the server and client are on different machines. It has the advantage of automatically updating the client software if it has been changed on the server. To use it:
    • In a browser, navigate to http://<your computer name>:<your port number>/admin and click the blue button on the right hand side
    • Note that this admin screen will also have:
      • various HTML interfaces (see Using Adempiere's HTML Client below)
      • Point of Sale (POS) system
      • Webstore
  • otherwise:
    • Open a DOS shell and navigate to C:\Adempiere\
    • Type RUN_Adempiere.bat

You will see either a login screen or a connection setting window:

  • if you have a login screen labeled Connection, the Server will probably be a pink line. This normally means you need to fix some settings However, it may be pink simply because this is your first login. Try to click the green tick and proceed to login. If you can't do this then you will need to click the pink line so the Adempiere Connection window opens
  • if you find yourself at the Adempiere Connection window, enter <your-computer-name> for the Application Host. Click Test Application Server and it should result in a green tick. In addition, it will probably sort out the Database parameters.
  • click Test Database, which should also result in a green tick
    • Vista Users may need to sort out security - if when you Test Application Server you get a green tick but a red cross when you test the Test Database Server, you have a problem with PostgreSQL security on your computer. As a safety feature PostgreSQL will only let you access it if you are NOT an administrator, which helps to stop any hackers in the real world.
      • Solution for Vista users: Make a new user on your computer. Name it "postgres" and make sure its a standard user, NOT ADMIN. Now run the Setup.bat (same settings should still be there). Click save. Then run the RUN_Server2.bat and then RUN_Adempiere.bat. Do the test now and it should work. Also, make sure that your Application server has your computer name (ie Gregs_PC) and the Database server has localhost
  • Select the green tick to close the Adempiere Connection window

Log in to check that everything is working

  • Login to Adempiere as GardenAdmin with password GardenAdmin. As mentioned above, you should be able to simply click the green tick, which may take a few seconds to move on to the next screen. Accept the defaults (or perhaps change the printer) and click the second green tick. Hey presto - the Java Client will open!


Using Adempiere's HTML Client

You can use a Web Browser instead of the Java Client by pointing your browser to: http://<your-computer-name>/admin and selecting the Adempiere ZK webUI option, which will open http://<your-computer-name>/webui

  • On the first login screem enter the following parameters:
    • UserId: GardenAdmin
    • Password: GardenAdmin
  • on second login screen enter:
    • Role: GardenWorld Admin
    • Client: GardenWorld
    • Organisation: HQ (you need to select this from the dropdown box)
    • Warehouse: HQ warehouse (will come up automatically)

Very Important - An ERP system is a journey and not a destination

If you want to keep your Adempiere installation up to date then you need to continue to Patch your Adempiere.

See Patches_Installation for a manual on how to install patches.

Uninstalling Postgres & Adempiere


  • Start Button / All Programs / Postgresql 8.3 /Stop Service
  • Start Button / Control Panel / Add or remove programs / Postgresql 8.3 remove
  • Delete directory C:\Program Files\Postgresql
  • Start Button / Run / cmd enter command net user postgres /delete
  • Start Button / right click My Computer / Properties / Advanced / Environmental Variables / Edit Path to remove entry for postgresql


  • Delete directory C:\Adempiere
  • Delete file C:\Documents and Settings\<your user name>\
  • Start Button / Control Panel / Add or remove programs / Adempiere anything remove

Java Development Kit and Runtime Environment

  • Start Button / Control Panel / Add or remove programs /
    • J2SE Development Kit 5.0 Update xx remove
    • J2SE Runtime Environment 5.0 Update xx remove
  • Start Button / right click My Computer / Properties / Advanced / Environmental Variables:
    • Remove the JAVA_HOME and JRE_HOME variables
    • Edit Path to remove entries for jre

old notes

However, you may need to do the following things first:

    • If you are re-installing a fresh version of Postgresql then remove various files and the postgres user - see Uninstalling Postgres & Adempiere below (however, do not remove the path reference in Environmental Variables).
    • If you are using Vista then you need to deactivate User Access Control from Control Panel and install PostgreSQL by right clicking and selecting Run AS Administrator. If you don't have "Run As Administrator" on the context menu, then install the following registry fix:

Step 5

Steps 5 & 6 are only for PostgreSQL 8.1 or earlier and where PL/Java has not already been installed.

Edit file C:\Programmi\PostgreSQL\8.2\data\postgresql.conf (C:\Program Files\PostgreSQL\8.2\data\postgresql.conf). Add the following lines:

International Version (POSTGRESQL 8.2 version adds the first 3 lines by default during Postgresql installation)

custom_variable_classes = 'pljava'
pljava.classpath = 'C:\\Program Files\\PostgreSQL\\8.2\\share\\pljava\\pljava.jar'  
pljava.release_lingering_savepoints = true
pljava.vmoptions = '-Xmx64M -Dbackchannel.port=48'
pljava.debug = false

Italian Version

custom_variable_classes = 'pljava'
pljava.classpath = 'C:\\Programmi\\PostgreSQL\\8.1\\share\\pljava\\pljava.jar' 
pljava.release_lingering_savepoints = true
pljava.vmoptions = '-Xmx64M -Dbackchannel.port=48'
pljava.debug = false
  • Connection Settings (* indicates listen for connections on all hosts, remember to specify the host ip addresses in pg_hba.conf file, otherwise you will get database connection refused error while installing adempiere, this option is set by postgresql installation if it this option is selected in version 8.2 during the installation)

listen_addresses = '*'



host all all trust
host all all trust

Step 6

Stop and restart PostgreSQL

Old notes - may not be relevant

  • From go to the section Detected installation problem in postgresql 8.3.5 and download the necessary substitution files to your desktop (this is very important)
  • Again from pick the link to Adempiere scripts and download the latest Adempiere scripts. NOTE: Be sure to get the scripts from the postgresql sub-directory rather than the directory you first see when you click the link! For the most recent version of each script, click download and save the resulting page to a new folder C:\adscripts. The browser's Save should automatically keep the right name for you. After downloading all the scripts, rename each of the files as just <number>.sql, for example 372.sql (Additional note for clarification: you do not need the migration script from 3.4.0 to 3.4.2 for a fresh installation.)

  • Copy the substitution files that you downloaded above in respect to Detected installation problem in postgresql 8.3.5 from your desktop to C:\Adempiere\utils\postgresql where these new files will overwrite existing files

Establish the Initial Adempiere User & Database

Open pgAdmin III from Start Button / PostgreSQL / pgAdmin III

Right click on the Postgresql database server you want to use for ADempiere and select connect. Enter the password postgres (or whatever you used as the superuser password) & tick the save box.

Note.gif Note:

If you forgot the password, you're out of luck. Uninstall the software and try again but, this time, write it down.

Now, in pgAdmin III, expand the database server tree by clicking the plus-sign.

Ss pgAdminIII noadempiere.jpg

Down the bottom, you will see a user called "postgres".

Caution.gif Caution!

Do not modify the "postgres" user. This is the default administrator of all the postgre databases. It will be used during ADempiere server setup where you will need to enter the login for this user.

Right click on "Login Roles" and create a new user. In the Properties tab, create the user "adempiere" with a password "adempiere". (You can/should change this to something more secure later.) In the Role Privileges tab, uncheck Inherit Rights from parent roles and check Superuser and all boxes below Superuser.

SS postgre NewLoginRole Properties.jpg SS Postgre NewLoginRole RolePrivileges.jpg

Now return to Database at the top and right click. Select create database. Name it "adempiere" and select the owner "adempiere" and encoding "UTF8" (see image below). Leave all the other variables blank.

Ss postgres newdatabase properties.jpg

Note.gif Note:

If you installed PostgreSQL 8.2.1 (or earlier) without PL/Java then Skip to the bottom for additional info.

Load the Initial Adempiere Database Data

Open a DOS shell with Start Button / Run / Open: cmd

Navigate to C:\Adempiere\data

Run the following command:

psql -U adempiere -d adempiere -f Adempiere_pg.dmp >> dump_errors.log
Note.gif Note:

You will be prompted for the password for the adempiere user for each command.

This command imports the ADempiere database. This is critical as you can not setup the application without it.

The import will take a few minutes to run and there should be no errors. If you observe errors, you can find out what went wrong by inspecting the file dump_errors.log

Note.gif Note:

If you are restoring or duplicating an installation, you can replace Adempiere_pg.dmp with ExpDat.dmp - the database export file from the original installation. The software versions should be the same or you will have to apply database migration scripts to bring the database to the same version as the software.

Migrate the Database

Common Reasons for errors during setup

  • Make sure you follow every instruction exactly because there are many small details that must be correct!
  • Error on JDK: install JDK (the JRE is not sufficient!)
  • If you change your Java then make sure you change the Environmental Variables JAVA_HOME, JRE_HOME, the two (or three) references in PATH, and the RUN_setup.bat "Java Home"
  • Web Port: probably port 80 is already used by other web server. You can use something like 8080 or 8088 (and correspondingly 8443 for the secure port)
  • If you get "Error Database Port (DB Server Port = 5432)", change the 'Database Server' from <your-computer-name> to localhost. The alternative is to use a fixed IP address on your server or desktop and put this address in the Database Server, or if you have a laptop then you need to install a loopback adapter
  • If you move the Adempiere directory (or update Adempiere) after already executing RUN_setup.bat, then you should delete the file in C:\Documents & Settings\<your-user-name>
  • If you did not include in your path C:\Program Files\PostgreSQL\8.3\bin , then at Step 7 you will need to replace the psql command with:

International Version

C:\"Program Files"\PostgreSQL\8.3\bin\psql

Italian Version


German Version