title: java.lang.UnsupportedOperationException: The user must supply a JDBC connection
body: <p>I get this exception but I can not figure out what is wrong with my configuration
  I am posting the relevent files thanks for any help<br>
  I am using 
  Spring 3.1.0.RELEASE
  hibernate-entitymanager 3.6.10.Final (Should work with JPA 2)</p>
  
  <p>Trying to run the code from a JUnit file</p>
  
  <pre><code>package com.successcharging.core.dao.jpa;
  
  import junit.framework.Assert;
  
  import org.junit.Before;
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.test.context.ContextConfiguration;
  import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  import org.springframework.test.context.transaction.TransactionConfiguration;
  import org.springframework.transaction.annotation.Transactional;
  
  import com.successcharging.core.security.dao.UserDao;
  import com.successcharging.core.security.model.User;
  import com.successcharging.core.security.model.UserImp;
  
  @RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(locations = {
      "classpath:applicationContext/applicationContext*.xml"})
  @TransactionConfiguration(transactionManager="transactionManager", defaultRollback=true)
  @Transactional
  public class UserDaoImplTest {
  
  private static final boolean ENABLED = true;
  
  private static final String PASSWORD = "password";
  
  private static final String USERNAME = "joe.bloggs";
  
  @Autowired
  private UserDao userDao;
  private User user;
  @Before
  public void before() {
      user = new UserImp();
      user.setName(USERNAME);
      user.setPassword(PASSWORD);
      user.setEnabled(ENABLED);
  
      userDao.save(user);
  }
  
  @Test
  public void findByUserName() {
      Assert.assertNotNull(user);
      User user2 = userDao.findById(user.getId());
  
      Assert.assertNotNull(user2);
      Assert.assertEquals(USERNAME, user2.getName());
  }
  }
  </code></pre>
  
  <h3>applicationContext.xml</h3>
  
  <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.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"&gt;
  &lt;context:annotation-config/&gt;
  &lt;context:component-scan base-package="com.successcharging.core" /&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <h3>applicationContext-persistence.xml</h3>
  
  <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:tx="http://www.springframework.org/schema/tx"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"&gt;
  
  &lt;bean id="entityManagerFactory"
      class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
      &lt;property name="packagesToScan" value="com.successcharging.core" /&gt;
  
      &lt;property name="jpaDialect"&gt;
          &lt;bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" /&gt;
      &lt;/property&gt;
      &lt;property name="jpaVendorAdapter"&gt;
          &lt;bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"&gt;
              &lt;property name="showSql" value="true" /&gt;
              &lt;property name="generateDdl" value="true" /&gt;
              &lt;property name="databasePlatform" value="org.hibernate.dialect.MySQLInnoDBDialect" /&gt;
          &lt;/bean&gt;
      &lt;/property&gt;
      &lt;property name="persistenceUnitName" value="successcharging.core.security" /&gt;
      &lt;property name="persistenceUnitManager"&gt;
          &lt;bean
              class="org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager" /&gt;
      &lt;/property&gt;
  &lt;/bean&gt; 
  
  &lt;bean id="dataSource"
      class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
      &lt;property name="url" value="jdbc:mysql://192.168.1.129:3306/SC_SECURITY" /&gt;
      &lt;property name="username" value="sc_admin" /&gt;
      &lt;property name="password" value="123" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
      &lt;property name="entityManagerFactory" ref="entityManagerFactory" /&gt;
  &lt;/bean&gt;
  
  &lt;tx:annotation-driven /&gt;
  
  
  &lt;/beans&gt;
  </code></pre>
  
  <h3>persistence.xml</h3>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  
  &lt;persistence version="1.0"
  xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
    http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"&gt;
  
  &lt;persistence-unit name="successcharging.core.security"
      transaction-type="RESOURCE_LOCAL"&gt;
      &lt;properties&gt;
          &lt;property name="cache.provider_class" value="org.hibernate.cache.NoCacheProvider" /&gt;
          &lt;property name="hibernate.max_fetch_depth" value="3" /&gt;
          &lt;property name="hibernate.query.factory_class"
              value="org.hibernate.hql.classic.ClassicQueryTranslatorFactory" /&gt;
          &lt;property name="hibernate.query.substitutions" value="true 1, false 0" /&gt;
      &lt;/properties&gt;
  &lt;/persistence-unit&gt;
  </code></pre>