Tag Archives: debug

Find a class inside all jars

When having class path issues caused by an old version of a library in your class path, it might be convenient to find all the jars provided this class to figure out what component is loading the old version. So here is a command to do this:

for f in `find /home/jenkins -name '*.jar' -print -exec echo {} \;`; do echo "$f: "; unzip -l $f | grep 'javax.ws.rs.core.MultivaluedMap'; done

Understand messaging and logging in ICN

In this post, I’ll explain how messaging and logging work in ICN and how to use them to give meaningful information to users and developers.

First, what’s the difference between messaging and logging? Messaging means showing information to the user. These information are meaningful to them and have to be shown to all users.

Logging means persisting information to track the application execution. These information are not supposed to be shown to users. They help tracking defects more quickly.
Continue reading

Enable DEBUG logging on the ICN server

Sources for the server part of ICN are not available. However it contains code for all public API services you are using in the ICN JavaScript model, like retrieve an item, a folder content, check in or check out an item and so on. And sometimes it is nice to know what is going on in these services, which can’t be debugged. A way to do that is to set the log level on DEBUG for the ICN server. Of course never do that on production…

This is actually really easy, you don’t even have to do it using Websphere, just go to the administration of ICN, Settings, Logging tab and set the Application-level logging to DEBUG. You can even define what classes/packages you want to log. Then restart WebSphere (maybe restarting the navigator application should be enough I haven’t tried) and you should have all debugs log in the SystemOut.log file of WebSphere (/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1). That’s might be a lot so don’t forget to filter on some classes/packages.
Continue reading