Novell Home

Remote Debugging iManager with Eclipse

Novell Cool Solutions: Feature
By R Sathish

Digg This - Slashdot This

Posted: 11 Oct 2004
 

The first 3 steps are the same as in "Launching iManager from Eclipse".

1. Create a Java project
  1. File -> New Project -> Java Project
  2. Enter name "iManager 2.5" -> Next
  3. Add source files to work area.
  4. Link to VCS work area - Please see my article on linking IDE and Work area

2. Create iManager 2.5 library
  1. Libraries -> Add Library -> User library -> Next -> User libraries -> New
  2. Enter name as "iManager 2.5

3.  Add jars (Beware of a defect in Eclipse 3.0 RC3 which crashes Eclipse while pointing the mouse over a file name. Use Ctrl+A instead.)

Add all jars in
TOMCAT_HOME\bin\
              bootstrap.jar
              commons-daemon.jar
              tomcat-jni.jar
TOMCAT_HOME\server\lib\
                      catalina-ant.jar
                      catalina.jar
                      commons-beanutils.jar
                      commons-digester.jar
                      commons-logging.jar
                      commons-modeler.jar
                      jaas.jar
                      jakarta-regexp-1.2.jar
                      mx4j-jmx.jar
                      mx4j.license
                      servlets-cgi.renametojar
                      servlets-common.jar
                      servlets-default.jar
                      servlets-invoker.jar
                      servlets-manager.jar
                      servlets-ssi.renametojar
                      servlets-webdav.jar
                      tomcat-coyote.jar
                      tomcat-http11.jar
                      tomcat-jk.jar
                      tomcat-jk2.jar
                      tomcat-util.jar
                      tomcat-warp.jar
TOMCAT_HOME\common\lib\
                      activation.jar
                      ant.jar
                      commons-collections.jar
                      commons-dbcp.jar
                      commons-logging-api.jar
                      commons-pool.jar
                      jasper-compiler.jar
                      jasper-runtime.jar
                      jdbc2_0-stdext.jar
                      jndi.jar
                      jta.jar
                      mail.jar
                      naming-common.jar
                      naming-factory.jar
                      naming-resources.jar
                      servlet.jar
TOMCAT_HOME\webapps\nps\WEB_INF\lib\
                               AdminNamespace.jar
                               cos.jar
                               eMFrame.jar
                               iManagerBase.jar
                               iManagerBaseExt.jar
                               iManTagLibrary.jar
                               imap.jar
                               jaxen-full.jar
                               jcert.jar
                               jcifs.jar
                               jclient.jar
                               jdom.jar
                               jnet.jar
                               jsso.jar
                               jstl.jar
                               ldap.jar
                               ldapbp.jar
                               local_policy.jar
                               LogEvent.jar
                               NetComponents.jar
                               NMASToolkit.jar
                               novbp.jar
                               nps.jar
                               observer.jar
                               pop3.jar
                               rbsCore.jar
                               saxpath.jar
                               smtp.jar
                               snmp2.jar
                               standard.jar
                               sunjce_provider.jar
                               US_export_policy.jar
                               WebServiceSDK.jar
                               xp.jar
                               xtier.jar

Remove all jars which you will be compiling.
(While working on Plugin X, remove X.jar.)

3. Copy Required native libraries

In Windows

Copy TOMCAT_HOME\ webapps\nps\WEB-INF\bin\jclient.dll to WINDIR\system32

In Linux

Modify LD_LIBRARY_PATH to include IMANAGER_HOME/bin/linux/eDirectory/lib which has:

These libraries are provided by eDirectory.
iManager 2.5 has a separate copy of these libraries.

IMANAGER_HOME is the directory where iManager standalone version is installed.

4. Start Tomcat in JPDA

In a command prompt:

  1. Enter %TOMCAT_HOME%\bin
  2. Set JPDA_TRANSPORT=dt_socket
  3. Set JPDA_ADDRESS=8000
  4. .\catalina.bat jpda run
5. Create Remote Debugging application

In Eclipse:

  1. Open the iManager project which has required sources
  2. Run->Debug?
  3. Select Remote Java Application -> New
  4. Enter remote host name in Host
  5. Debug

Connection Refused Error

  1. Check that Tomcat is running in jpda mode
  2. Check that %JPDA_TRANSPORT% is dt_socket
  3. Check that %JPDA_ADDRESS% is 8000


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

Novell® Making IT Work As One

© 2008 Novell, Inc. All Rights Reserved.