Posts in Category: web ui


Debugging allows you to run a program interactively while watching the source code and the variables during the execution.

By breakpoints in the source code you specify where the execution of the program should stop. To stop the execution only if a field is read or modified, you can specify watchpoints .

Breakpoints and watch points can be summarized as stop points.

Once the program is stopped you can investigate variables, change their content, etc.


Now once the environment is set up in Adempiere we need to start the Product in Debug Mode of Desktop UI. In order to do that you must follow the following steps:-

  • Right Click on the Project and select the Debug As and Debug on Server which has Tomcat already selected.


  • When we have entered the Debug Mode, the First Class that comes up is Adempiere Class.
  • In Case of WEB UI it goes to Web UI which is the class for zk Web UI
  • Then the Login Page Opens Up, now in Order to debug we need to apply debug points which signify that the compiler needs to stop here while processing the code and wait for the user confirmation such that the code stops at that point.
  • We can Apply Debug points by double clicking on the code such that the Debug Point is created and once in Debug Mode the compiler will stop there.
  • Eclipse provides buttons in the toolbar for controlling the execution of the program you are debugging. Typically it is easier to use the corresponding keys to control this execution.
  • You can use the F5, F6, F7 and F8 key to step through your coding. The meaning of these keys is explained in the following table.


Table 1. Debugging key bindings / shortcuts

Key Description
F5 Executes the currently selected line and goes to the next line in your program. If the selected line is a method call the debugger steps into the associated code.
F6 F6 steps over the call, i.e. it executes a method without stepping into it in the debugger.
F7 F7 steps out to the caller of the currently executed method. This finishes the execution of the current method and returns to the caller of this method.
F8 F8 tells the Eclipse debugger to resume the execution of the program code until is reaches the next breakpoint or watch point.
  • The following picture displays the buttons and their related keyboard shortcuts.



  • The call stack shows the parts of the program which are currently executed and how they relate to each other. The current stack is displayed in the Debug view.


  • Changing variable assignments in the debugger

The Variables view allows you to change the values assigned to your variable at runtime. This is depicted in the following screenshot.


  • Now when we enter in Debugging Mode some classes need to be remembered in order to debug the code. For Instance we need to start with the Generic Class
  • Start by applying debug mode in the Web UI Class in the Init() such that the compiler stops in the method and Debug Mode is present.
  • Once in the class u can use F5, F6, F7 and F8 key to step through your coding and go through the flow.


For Different Processes and Windows we need to have multiple processes or classes such that when we need to Debug the process we call that Class.

The index for such is as Follows:-

Class in Eclipse Process Material Receipt, Shipment(Customer), Vendor Return, Customer Return, Purchase Order  &  Sales Order,

Invoice (Vendor) and Customer (Invoice) 

For Calculating Invoice Tax. Business Partner in Adempiere Login Class For Adempiere  such that while in case of change of login page or anything else in Login To change the Menu Entries we need to change the class when we need to add entry in the Adempiere ERP. To make Menus in WEBUI and add buttons. Create batches in WebUI and edit and add CodeCreate Inventory Batches in Physical Inv and Internal Use Inventory Debug this Class for adding buttons and defining where buttons go on click. To Add Products such and define parameters in it. Inventory Management such that,  Inventory and line Qty are Managed Processing Returns such that , both Customer RMA and Vendor RMA are created here. To Process Payments,  and to Allocate Payments to the InvoicesAllocate Payments , to the Invoices


  • If u need to debug these Processes u need to Apply Debug Points in the respective classes such that to change code there.
  • If u need to search any class in Eclipse u need to use the combination of Ctrl+Shift+T and enter the class name.
  • Use * with the name to increase your search criteria.
  • If u need to skip Debug points u can use the Button on the top of eclipse which looks like this    image008
  • Until unless u release this button the Debug won’t work.
  • Some Classes here as different from Desktop UI such that, in batch module in case of Desktop we have while in case of Window we have due to difference of frameworks.



-By Adempiere Support {India Portal}

Read More


Files Needed:

  1. Apache Tomcat 6.0.41 (Or Any Version)
  2. Eclipse – IDE for Java EE Developers
  3. System Browser



  1. Install Tomcat Runtimes
    1. First, you need to install a Tomcat runtime for the deploying and running of the zk Web Client. Use Tomcat 5.5+
    2. To install a new Tomcat runtime, open the preferences dialog Window->Preferences and select the Server->Installed Runtimes. Use the Search button to locate your tomcat installation home folder.


  1. Define a New Server

At the Servers view, right click to open the context menu and select New->Server.

If server view is not visible then you can use Window→Show View→Others … to open it. 


  1. Select the correct server type and the server runtime you have setup earlier.


  1. Add your project to the server instance to be created


  1. The created server instance is now ready for use. Just Start the server once and then stop it. Do not try to debug it at this moment.


  1. Define location of ADempiere property file (NotePad File …available in your base folder )and ADempiere home (Place where your code is kept)


Now you have to define the location of your existing working ‘’ file and ADEMPIERE_HOME as system parameter for your Tomcat Instance. To do so, select Run->Open Run Dialog… and select the server instance you have created.



Note that the entries for your server instance in the Run dialog will only be created after you have start it for at least one time. Select the arguments tab and append your property file path and home parameter at the end of VM arguments.

It is highlighted in the pictures below:



  1. In Run Config Add in it in the same series, do not change the series.

Go to classpath section at user entries add external libs from tomcatlib (or tomcatserverlib) than add project – AdempiereTrunk

Apache jars needs to be at the first place in the classpath. See the image carefully along with the description below.


  • Bootstrap Entries
  • JRE Library
  • User Entries
  • tomcat_dir/bin/*.jar
  • tomcat_dir/server/lib/*.jar
  • E2 Project or Trunk
  • Adempiere Libraries i.e. add jasperreport 5.6.0 jar, if not available download, it from Internet


  1. Now Run in Debug Mode, by Right Clicking on the  Project and selecting Run in Debug Mode
  2. Choose the Browser such that, the browser can be used internal or External Browser.
  3. In case Run of the Project in WebUI, right Click on the project and select run project on Web Server.
  4. Your Version will then open in Debug Mode and in order to learn debugging do follow the next document on Debugging.



  1. If u need to change the Database of the WebUI you can do by Changing in the Adempire Properties File , just replace the Username and Password.
  2. Run Configuration is not created till u once start and stop the server.
  3. If your Build is getting failed , observe the errors completely such that you should know which WEB classes are interacting with Desktop Classes and separate them.



-By Adempiere Support {India Portal}

Read More