title: The type org.springframework.beans.BeansException cannot be resolved. It is indirectly referenced from required .class files
body: <p>Hi am facing issue with below error in eclipse please help to resolve this issue.</p>
  
  <p><strong>Error message</strong></p>
  
  <p><strong><em>The type org.springframework.beans.BeansException cannot be resolved. It is indirectly referenced from required .class files</em></strong></p>
  
  <p>I imported the jar file (org.springframework.context-3.0.4.RELEASE) even then am facing this issue.</p>
  
  <p><strong>see below code</strong>( where am getting issue at line ApplicationContext appCtx = new ClassPathXmlApplicationContext("applicationContext.xml");)</p>
  
  <pre><code>    package com.csp.test.document;
  
      import static org.junit.Assert.*;
      import org.junit.Test;
      import org.springframework.context.ApplicationContext;
      import org.springframework.context.support.ClassPathXmlApplicationContext;
  
      import com.csp.model.Document;
      import com.csp.service.DocumentService;
  
      public class DocumentTest {
  
          @Test
          public void testGetDocument() {
              ApplicationContext appCtx = new ClassPathXmlApplicationContext(
                      "applicationContext.xml");
  
              DocumentService documentService = (DocumentService) appCtx
                      .getBean("documentService");
  
              Document doc = documentService.getDocument(1);
  
              String status = null;
  
              if (doc != null) {
                  status = documentService.saveDocument(doc);
              } else {
                  System.out.println("error in retreiving document");
              }
  
              assertEquals("Success Status", "SUCCESS", status);
  
          }
  
      }
  </code></pre>