title: Nothing Inserted while using Mysql and Neo4j in the same maven-web project
body: <p>We are working on a maven-web project.In this project two databases used, MySQL and Neo4j.
  Project is running fine with MySQL(without Neo4j). After adding Neo4j config file(neo4j-config.xml) project build without any error, insert operation to Mysql return successfully but actually nothing inserted to the tables.
  With some research about this problem found information about "cross store operation": </p>
  
  <p>XML configuration with cross-store</p>
  
  <pre><code>&lt;context:annotation-config/&gt;
  
  &lt;bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
          id="entityManagerFactory"&gt;
      &lt;property name="dataSource" ref="dataSource"/&gt;
      &lt;property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml"/&gt;
  &lt;/bean&gt;
  
  &lt;datagraph:config graphDatabaseService="graphDatabaseService"
          entityManagerFactory="entityManagerFactory"/&gt;
  
  &lt;bean id="graphDatabaseService"
          class="org.springframework.data.neo4j.rest.SpringRestGraphDatabase"&gt;
        &lt;constructor-arg index="0" value="http://localhost:7474/db/data" /&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>Our project db-context.xml</p>
  
  <pre><code>&lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
      &lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
  &lt;/bean&gt;
  
   &lt;bean id="jpaVendorAdapter"
      class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"&gt;
      &lt;property name="showSql" value="true" /&gt;
      &lt;property name="database" value="MYSQL" /&gt;
  &lt;/bean&gt;
  
  
  &lt;bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
      &lt;property name="persistenceUnitName" value="persistenceUnit" /&gt;
      &lt;property name="jpaVendorAdapter" ref="jpaVendorAdapter" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Our Project neo4j-context.xml</p>
  
  <pre><code>&lt;neo4j:config graphDatabaseService="graphDatabaseService" /&gt;
  
  &lt;bean id="graphDatabaseService"
      class="org.springframework.data.neo4j.rest.SpringRestGraphDatabase"&gt;
    &lt;constructor-arg index="0" value="http://localhost:7474/db/data" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>After adding entityManagerFactory="entityManagerFactory" to our neo4j-config.xml file
  we got an error like below while running maven project:</p>
  
  <blockquote>
    <p><em>Caused by: org.springframework.beans.factory.BeanCreationException: Error creating b ean with name
    'org.springframework.data.neo4j.config.Neo4jConfiguration#0': Error se
    tting property values; nested exception is
    org.springframework.beans.NotWritableProp ertyException: Invalid
    property 'entityManagerFactory' of bean class [org.springfram
    ework.data.neo4j.config.Neo4jConfiguration$$EnhancerByCGLIB$$5a2edf0]:
    Bean property  'entityManagerFactory' is not writable or has an
    invalid setter method. Does the pa rameter type of the setter match
    the return type of the getter?</em></p>
  </blockquote>
  
  <p>if we use datagraph tag instead of neo4j tag, i got an error like below</p>
  
  <blockquote>
    <p><em>Offending resource: ServletContext resource [/WEB-INF/spring-servlet.xml]; nested ex ception is
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
    Li ne 32 in XML document from ServletContext resource
    [/WEB-INF/neo4j-config.xml] is in valid; nested exception is
    org.xml.sax.SAXParseException; systemId:
    <a href="http://www.springframework.org/schema/data/graph/datagraph-1.0.xsd" rel="nofollow">http://www.springframework.org/schema/data/graph/datagraph-1.0.xsd</a>;
    lineNumber: 32; columnNumber: 51 ; src-resolve: Cannot resolve the
    name 'repository:repository' to a(n) 'type definit ion' component.</em></p>
  </blockquote>
  
  <p>Our problem is that although insert operation line returns success in debug mode,  it does not add new record to table after adding neo4j config file to our project. We did not understand why this situation occurs with only adding neo4j-config.xml file. Second confusion is why adding "entityManagerFactory" does not solve this problem.</p>
  
  <p>We couldn't find any example of Neo4j working with MySQL in maven-web project except spring-data example (myrestaurants-social) .</p>
  
  <p>Thank you for all valuable responses in advance.</p>