It still surprises me when people tell me that they can “only” debug D2 code by adding output to their plugins so, if you’re using eclipse as your IDE, here are some steps that most likely will help you to debug code from an eclipse server (Tomcat):
Extract all files from D2.war and D2-Config.war (just in case you want to have access to D2-Config from a local environment, not much you can debug here) and copy the D2 lib folder to your computer.
- Generate lockbox file for your environment (probably this is the hardest part :D)
- Update dfc.properties in both.
- Update D2’s D2FS.properties (update absolute path in lockboxPath) and logback.xml (update logs path)
- Update D2-Config’s D2-Config.properties (update absolute path in lockboxPath) and logback.xml (update logs path)
- Copy following libraries to Tomcat folder:
- /endorsed: (from d2-config/web-inf/lib)
- crypto.jar
- cryptojce.jar
- cryptojcommon.jar
- jcm.jar
- jcmandroidfips.jar
- jcmFIPS.jar
- util.jar
- /lib:
- LB.jar
- LBJNI.jar
- /endorsed: (from d2-config/web-inf/lib)
- Configure a new server in eclipse. In Run Configuration add the following:
- Arguments:
- -Djava.endorsed.dirs=”<absolute path to tomcat>\endorsed
- -Djava.io.tmpdir=”<absolute path to some temp folder>\d2″
- -Dclb.library.path=”<absolute path to D2 libraries folder>\lockbox\win_vc100_x64″ (choose your OS library)
- Classpath:
- User entries:
- Path to LB.jar and LBJNI.jar
- Environment:
- Classpath: <absolute path to D2 libraries folder>\LB.jar;<absolute path to D2 libraries folder>\LBJNI.jar;<absolute path to D2 libraries folder>\C6-Common.jar;<absolute path to Documentum DFC’s dctm.jar>;<absolute path to Documentum config folder>
- Path: <absolute path to D2 libraries folder>\lockbox\win_vc100_x64;%PATH%
- User entries:
- Add project to Sources
- Arguments:
- Add D2 and D2-Config as deployed modules to your server configuration.
- Start server
[…] post is quite similar to the Debugging D2 4.5/4.6 previously posted, but explaining how to set up D2 without lockbox, but much more simple due to the […]
LikeLike