KMR Logs and Errors

Logs and Common Errors

Logs are a useful component used by developers to debug applications, determine errors, identify exceptions.

Audible Development environment is classified into 13 zones (0 to 12).

Development work Is carried out on twelve zones (1 to 12). Zone 0 is the integration zone, where the consolidated development work from all zones lies.

All further references with respect to the development would be made to zone 1 IM

Hostname for zone 1 IM : im-a00-01.mgt.dev.sec.audible.com

Logs are placed on the IM server under the following folder path:-

/opt/bv1to1_var/logs

Logs that are extensively used by developers (bvlogs and javalogs) can be found under

/opt/bv1to1_var/logs/im-a00-01.ofc.dev.ewr.audible.com on the IM server

Under the path mentioned above, the log files can be found on a datewise basis.

There are separate log files corresponding to each day.

For eg:- Log files corresponding to 17th May, 2008 are

bvlog.out.20080517

java.out.20080517

Any errors/exceptions can be seen in the bv logs.

Any log statements put in the code can be viewed in the java logs.

Steps to view logs:

1. Go to the path /opt/bv1to1_var/logs/im-a00-01.ofc.dev.ewr.audible.com on the IM. Open a new terminal and type the command to view the logs.

2. Command to view the logs:-


 * a) java logs : tail –f java.out.20080517


 * b) bv logs : tail –f bvlog.out.20080517


 * Please modify the commands to put in the correct date.

3. Hit the URL in the browser.

4. The logs should display on the terminal.

5. Logs once started can be stopped by using the command CTRL + C

Putting Log statements in the code:

Need to import com.broadvision.util.BVLog on your jsp/java file

A log statement can be printed using the following syntax:

BVLog.error("Some string: " + some_variable);

All such log statements can be viewed in the java logs using the commands mentioned above.

Please make sure you comment out/ remove all the unwanted log statements after your development work.

Common Errors:

Here are a few of the most common errors that a developer is likely to encounter in the beginning.

These are mainly exceptions that are difficult to identify on the code.

1. Null Pointer Exception.


 * The exception shows in the bv logs.


 * The bv logs when run will display the exception alongwith the filename in which the exception occurred.


 * It happens when you are using String methods on a null String.


 * Make sure you always check for a null string before using methods on String variables.


 * Also, while comparing a String variable with a String literal, use


 * "abc".equals(String var) instead of


 * (String var).equals("abc")


 * The first one will avoid a null pointer exception incase you forget to put a null check.

2. Array Index Out Of Bounds Exception


 * It happens when you try to access an element of an array beyond the length of the array.


 * One common area at audible, where this exception does occur is while implementing pagination.


 * Suppose you need to display 10 records on a page and you have 24 records.

3. Number Format Exception


 * The exception shows in the bv logs


 * Many a times you would use the Wrapper class methods such as Integer.parseInt(String var)


 * This would convert the String into an object of type Integer or even an int variable.


 * Number Format exception would occur when the parameter is null.


 * Integer.parseInt(null)

4. No Class Definition Exception


 * The exception shows in the bv logs


 * Make sure that the class file is present at the right path before trying to access the java file.

Apart from these exceptions all other java errors will be thrown in the bv logs for the developer to identify.

This is a write up with the bare necessary things to get you started. There is a lot left to explore as you build on these basic steps.

Please feel free to consult any of your team members regarding any issues/doubts you may have.