Hello everyone,
I believe most people will already know it but for new comers on Ariba development, it can be of an help.
If you develop a lot on Java for your Ariba customization you might want to set up remote debugging (I do it anyway for any new instances that I set up) so you can actually debug your code and do not need tons of logging.
1. Modify the launch of your instance (can be sourcing (upstream) or buyer (downstream)) , so for example with weblogic modify the config.xml and in the serverstart tag change the Arguments property to add the following arguments "-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=<port>" so the ServerStart will look like
<server>
<name>asmserver1</name>
....
<listen-address>127.0.0.1</listen-address>
<server-start>
<class-path>...</class-path>
<arguments>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=50005 -Xms256m -Xmx512m -Xss1m -XX:MaxPermSize=256M -Dweblogic.net.http.URLStreamHandlerFactory=ariba.util.net.URLStreamHandlerFactory -Dariba.server.home=D:\ariba\customer9r1\Sandbox\Sourcing\Server</arguments>
</server-start>
</server>
2. Configure Eclipse
go to Run/debug...
create a new Remote Java Application
select your ariba project and under connection properties,
select Host : 127.0.0.1 (it must match the value you have for the listen-address argument)
Port : 50005
click Apply
If the parameters are not correct and eclipse cannot link to the JVM it will pop up an error message.
Most probably the port is already in use or one of the parameter is not correct and does not match with your configuration.
3. In your java file, just put breakpoint where you want your code to stop (make sure your build is set up to compile with the debug flag set to true)
when everything is configured :
- start eclipse
- start your ariba instance
- launch debug
when the program will encounter a breakpoint, it will stop and pop up eclipse debug view.
of course this is only for dev purpose and should not be use in any case on prod instance
Hope this helps,
Fred

