title: Dependancy error result in NoSuchMethodError: PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;
body: <p>So i have this problem in confiuring the dependancies for my project which use Spring JPA &amp; Hibernate, my dependancies looks:</p>
  
  <pre><code>                &lt;dependency&gt;
                           &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                           &lt;artifactId&gt;ejb3-persistence&lt;/artifactId&gt;
                           &lt;version&gt;1.0.2.GA&lt;/version&gt;
                  &lt;/dependency&gt;
  
                  &lt;dependency&gt;
                         &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                         &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
                         &lt;version&gt;3.5.0-Final&lt;/version&gt;
                  &lt;/dependency&gt;
                          &lt;dependency&gt;
                          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-orm&lt;/artifactId&gt;
                          &lt;version&gt;${spring.version}&lt;/version&gt;
                  &lt;/dependency&gt;
  
                  &lt;dependency&gt;
                          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-jpa&lt;/artifactId&gt;
                          &lt;version&gt;2.0.8&lt;/version&gt;
                  &lt;/dependency&gt;
  </code></pre>
  
  <p>end error i am getting </p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor#0': Cannot create inner bean '(inner bean)' of type [org.springframework.transaction.interceptor.TransactionInterceptor] while setting bean property 'transactionInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#14': Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in ServletContext resource [/WEB-INF/hibernate-context.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/hibernate-context.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609) ~[spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925) ~[spring-context-3.1.3.RELEASE.jar:3.1.3.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472) ~[spring-context-3.1.3.RELEASE.jar:3.1.3.RELEASE]
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) ~[spring-web-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) ~[spring-web-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) [spring-web-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) [catalina.jar:7.0.30.A]
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) [catalina.jar:7.0.30.A]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.30.A]
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [catalina.jar:7.0.30.A]
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [catalina.jar:7.0.30.A]
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618) [catalina.jar:7.0.30.A]
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650) [catalina.jar:7.0.30.A]
      at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582) [catalina.jar:7.0.30.A]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_09]
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_09]
      at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_09]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_09]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_09]
      at java.lang.Thread.run(Thread.java:722) [na:1.7.0_09]
  </code></pre>
  
  <p>I Have found solution which are all about removing <code>Spring-jpa</code> dependancy but  such operation result in Error related to not being able to load <code>persistence_1_0.xsd</code>.
  Any clue how i can fix this?</p>