title: How to connect MySQL database with JSF and Primefaces in Netbeans?
body: <p>I'm building a Java Web project with JSF 2.2 and Primefaces 4 using Netbeans IDE 8. </p>
  
  <p>I'm trying to connect a database that I made in MySQL with my netbeans project. </p>
  
  <p>The problem is that when i create a new project and make an entity class from database and choose jdbc/sample and make JSF pages from those entity classes the program runs ok BUT when I choose a new connection (MySQL) and choose my database with my tables and make JSF pages from entity class, the project doesnt run. </p>
  
  <p>The database is visible in netbeans it's also visible in phpmyadmin in wamp. I'm thinking it has to do something with glassfish resources.xml file that </p>
  
  <p>I need to configure something there or maybe not. </p>
  
  <p><strong>The short version of my problem:</strong> </p>
  
  <p>How to configure and how to connect my database made in mysql (not a sample one) with netbeans jsf primefaces project and create entity classes from database and make JSF pages from those entities ?</p>
  
  <p>PS can anyone post some links - videos or tutorials regarding this problem also</p>
  
  <p>Resolved1: The problem is with netbeans 8 in 7.4 and earlier versions it works...</p>
  
  <p>RESOLVED2: In Netbeans 8 the problem is with JDBC Resources and Connection Pool... just follow this tutorial at the end of the page it will solve the problem <a href="https://netbeans.org/kb/docs/web/jsf20-crud.html#troubleshooting" rel="nofollow">https://netbeans.org/kb/docs/web/jsf20-crud.html#troubleshooting</a></p>