Skip to main content

Posts

MySQL Clustering

MySQL Cluster is a technology for automatically shared database management system. i.e this technology create two or more replicas of the same data base in different nodes.  Basically mysql clustering is asynchronous communication technology. The basics steps for establish mysql clustering is given below: Step 1:  Download supported version of mysql clustering installation zip file from       http://www.mysql.com/downloads/cluster/ Step 2:   Extract the zip file and copy the contents inside the folder to  c:\Users\user1\mysqlc Step 3: Run the command prompt window as administrator role, And execute the following commands for create clustering directories     C:\Users\user1> mkdir my_cluster my_cluster\ndb_data my_cluster\mysqld_data my_cluster\conf C:\Users\user1> mkdir my_cluster\mysqld_data\mysql my_cluster\mysqld_data\ndbinfo my_cluster\mysqld_data\performance_schema Step 4: Create configuration files for clustering; here I am using two systems

Schedule Backup using DBExport from Adempiere ERP in Windows OS

Scheduled Backup from Postgres using pgagent is possible , but the size of Backup file generated is very large compared to that generated from Adempiere using DbExport.bat. Creating Backup from adempiere by scheduling running of RUN_DBExport.bat from adempiere periodicaly using windows task scheduler is a viable solution. There are few bat files that need to be changed * E:\Adempiere\utils\myDBcopy.bat * E:\Adempiere\utils\RUN_DBExport.bat * E:\Adempiere\utils\postgresql\DBExport.bat In the above case  "E:\Adempiere\" is the path of Adempiere home where it was build. Make necessary changes as needed. NB: The environment variables are to be set properly in "Computer>properties>Advanced System Settings>Advanced>Environment variables "so as to make the following steps work. First file  to be changed is E:\Adempiere\utils\myDBcopy.bat Here change "set DATETIME=%date:~6,4%%date:~3,2%%date:~0,2%_%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%"

Deploy ADempiere reports as attachment

You can now deploy the jasper report source (.jrxml) or compile file (.jasper) as attachment  to the jasper report process . Use the special syntax  attachment:reportFileName  ( for e.g, attachment:standalone.jrxml ) to indicate the jasper report file that should be loaded from the process's attachment. If subreport and properties resource file is use, you need to upload those as attachment to the same process as well.

Tuning postgresql for better performance - ADempiere ERP

PostgreSQL is a highly customizable relational database management system (RDBMS) with a dazzling array of configuration options.   The postgresql.conf file is located in the \PostgreSQL\9.x\Data folder. You can tune the following sections of the postgresql.conf file to get the best performance.     CONNECTIONS AND AUTHENTICATION In this section change the following entries to the following: max_connections = 350 authentication_timeout = 7min RESOURCE USAGE (except WAL) In this section change the following entries to the following: shared_buffers = 256MB : PG Backends that need to access tables first look for needed blocks in this cache. If they are already there, they can continue processing right away. The change can be made with a   postmaster  command-line flag or by changing the value of   shared_buffers temp_buffers = 32MB max_prepared_transactions = 20 work_mem = 1024MB maintenance_work_mem = 1024MB QUERY TUNING effective_cache_size = 2048MB R

Send Email Through Adempiere ERP

Send Email Through Adempiere E-Mail Configuration in Adempiere Mail Server This will specify the mail server to use Default: mailserver.(domain portion of %{serverFQDN}) Example: smtp.gmail.com Admin Email Use the default administrative mail address and it can be overwritten on client level Default: adempiere@(domain portion of %{ serverFQDN}) Example: teksalahadempiere@gmail.com Mail User Here we specify user of the default mail account Default: adempiere Example: teksalahadempiere Mail Password The password of the default mail account Default: adempiere Example: ********** 1    2.     Configuring Email in the client window The Client Definition Tab defines a unique client Step 1 .Login as admin Step  2 . Go to Menu -> System Admin -> Client Rules -> Client. In tab client fill fields’ mail host, request email request user and request user password. Finally press Test Email Button

Adding privilege for PostgreSQL to access the databases from any point in network

In my local network each machine may have PostgreSQL database. For accessing the PostgreSQL databases in one machine to any machine, we need to add some permissions to the PostgreSQL configuration file. For accessing PostgreSQL databases in Machine1 to Machine2, we need to change the file pg_hba.conf (C:\Program Files\PostgreSQL\9.2\data). The changes are the following : Add the line on IPv4 local connections : host    all             all             0.0.0.0/0 trust Hence the final code as : # IPv4 local connections: host    all             all             127.0.0.1/32            md5 host    all             all             0.0.0.0/0 trust The file pg_hba.conf has attached here. Just replace the file in the location  C:\Program Files\PostgreSQL\9.2\data. # PostgreSQL Client Authentication Configuration File # =================================================== # # Refer to the "Client Authentication" section in the PostgreSQL # documentation for

Sending SMS using java code and Clickatell API

ClickatellSMS .java /**  * For executing the code you may need the following requirements 1. Clickatell  * account : You may have a user name, password and an API id. 2. Need to import  * two external jar files i. smsj-20051126.jar (Source :  * https://sourceforge.net/projects/smsj/files/) ii. slf4j-simple-1.0-beta4.jar  * (Source :  * http://www.findjar.com/jar/org/slf4j/slf4j-simple/1.0-beta4/slf4j-simple  * -1.0-beta4.jar.html;jsessionid=74226B10CDFB28C183745181681836C7)  */ import java.io.IOException; import java.util.Properties; import org.marre.sms.SmsAddress; import org.marre.sms.SmsException; import org.marre.sms.SmsTextMessage; import org.marre.sms.transport.SmsTransport; import org.marre.sms.transport.SmsTransportManager; public class ClickatellSMS { /** * @param args */ public static void main(String[] args) { // The username, password and apiid is sent to the clickatell transport // in a Properties Properties props = new

How can I change appearance of ADempiere ERP webui login page?

In trunk/zkwebui/theme/default there are a couple of files: login-left.zul, vendor-logo.zul, version-info.zul etc. File version-info.zul contains the server info data. You can change these files so the login page appears as you please. In file vendor-logo.zul there is the possibility of customization to own logo, links etc. Configuring the files in trunk/zkwebui/theme/default enables you to change the appearance of the webui login page to your needs. A build is needed.

Message box in ADempiere ERP

ADempiere have its own standard in its pop up messages. Normally we can use JOptionPane provided by  java. But you need to compromise its look and feel in your application. The following are the commonly used pop up box menthods in ADempiere in different instances. 1. mTab.fireDataStatusEEvent("Already open access","message",true); Used in callouts. 2. log.saveError("Invalid Date", message); Used in model classes. 3. ADialog.error(m_WindowNo, this, "FillMandatory", sb.toString());             return false; Used in client classes. If it is used in the higher build priority classes, you may have build error. 4. throw new IllegalStateException("Could not create accrual entry"); Used to throw exceptions in your code.

Adempiere Schema Diagram

From the below mentioned link, you may get the entire table schema in adempiere. http://globalqss.com/idempiere/1.0c/schemaspy/MaterialManagement/relationships.html

Cleanup of Ant build scripts

ADempiere 370LTS contains the following Ant build scripts which are required to build the entire system: tools/build.xml base/build.xml extend/build.xml client/build.xml JasperReports/build.xml serverRoot/build.xml serverApps/build.xml webStore/build.xml webCM/build.xml sqlj/build.xml posterita/posterita/build.xml zkwebui/build.xml install/build.xml More details in the following link http://www.adempiere.com/FR3409987_Cleanup_of_Ant_build_scripts

To add a external jar to ADempiere ERP

1. Get the jar file 2. Edit the Adempiere370\tools\Build.xml 3. Copy the jar file to Adempiere370\tools\ 4. Add the code fragment in the xml file     both in CSTools and CCTools eg:     <!-- Joda                -->     <zipfileset src="lib/joda-time-2.3.jar">         <patternset refid="manifest.exclude" />     </zipfileset> 5. If we are using the jar objects in base, client or zkwebui, edit respective build.xml files

To Debug Adempiere Web UI or Server

1. Open Adempiere\jboss\bin\run.bat 2. There is a command "rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%" 3. delete "rem" from the code , So server will listen to the port 8787 4. open eclipse -> Debug Configuration -> Remote Java Application , Then, create a new configuraion, Give the configuration name : 'AdempiereWeb'(anything) Give the Project Name, Connection Type : Standard(Socket Attach) Host : localhost Port : 8787 5. Run Adempiere370\utils\RUN_Server2.bat It will start and waiting to the response from the port 8787. 6. Debug the 'AdempiereWeb' configuration 7 set the debug break points on the class, It will detect the break points ; DONE

Installing ADempiere 3.7.0 on Ubuntu 11.04

Installing ADempiere 3.7.0 on Ubuntu 11.04 This is a simple how to install ADempiere 3.7.0 on Ubuntu 11.04. There are alot of installation How-To's, the reason I believe this might be useful is that the new 3.7.0 has some little twist in the installation and lots of the installation manuals here in the wiki are outdated. I will keep it as simple as possible to allow anyone new to ADempiere and even to Ubuntu to be able to get ADempiere running. Contents   [ hide ] 1   OS Installation 2   ADempiere Pre-Installation Routine 3   PostgreSQL Installation 4   ADempiere Installation 5   ADempiere Start OS Installation Install Ubuntu 11.04 directly on a PC or as a VM. During the installation, set "adempiere" as the username, that will make things a bit easier later on ADempiere Pre-Installation Routine After the installation finishes, lets get going with downloading the needed files. Open a Terminal Screen and type the following: wget http: