Creating WebUI Workspace using Eclipse Webtool

From ADempiere
Revision as of 12:40, 19 May 2013 by Enrique Ruibal (Talk) (Debugging the ZK webui)

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

Debugging the ZK webui

Note.gif Note:

Download Eclipse Indigo - IDE for Java EE Developers

It is recommend to use Eclipse Indigo because with the other versions, people have experienced different issues regarding classpath and eclipse WTP plugin. Go with the J2EE edition to skip all other plugin installs. If you are going to configure it first time then it is better to use Tomcat 5.5.

UPDATE: It seems now the tools how evolved and it is recommended to use Eclipse Juno, specifically Java EE IDE for Web Developers, also use Tomcat 6.0 instead of 5.5, and latest oracle Java JDK 1.6.0.XX


Overview

Eclipse Webtool support is added at revision 5969 in branches/stable and 5967 in branches/adempiere341 for the single ADempiere project setup workspace. This additions allows you to run or debug the Zk web client using Eclipse webtool (Europa JEE and above ) and Apache Tomcat. You can verify that everything is in place by checking the project properties:

  • Project Facets (do not change anything here.)

Project Facets.jpg

  • Web Project Settings

Web Project Settings.jpg

Install Tomcat Runtimes

First, you need to install a Tomcat runtime for the deploying and running of the zk Web Client. Use Tomcat 5.5+

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.

Installed Runtimes.jpg

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. New Server.jpg

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

Define a New Server.jpg

  • Add your project to the server instance to be created

Add Project.jpg

  • 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.

Start Server.jpg

Define location of ADempiere property file and ADempiere home

Now you have to define the location of your existng working 'Adempiere.properties' 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 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:

Tomcat Run Profile.jpg

Hengsin 01:11, 4 August 2008 (EDT)

To avoid the problme "NoClassDefFoundError" you need to following the guidlinse suggested below in 'Trouble Shooting'. So, first follow that instruction, before you debug the zk webui.

Trouble Shooting

I had a problem to start Tomcat with "NoClassDefFoundError". Missing class path to adempiere jars. Solved by editing run configuration. Go to classpath section at user entries add external libs from tomcat\lib (or tomcat\server\lib) 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
    • Adempiere Project
    • Adempiere Libraries

WebUI Classpath.png

See Also