log4j.jar : No appenders could be found for logger (com.mchange.v2.resourcepool.BasicResourcePool)

While working with log4j.jar to log various activity messages, many time you may face an Exception "No appenders could be found for logger (com.mchange.v2.resourcepool.BasicResourcePool)" on unix machine. The exception message on console screen looks like as:


log4j:WARN No appenders could be found for logger(com.mchange.v2.resourcepool.BasicResourcePool).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See
http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
This kind of exception is mostly generated when you are not giving absolute path in the "log4j.appender.[appender_name].file" attribute.

Exceptional Configuration


Cross Thread Call Exception in Win-Form Based Application

In windows based multi-threaded application, many times you may receive an Exception of Cross-Thread call exception (InvalidOperation Exception). Exception message is as shown below:

Cross-thread operation not valid: Control 'Control1' accessed from a thread other than the thread it was created on.

Scenario: Consider an application in which a child form will be opened from the MDI parent and a control called "label1" will be updated by a function written in the same form class and called from the MDI with different thread as shown below:

Ajax (An Introduction)



AJAX Introduction

AJAX stands for Asynchronous JavaScript and XML.
If you are new to web development than, a question can arise in your mind that why do we require AJAX when we already have HTML, JavaScripts etc... Now let me clarify you, suppose you are having a web page with server side scripting (that can be in ASP, JSP, PHP), in that case to make little change we will have to reload whole page (Whole page will be rendered).
Whereas AJAX allows you to reload the only required part of the page which is required changes. So we can say AJAX allows partial rendering of the page.

How AJAX Works

List of Frequently asked Interview Questions for C#.Net

1) What is .net framework?

2) What is abstract class?

3) What is Interface?

4) How does abstract class differ from Interface?

5) What is monitor object?

6) What will happen if any UI element is being updated by background thread in winform based multi-threaded application?

7) What are delegates?

8) Difference between DataReader and DataAdapter?

9) What is Garbage collector?

10) How does garbage collector work?

11) What is different between private and sealed class?

12) What is use of finally block?

13) How can you implement Singleton Design Pattern in C# code?

Abstract Class v/s Interface

Introduction 

In this article I will discuss Interfaces versus Abstract classes. The concept of Abstract classes and Interfaces is a bit confusing for beginners of Object Oriented programming. Therefore, I am trying to discuss the theoretical aspects of both the concepts and compare their usage. And finally I will demonstrate how to use them with C#.

What is an Abstract Class?