title: Spring REST web service appContext failed
body: <p>I'm trying to create REST web service using Spring.</p>
  
  <p>I have one controller, one appContext.</p>
  
  <p>Controller:</p>
  
  <pre><code>@Controller
  public class RestController {
  
  @RequestMapping(method=RequestMethod.POST, value="service/{url}......&lt;params&gt;) 
  //some method here
  
  //some logic here
  
  }
  </code></pre>
  
  <p>And app context: </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:context="http://www.springframework.org/schema/context"
          xsi:schemaLocation="
                  http://www.springframework.org/schema/beans
                  http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                  http://www.springframework.org/schema/context 
                  http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;
  
          &lt;context:component-scan base-package="spring.rest.controller" /&gt;
  
          &lt;bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" /&gt;
          &lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" /&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>I'm using Tomcat 7, when trying to start get exception:</p>
  
  <pre><code>[13:02] ERROR ContextLoader () - Context initialization failed
  java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor
      at org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:567)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:468)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)
  Caused by: java.lang.ClassNotFoundException: org.springframework.expression.PropertyAccessor
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
      ... 15 more
  Jul 23, 2013 1:02:21 PM org.apache.catalina.core.StandardContext listenerStart
  SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
  java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor
      at org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:567)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:468)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)
  Caused by: java.lang.ClassNotFoundException: org.springframework.expression.PropertyAccessor
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
      ... 15 more
  </code></pre>
  
  <p>Libs that i used - Spring beans, core, context, web, webmvc, security-core, oxm.
  P.S. Never used Spring before, so i have no idea what wrong.</p>
  
  <p>Any suggestions?</p>