title: Using ClassPathXmlApplicationContext to load beans
body: <p>This is my interface</p>
  
  <pre><code>public interface PersonneService {
      public void add(Personne personne);
      public void delete (int PersonneID);
      public Personne getPersonne(int PersonneID); 
      public List getAllPersonne();
  }
  </code></pre>
  
  <p>this is my class main </p>
  
  <pre><code>import static org.junit.Assert.*;
  import java.util.List;
  
  import org.junit.AfterClass;
  import org.junit.BeforeClass;
  import org.junit.Test;
  
  import org.springframework.context.support.ClassPathXmlApplicationContext;
  
  import com.test.model.Personne;
  
  public class PersonneServiceTest {
   private static ClassPathXmlApplicationContext context;
   private static PersonneService personneService;
  
      @BeforeClass
      public static void setUpBeforeClass() throws Exception {
          context= new ClassPathXmlApplicationContext("ApplicationContext.xml");
          personneService=(PersonneService) context.getBean("PersonneService");
      }
  
      @AfterClass
      public static void tearDownAfterClass() throws Exception {
          context.close();
      }
  </code></pre>
  
  <p>This is error </p>
  
  <pre><code>    org.springframework.context.support.AbstractApplicationContext prepareRefresh
  INFOS: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1b10f9a: display name [org.springframework.context.support.ClassPathXmlApplicationContext@1b10f9a]; startup date [Mon Jun 23 11:03:13 WEST 2014]; root of context hierarchy
  juin 23, 2014 11:03:13 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFOS: Loading XML bean definitions from class path resource [ApplicationContext.xml]
  juin 23, 2014 11:03:14 AM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
  INFOS: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@1b10f9a]: org.springframework.beans.factory.support.DefaultListableBeanFactory@648a34
  </code></pre>
  
  <p>Here is some error while I am doing a sample project in Spring. My application-context.xml is in src but it doesn't work:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: org/antlr/runtime/RecognitionException
  </code></pre>