title: Spring Data & MongoDB - UnsupportedOperationException on deleteBy
body: <p>I'm stucked on this problem with Spring Data and MongoDB.
  I'm using MongoDB 3.x, Spring data 1.7 (I also tried with 1.8) and Java MongoDB Driver 3.0.1 . </p>
  
  <p>When I try to delete a product form my DB it actually works fine but I got this:</p>
  
  <pre><code>java.lang.UnsupportedOperationException: Cannot get n property for an unacknowledged write
      at com.mongodb.WriteResult.throwIfUnacknowledged(WriteResult.java:128)
      at com.mongodb.WriteResult.getN(WriteResult.java:83)
      at org.springframework.data.mongodb.repository.query.AbstractMongoQuery$DeleteExecution.deleteAndConvertResult(AbstractMongoQuery.java:425)
      at org.springframework.data.mongodb.repository.query.AbstractMongoQuery$DeleteExecution.execute(AbstractMongoQuery.java:415)
      at org.springframework.data.mongodb.repository.query.AbstractMongoQuery.execute(AbstractMongoQuery.java:92)
      at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:393)
      at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:371)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      at com.sun.proxy.$Proxy51.deleteByProductIdAndActorId(Unknown Source)
      at social.picnik.marketplace.service.product.manager.ProductActionManagerImpl.unSaveProduct(ProductActionManagerImpl.java:134)
      at social.picnik.api.marketplace.controller.CustomerController.deleteProductsSaved(CustomerController.java:1865)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
      at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
      at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
      at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)
      at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
      at org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:890)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
      at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:139)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:155)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at social.picnik.api.marketplace.utils.CorsFilter.doFilterInternal(CorsFilter.java:47)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      at org.eclipse.jetty.server.Server.handle(Server.java:497)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>This is happend when my method execute this line of my code (we're using Spring data MongoDB Repositories):</p>
  
  <pre><code>this.productSavedRepo.deleteByProductIdAndActorId(product.getId(), customer.getId());
  </code></pre>
  
  <p>My configuration into pom.xml is:</p>
  
  <pre><code>    &lt;name&gt;backend-services&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;spring.version&gt;4.1.6.RELEASE&lt;/spring.version&gt;
          &lt;spring.data.mongodb.version&gt;1.7.0.RELEASE&lt;/spring.data.mongodb.version&gt;
          &lt;java.mongodb.driver.version&gt;3.0.1&lt;/java.mongodb.driver.version&gt;
          &lt;spring.social.facebook.version&gt;1.1.1.RELEASE&lt;/spring.social.facebook.version&gt;
          &lt;spring.social.security&gt;1.1.0.RELEASE&lt;/spring.social.security&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.11&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.hamcrest&lt;/groupId&gt;
              &lt;artifactId&gt;hamcrest-all&lt;/artifactId&gt;
              &lt;version&gt;1.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
              &lt;version&gt;1.7.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
              &lt;version&gt;1.7.5&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
              &lt;version&gt;1.2.16&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- mongodb java driver 2.x --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mongodb&lt;/groupId&gt;
              &lt;artifactId&gt;mongo-java-driver&lt;/artifactId&gt;
              &lt;version&gt;${java.mongodb.driver.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;!-- Spring data mongodb --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
              &lt;artifactId&gt;spring-data-mongodb&lt;/artifactId&gt;
              &lt;version&gt;${spring.data.mongodb.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;cglib&lt;/groupId&gt;
              &lt;artifactId&gt;cglib&lt;/artifactId&gt;
              &lt;version&gt;2.2.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
              &lt;artifactId&gt;gson&lt;/artifactId&gt;
              &lt;version&gt;2.3.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.paypal.sdk&lt;/groupId&gt;
              &lt;artifactId&gt;rest-api-sdk&lt;/artifactId&gt;
              &lt;version&gt;LATEST&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.tecacet.math.fsm&lt;/groupId&gt;
              &lt;artifactId&gt;fsm&lt;/artifactId&gt;
              &lt;version&gt;1.0.1-r8&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
              &lt;version&gt;2.2.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
              &lt;version&gt;2.2.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-annotations&lt;/artifactId&gt;
              &lt;version&gt;2.2.0&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.mandrillapp.wrapper.lutung&lt;/groupId&gt;
              &lt;artifactId&gt;lutung&lt;/artifactId&gt;
              &lt;version&gt;0.0.5&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.axis&lt;/groupId&gt;
              &lt;artifactId&gt;axis&lt;/artifactId&gt;
              &lt;version&gt;1.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.xml&lt;/groupId&gt;
              &lt;artifactId&gt;jaxrpc-api&lt;/artifactId&gt;
              &lt;version&gt;1.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt;
              &lt;artifactId&gt;spring-xml&lt;/artifactId&gt;
              &lt;version&gt;2.1.4.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;commons-discovery&lt;/groupId&gt;
              &lt;artifactId&gt;commons-discovery&lt;/artifactId&gt;
              &lt;version&gt;0.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.xml.soap&lt;/groupId&gt;
              &lt;artifactId&gt;javax.xml.soap-api&lt;/artifactId&gt;
              &lt;version&gt;1.3.7&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
              &lt;version&gt;1.9.13&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt;
              &lt;artifactId&gt;spring-ws-core&lt;/artifactId&gt;
              &lt;version&gt;2.1.4.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  
           &lt;dependency&gt;
              &lt;groupId&gt;uk.com.robust-it&lt;/groupId&gt;
              &lt;artifactId&gt;cloning&lt;/artifactId&gt;
              &lt;version&gt;1.9.0&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
              &lt;artifactId&gt;spring-security-core&lt;/artifactId&gt;
              &lt;version&gt;4.0.0.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.github.slugify&lt;/groupId&gt;
              &lt;artifactId&gt;slugify&lt;/artifactId&gt;
              &lt;version&gt;2.1.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;joda-time&lt;/groupId&gt;
              &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
              &lt;version&gt;2.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Use Apache HttpClient as HTTP Client --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
              &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
              &lt;version&gt;4.4&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring Social --&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.social&lt;/groupId&gt;
              &lt;artifactId&gt;spring-social-security&lt;/artifactId&gt;
              &lt;version&gt;${spring.social.security}&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.social&lt;/groupId&gt;
              &lt;artifactId&gt;spring-social-facebook&lt;/artifactId&gt;
              &lt;version&gt;${spring.social.facebook.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
  
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;local&lt;/id&gt;
              &lt;properties&gt;
                  &lt;profileId&gt;local&lt;/profileId&gt;
              &lt;/properties&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
                  &lt;property&gt;
                      &lt;name&gt;env&lt;/name&gt;
                      &lt;value&gt;local&lt;/value&gt;
                  &lt;/property&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;resources&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;src/main/resources&lt;/directory&gt;
                          &lt;filtering&gt;true&lt;/filtering&gt;
                      &lt;/resource&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;src/main/resources/properties&lt;/directory&gt;
                      &lt;/resource&gt;
                  &lt;/resources&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
  
          &lt;profile&gt;
              &lt;id&gt;dev&lt;/id&gt;
              &lt;properties&gt;
                  &lt;profileId&gt;dev&lt;/profileId&gt;
              &lt;/properties&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;false&lt;/activeByDefault&gt;
                  &lt;property&gt;
                      &lt;name&gt;env&lt;/name&gt;
                      &lt;value&gt;dev&lt;/value&gt;
                  &lt;/property&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;resources&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;src/main/resources&lt;/directory&gt;
                          &lt;filtering&gt;true&lt;/filtering&gt;
                      &lt;/resource&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;src/main/resources/properties&lt;/directory&gt;
                      &lt;/resource&gt;
                  &lt;/resources&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;stage&lt;/id&gt;
              &lt;properties&gt;
                  &lt;profileId&gt;stage&lt;/profileId&gt;
              &lt;/properties&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;false&lt;/activeByDefault&gt;
                  &lt;property&gt;
                      &lt;name&gt;env&lt;/name&gt;
                      &lt;value&gt;staging&lt;/value&gt;
                  &lt;/property&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;resources&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;src/main/resources&lt;/directory&gt;
                          &lt;filtering&gt;true&lt;/filtering&gt;
                      &lt;/resource&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;src/main/resources/properties&lt;/directory&gt;
                      &lt;/resource&gt;
                  &lt;/resources&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;production&lt;/id&gt;
              &lt;properties&gt;
                  &lt;profileId&gt;production&lt;/profileId&gt;
              &lt;/properties&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;false&lt;/activeByDefault&gt;
                  &lt;property&gt;
                      &lt;name&gt;env&lt;/name&gt;
                      &lt;value&gt;production&lt;/value&gt;
                  &lt;/property&gt;
              &lt;/activation&gt;
              &lt;build&gt;
                  &lt;resources&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;src/main/resources&lt;/directory&gt;
                          &lt;filtering&gt;true&lt;/filtering&gt;
                      &lt;/resource&gt;
                      &lt;resource&gt;
                          &lt;directory&gt;src/main/resources/properties&lt;/directory&gt;
                      &lt;/resource&gt;
                  &lt;/resources&gt;
              &lt;/build&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;sonatype-snapshot&lt;/id&gt;
              &lt;url&gt;https://oss.sonatype.org/content/repositories/snapshots/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;lib&lt;/id&gt;
              &lt;url&gt;file://${project.basedir}/resources/lib&lt;/url&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
          &lt;id&gt;spring-snapshots&lt;/id&gt;
          &lt;name&gt;Spring Snapshots&lt;/name&gt;
          &lt;url&gt;http://repo.spring.io/snapshot&lt;/url&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/snapshots&gt;
      &lt;/repository&gt;
          &lt;repository&gt;
          &lt;id&gt;spring-milestones&lt;/id&gt;
          &lt;name&gt;Spring Milestones&lt;/name&gt;
          &lt;url&gt;http://repo.spring.io/milestone&lt;/url&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/snapshots&gt;
      &lt;/repository&gt;
  
      &lt;/repositories&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.9&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;downloadSources&gt;true&lt;/downloadSources&gt;
                      &lt;downloadJavadocs&gt;true&lt;/downloadJavadocs&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
                  &lt;filtering&gt;true&lt;/filtering&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>My domain model is: </p>
  
  <pre><code>{
      "_id" : ObjectId("554a30a7fa4d0e68590d3362"),
      "_class" : "social.picnik.marketplace.service.product.model.ProductSaved",
      "product_id" : "5531351565887dfae1cbac17",
      "actor_id" : "54e8899ad4c61796733ae2cf",
      "action_date" : ISODate("2015-05-06T15:17:59.512Z")
  }
  </code></pre>
  
  <p>This code has been worked since we upgraded MongoDB from 2.6 to 3.0 .</p>
  
  <p>Have you ever had something like this?</p>
  
  <p>Thank you in advance.</p>