title: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : javaee__pm
body: <p>I am have a small JavaEE JSF application that access to a mysql database through persistance JPA and it work well in my netbeans and glassfish enviroment. The thing is, after cloning it in other machine with same configuration (netbeans, glasfish, same database) it won't run. I guess it is caused by the database configuration but I tried to configure it in the new machine and it is hopeless. it always give the same error:</p>
  
  <pre><code>GlassFish Server 4.1, deploy, null, false
  /home/alvarob/NetBeansProjects/WordPracticeJavaEE/nbproject/build-impl.xml:1032: The module has not been deployed.
  See the server log for details.
  BUILD FAILED (total time: 0 seconds)
  </code></pre>
  
  <p>And this is part of the GlassFish log:</p>
  
  <pre><code>[2015-10-19T14:47:13.556+0300] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=44 _ThreadName=admin-listener(4)] [timeMillis: 1445255233556] [levelValue: 1000] [[
      Exception while preparing the app : Invalid resource : javaee__pm
      com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : javaee__pm
      at org.glassfish.jdbcruntime.service.JdbcDataSource.validateResource(JdbcDataSource.java:81)
      at org.glassfish.jdbcruntime.service.JdbcDataSource.setResourceInfo(JdbcDataSource.java:62)
      at org.glassfish.jdbcruntime.JdbcRuntimeExtension.lookupDataSourceInDAS(JdbcRuntimeExtension.java:136)
      at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:589)
      at com.sun.enterprise.connectors.ConnectorRuntime.lookupPMResource(ConnectorRuntime.java:517)
      at org.glassfish.persistence.common.PersistenceHelper.lookupPMResource(PersistenceHelper.java:63)
      at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupDataSource(ProviderContainerContractInfoBase.java:71)
      at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.&lt;init&gt;(PersistenceUnitInfoImpl.java:108)
      at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
      at org.glassfish.persistence.jpa.PersistenceUnitLoader.&lt;init&gt;(PersistenceUnitLoader.java:107)
      at org.glassfish.persistence.jpa.JPADeployer$1.visitPUD(JPADeployer.java:223)
      at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:510)
      at org.glassfish.persistence.jpa.JPADeployer.createEMFs(JPADeployer.java:230)
      at org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:168)
  ... *it continues*
  </code></pre>
  
  <p>And this is my .gitignore (Maybe am I missing some important file?)</p>
  
  <pre><code>nbproject/private/
  build/
  nbbuild/
  dist/
  nbdist/
  nbactions.xml
  nb-configuration.xml
  .nb-gradle/
  
  *.class
  
  .mtj.tmp/
  
  *.janr
  *.war
  *.ear
  </code></pre>