SOA / Web Services / Java

A Technology Blog

Archive for February, 2015

ClassNotFOundException? – Command to find the required jar

Posted by Vivek on February 2, 2015

It is irritating when one gets ClassNotFoundException. One can go and find the jar and add it to the classpath to resolve the problem. Jars can be searched on sites like http://www.findjar.com. However, sometimes jars are within the system and only thing needed to fix the problem is to set the classpath appropriately. Here is the unix command to find the jar:
$ find . -name “*.jar” -print -exec jar -tf ‘{}’ \; | grep -E “jar$|String\.class”

Posted in SOA | Tagged: | Leave a Comment »

WMB – Create and View Trace Logs

Posted by Vivek on February 2, 2015

Trace logs are important when one has to find out root cause of any problem occurred during message flow execution. This post helps you understand the commands that are required:

You can create user trace by running the following command:

Start user trace:

mqsichangetrace <brokername> -u -e <egroup> -f “<Message Flow Name>” -l debug -r -c 50000

You can stop user trace with the following command:

Stop trace:

mqsichangetrace <brokername> -u -e <egroup> -f “<Message Flow Name>” -l none

Retrieve the trace log for the specified component:

mqsireadlog <brokername> -u -e <egroup> -f -o flowtrace.xml

Format XML trace file for viewing purpose:

mqsiformatlog -i flowtrace.xml -o userflowtrace.txt

Similarly, you can create service trace by executing a series of commands:

Service Level Trace:

Start trace.

mqsichangetrace <brokername> -t -e <egroup> -l debug -r -c 100000

Stop trace.

mqsichangetrace <brokername> -t -e <egroup> -l none

Retrieve the trace log for the specified component.

mqsireadlog <brokername> -t -e <egroup> -f -o flowtrace.xml

Format the XML trace file.

mqsiformatlog -i flowtrace.xml -o serviceflowtrace.txt

The serviceflowtrace.txt will be in the current working directory

Posted in IBM Websphere Message Broker | Tagged: | Leave a Comment »