title: javax/transaction/SystemException error
body: <p>I have some problems with my project, I want configure it but I am getting an error: </p>
  
  <pre><code>log4j:WARN No appenders could be found for logger (org.jboss.logging).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  
  Exception in thread "main" java.lang.UnsupportedOperationException: The application must supply JDBC connections
  at org.hibernate.engine.jdbc.connections.internal.UserSuppliedConnectionProviderImpl.getConnection(UserSuppliedConnectionProviderImpl.java:61)
  at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:380)
  at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:228)
  at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:171)
  at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
  at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162)
  at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1435)
  at org.hibernate.jpa.internal.TransactionImpl.begin(TransactionImpl.java:61)
  at com.politechnika.hibernatealone.application.HibernateAlone.main(HibernateAlone.java:23)
  </code></pre>
  
  <p>This is my <code>HibernateAlone.java</code> file:</p>
  
  <pre><code>import com.politechnika.hibernatealone.entity.Company;
  import com.politechnika.hibernatealone.entity.Employee;
  import com.politechnika.hibernatealone.entity.Position;
  import javax.persistence.EntityManager;
  import javax.persistence.EntityManagerFactory;
  import javax.persistence.Persistence;
  import javax.persistence.TypedQuery;
  import javax.persistence.criteria.CriteriaBuilder;
  import javax.persistence.criteria.CriteriaQuery;
  import javax.persistence.criteria.Root;
  import java.util.Arrays;
  
  public class HibernateAlone {
      public static void main(String[] args) {
  
          EntityManagerFactory factory = Persistence.createEntityManagerFactory("hibernateAlone");
          EntityManager manager = factory.createEntityManager();
  
          manager.getTransaction().begin();
  
          Position position = new Position();
          position.setPositionName("Manager");
  
          manager.persist(position);
  
          Company company = new Company();
          company.setCompanyName("Fulda");
  
          manager.persist(company);
  
          Employee employee = new Employee();
          employee.setPosition(position);
          employee.setFullName("Zenek Zenkowski");
          employee.setStreet("Paderewskiego");
          employee.setStreetNumber("26/64");
          employee.setCompany(company);
  
          manager.persist(employee);
          manager.getTransaction().commit();
  
          CriteriaBuilder criteriaBuilder = manager.getCriteriaBuilder();
          CriteriaQuery&lt;Employee&gt; query = criteriaBuilder.createQuery(Employee.class);
          Root&lt;Employee&gt; from = query.from(Employee.class);
          CriteriaQuery&lt;Employee&gt; select = query.select(from);
          TypedQuery&lt;Employee&gt; queryFromManager = manager.createQuery(select);
  
          // manager.getTransaction().begin();
  
      for (Employee emp : queryFromManager.getResultList()) {
          System.out.println(emp.toString());
          // manager.remove(emp);
      }
  
      // manager.getTransaction().commit();
      manager.close();
      factory.close();
      }
  }
  </code></pre>
  
  <p>And this is a configuration file  <code>persistence.xml</code></p>
  
  <pre><code>&lt;persistence-unit name="hibernateAlone"&gt;
  
      &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
      &lt;class&gt;com.politechnika.hibernatealone.entity.Employee&lt;/class&gt;
      &lt;class&gt;com.politechnika.hibernatealone.entity.Company&lt;/class&gt;
      &lt;class&gt;com.politechnika.hibernatealone.entity.Position&lt;/class&gt;
      &lt;!-- the JNDI data source --&gt;
      &lt;properties&gt;
          &lt;property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/&gt;
          &lt;property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/&gt;
          &lt;property name="hibernate.connection.username" value="postgres"/&gt;
          &lt;property name="hibernate.connection.password" value="postgres"/&gt;
          &lt;property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/postgres"/&gt;
  
          &lt;property name="hibernate.default_schema" value="crm"/&gt;
  
          &lt;property name="hibernate.hbm2ddl.auto" value="create"/&gt;
  
          &lt;property name="show_sql" value="true"/&gt;
      &lt;/properties&gt;
  &lt;/persistence-unit&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thank you for help with this problem</p>