title: java.lang.NoClassDefFoundError: org/springframework/context/support/ClassPathXmlApplicationContext
body: <p>I am using Spring in my Jar file to get the properties from a properties file. I am getting output when I try from my RAD(eclipse). But when I deploy my jar file in server, I keep getting this error. Do I need to include any other XML file ?</p>
  
  <p>The error occurs when I get the application context.</p>
  
  <pre><code>ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
  </code></pre>
  
  <p>XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:p="http://www.springframework.org/schema/p"
         xmlns:jee="http://www.springframework.org/schema/jee"
         xmlns:util="http://www.springframework.org/schema/util"
         xsi:schemaLocation="http://www.springframework.org/schema/util http://xml.westfieldgrp.com/public/schema/util/spring-util-3.0.xsd
                             http://www.springframework.org/schema/beans http://xml.westfieldgrp.com/public/schema/beans/spring-beans-3.0.xsd 
                             http://www.springframework.org/schema/jee http://xml.westfieldgrp.com/public/schema/jee/spring-jee-3.0.xsd" &gt;    
      &lt;bean id="applicationProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
          &lt;property name="location" value="classpath:/config/devint/nimo.properties"/&gt;
      &lt;/bean&gt;  
      &lt;bean id="nimoConfigurationBean" scope="singleton"
          class="com.westfieldgrp.filenet.env.NimoConfigurationBean"&gt;
          &lt;property name="serviceUser" value="${env.user}" /&gt;
          &lt;property name="servicePass" value="${env.pass}" /&gt;
      &lt;/bean&gt; 
  &lt;/beans&gt;
  </code></pre>
  
  <p>Call in Java:</p>
  
  <pre><code>public class AddEnvProperty {
  
      public String envType(String propertyValue) {   
          String returnValue = "";
  
          AddEnvProperty envProps = new AddEnvProperty();
          NimoConfigurationBean nimoConfigurationBean = envProps.getConfig();
  
          PluginLogger logger = new PluginLogger(new ResponceFilterPlugin());
          logger.logDebug(this, "envType", "Getting Property Value" + propertyValue);
          try {
  
               if (propertyValue == "USER") {
                  returnValue = nimoConfigurationBean.getServiceUser();
              } else if (propertyValue == "PASS") {
                  returnValue = nimoConfigurationBean.getServicePass();
              }
  
          } catch (NullPointerException ex) {
              logger.logError(this, "envType", "NullPointerException:", ex);
          }catch (Exception ex) {
              logger.logError(this, "envType", "NullPointerException:", ex);
          }
          return returnValue;
      }
  
      private NimoConfigurationBean getConfig() {
          ApplicationContext context = 
              new ClassPathXmlApplicationContext("applicationContext.xml");
  
          NimoConfigurationBean obj = (NimoConfigurationBean) context.getBean("nimoConfigurationBean");
          return obj;
      }
  }
  </code></pre>
  
  <p>Getter, setter methods in NimoConfigurationBean.java</p>