Posts in Category: ad

Application Packaging Enhancements – With Packout and Patch

Basic Introduction of PackIn and Pack Out

Pack In and Pack Out are the two features Adempiere provide so as to migrate objects from one Client to another. These modules can be ranging from a simple Reference Object to a Complete Module of the project which needs to be exported to the new client.

2 Pack runs with simple concept of export and import, where required data will be exported from source environment and it will be imported into target environment. In Adempiere, export of data is called ‘Packout’ and Import of data is called in ‘Pack in’. In this document often we will be using these words.

Here if we will take a look at the Pack out Module we will notice that on the main header tab we have fields for the name and other area as follows:-

pic1

Here as we can see we have the module name filled in the Header Tab and we define the path of the creation of Packout Module here.

We also define the Packout Version here , displaying what is the vesion of the module we are packing out.

Once Header line is created we need to create the detail line in the Packout tab as follows:

pic2

In this Pack out Module we have Provision to Pack Out the following objects:-

 

  1. Application or Module – Exports the complete module which is not present in the new Client
  2. Code Snipit – Exports the Code Snipit, Identifies the old code and replaces with the new code.
  3. Data – Exports the data in the tables such that we have the data in the new table of the Database.
  4. Dynamic Validation Rule – Exports the Dynamic Validation Rule of the Adempiere
  5. Entity Type – Exports the Entity Type to the new Client.
  6. File Code or Other – Exports File Code with Source Code and Target Directory and Source Directory
  7. Form – Exports the Form such as POS Form into some new Client which doesn’t has the POS form or any other form available.
  8. Import Format – Exports the Import Format of the Module which is used to import the Files in Adempiere.
  9. Message – Exports the Message from one client to another.
  10. Model Validator – Exports the Model Validator of the Adempiere such that new Model Validator is created in the new Client.
  11.  Print Format – Exports the Print Format of the Report from One Client to Another
  12. Process/Report – Exports the Report or Process from one Client to another.
  13. Reference – Exports the Reference from one Client to another.
  14. Report View – Exports the Report View from one Database to another or one client to another.
  15. Role – Exports the Complete Role from one DB to another
  16. Rule Engine Packout – New Export Added for Exporting the Rule Engine Rule from one DB to another, includes Callout too.
  17. SQL Statement – Exporting SQL statements based on the DB Type in the new DB from the old DB.
  18. Table – Exports the Table from one Module to another such that all the Columns are exported to the new Table.
  19. Window – Exports the Window in Adempiere such that all the Tabs and Fields are exported to the new DB and we get the new Window in the new Module
  20. Workbench – Exports the Workbench in Pack out Module such that new Workbench is created.
  21. Workflow – Exports the Workflow created and stored in the new DB.

 Enhancement in the Packout Module

As shown below following are the Modules that are available for Pack Out and we will study about the new module developed in deep:

pic3

The new added is the Rule Engine Packout added in the Package Details tab which will export the Rule Engine:

 

For Exporting we just need to select the corresponding rule and add in the detail tab and it will be exported.

pic4

 

 

Points to Remember while Pack Out and PackIn in Adempiere

  • While PackIn we need to check the Update System Application Dictionary Checkbox such that all the Dictionary elements are also created in the PackIn Stage.

 

  • While Exporting a Module we need to take care all the modules needed with that module are collaborated in the Packout Details Tab.

 

  • For e.g If there is a Callout used in the Document Management Module and we need to export the complete Module then that callout should also be added in the Packout else Incomplete Module will be Packed Out leading to non functioning of Module.

 

The Exact Packout for the enhancement and Code  Patch for the above functionality is given below. Please stay in touch.

Application Packaging Enhancements

For Using: Just PackIn the Packout after ticking Update System Application Dictionary also and Place the patch in patches folder and run setup or silent setup again and we will get the desired changes on our System.

 

 

                       -Adempiere Support {India Portal}

Read More

Tracing Errors in Adempiere and Correcting them!

[divider]

Errors in Setup

The following errors can be faced while Setup and given are the ways to correct them:

  • Application Server or Database Server is the name, URL or IP of your server PC.
  • JNP Port = 1099 error means that a previous service is running. Kill it. Also, since this is the first port that is tested, it could also mean that you have a mismatch between your host name (in the hosts file) and your actual IP address. Fix it in “/etc/hosts” (linux)
  • Database Port = 1521 error can be solved by restarting DB machine.
  • System & Database Passwords are those defined when you setup your Database.
  • Mail Server is optional. RUN_Setup can still finish without it.

[divider]

Java Home Error

The error faced when u click on Test

If you receive the following message:

image001

You should check your java environment variables. Check that the JAVA_HOME system environment variable points to the correct directory. Set the PATH in such case and if everything fails try to install JAVA again. The error should be removed in such case.

[divider]

Web Port Error

If you receive the following message from the installer:

image003

it is likely that you have some other web server running or, if you are using Linux, you need the appropriate privileges.

The default ports are: 80 for http connections and 443 for SSL connections. This message means that the user is not allowed to use the port, likely because it is already used by another application. Change the port to something else. Web Port 8088 and SSL 4443 are recommended. If you are using Linux, remember that ports under 1000 need root privileges. If you are using Oracle database, port 8080 might be used.

[divider]

JNP Port 1099 Error

Another possible error is Server Setup Error JNP Port (Not correct: JNP Port = 1099) OK

The JNP Port = 1099 error can be caused by another process which is already attached to that TCP port. Take a look what process is using this port and so you can take steps to stop it. It can also be caused by a mismatch between your IP address and the entry in your hosts file.

[divider]

JNP Name Not Found Exception

This error is usually related to a DNS problem. It is possible to complete the setup using IP addresses when installing with PostgreSQL. Make sure you have a working DNS environment or add an entry in /etc/hosts(linux) or %SystemRoot%/system32/drivers/etc/hosts(windows).

[divider]

Errors Faced in LinuX

  1. When deploying build on Linux and faced any unknown Exception like some java Jar missing in deployment , re install the JAVA as it is the only way out for the problems with the missing JAR’s .

Such Errors are faced due to discrepancy in JRE and JDK of Java, or only JRE is installed and hence error is coming. ReInstall the JAVA and such errors will be removed.

  1. In case of Software on Linux we need to take care that complete commands must be executed i.e rpm must be executed in case of Linux in rpm files and for further commands Google can be referred.
  2. In case of errors faced in the linux Distro stick to the community for genuine Solutions and remedies.
  3. Before Solving or searching for any error make sure that the environment is correct and all the PATH of the variables are correctly set. This can be achieved by the following commands:
    1. Find JAVA version by the following command in linux or windows

                  i.      java –version

  1. Make sure that the JAVA version is greater than or equal to 1.6.0.45 .
  2. If JAVA version is less than mentioned version , make sure that latest version of Java is installed on client system
  3. Once JAVA is installed if we are still getting the version as 1.5.0 or anything else less than 1.6 we need to do the following:

                            i.      IN WINDOWS

  1. Set the path for the latest version of JAVA by right clicking the My Computer and hence changing the variable.

                          ii.      IN LINUX

  1. Go into the directory of new installed JAVA

[root@localhost /]# cd usr/java/jdk1.6.0_45/

  1. Once u are in directory you need to run the following command

[root@localhost jdk1.6.0_45]# alternatives –config java

  1.  This will provide us with all the options of java installed, if the current java i.e the latest version of JAVA is not shown then do the following:

[root@localhost jdk1.6.0_45]# alternatives –install /usr/bin/java java /usr/java/jdk1.6.0_45/bin/java 2

4.   This will give the following screen to us: Select the new version of JAVA here

[root@localhost jdk1.6.0_45]# alternatives –config java

There are 2 programs which provide ‘java’.

  Selection    Command

———————————————–

*+ 1           /usr/lib/jvm/jre-1.5.0-gcj/bin/java

   2           /usr/java/jdk1.6.0_45/bin/java

 

Enter to keep the current selection[+], or type selection number: 2

 

  1. Run the following commands after wards to set the JAVA_HOME and PATH Variable

[root@localhost jdk1.6.0_45]# alternatives –install /usr/bin/jar jar /usr/java/jdk1.6.0_45/bin/jar 2

 

[root@localhost jdk1.6.0_45]# alternatives –install /usr/bin/javac javac /usr/java/jdk1.6.0_45/bin/javac 2

 

[root@localhost jdk1.6.0_45]# alternatives –set jar /usr/java/jdk1.6.0_45/bin/jar

 

 [root@localhost jdk1.6.0_45]# alternatives –set javac /usr/java/jdk1.6.0_45/bin/javac 

  1.   If we run java –version now we see the changes in the version and it will give 1.6.0.45.
  2.  In case of all the software which work on JAVA jar files , in case of any error first check the java version and environment variables.
  3. In Order to set Permgen Variable in linux we need to edit the run.sh file and run.conf file .In run.sh file we need to add the following line after the Ipv4 line.
  4. In order to find the IPv4 line , search IPv4 in run.sh file and add the following line after it.

JAVA_OPTS=”$JAVA_OPTS -XX:MaxPermSize=256m”

  1. Once the following line is added in the run.sh file then the Perm Size is increased to 256 MB, which prevents the Out of Memory: Permgen Space error.
  2. In case of Setup screen not shown while deploying build, the root cause of such error is invalid java home. Check the JAVA_HOME variable from the error console and correct it.
  3. Such Error can be found in the error console window, cut copy that path and try running on CMD to find the validity of the path.
  4. In such a case Export the JAVA_HOME again and correct the entry.
  5. Do close all the old Console Windows as they will show the old JAVA_HOME, in order to find out whether or not the JAVA_HOME is changed , open a new console and writeecho JAVA_HOME.
  6. While using the Linux Setup do note that in order to run the files, the specified command must be run to make the command run. For e.g.

sh ./<File Name or Process Name with extension>

  1. While running a JAR File like SyncMan , the following command will be used

Java –jar <Filename.jar>

  1. If faced access errors do make all the files executable in linux which can be done by the following command

chmod 0755 *.sh

 

 

 

 

 

                -Adempiere Support {India Portal}

Read More

Enterprise 2.0 Window Customization Module

The customization values defined here overwrite/replace the default system definition if defined.

In this module we learn how to customize the windows of Adempiere and grant or revoke access of any user or any role to any Window or any Tab or to any field.

The Customization is up to such an extent that admin can restrict the excess of user to any tab in a Window and rest all tabs can behave normally with all the functioning possible.

image001

Using Window Customization Module:-

  1. Open Window Customization module in E2, and select either Role or User.

NOTE: You cannot select both Role and User in Window

  1. Select Window Name from dropdown and insert name in field and select if you want to impose any check on the Window level.
  1. The following tick boxes are same in Window  level and Tab level such that and the purpose for the tick boxes are also same in Tab Customization tab and will be explained earlier.
  1. Ticking any box will enable the following on the Window Level.

 

   

BUTTON

FUNCTION

  1. Restrict New
Restricts New Button in the selected Window
  1. Restrict Delete
Restricts Delete Button in the selected Window
  1. Restrict Save and Update
Restricts Save Button in the selected Window and even restricts auto save and auto update in E2
  1. Restrict Delete All
Restricts Delete All Button in the selected Window
  1. Restrict Report
Restricts Report Button in the selected Window
  1. Restrict Print
Restricts Print Button in the selected Window
  1. Restrict Export
Restricts Export Button in the selected Window

 

  1. Following is the Tab Customization Window in which we can select the tab which is related to the windows selected and select the tick box

image003

  1. If any tab level customization is needed then we can apply this in here and rest tabs on window go on unchanged.
  2. Following is the Field Customization Window in which we can select the Field which is related to the tab selected and select the tick box

image005

 

   

BUTTON

FUNCTION

  1. Hidden
Restricts Display of Field in the tabAnd makes it hidden
  1. Read Only
Makes Field Read Only in Tab and Window

 

  1. Select the field to be customized for the user and apply the corresponding check on the field.
  2. Once we save the record for the user or the Role the changes are applied instantaneously and opening a window after saving will reflect all the changes in the window.

 

The Exact Packout for the Window Customization and Code  Patch for the above functionality will be added soon. Please stay in touch.

 

 

 

          -Adempiere Support {India Portal}

Read More