I know why it's failing -- it can't find the resource I've specified in the persistence.xml file. Which is purely wrong. I created the database, and connected it to netbeans. What I don't know is why there's extra characters for the resource name in the errors below.
[2014-11-12T14:08:27.655-0700] [glassfish 4.1] [WARNING] [] [javax.enterprise.system.tools.deployment.dol] [tid: _ThreadID=354 _ThreadName=admin-listener(47)] [timeMillis: 1415826507655] [levelValue: 900] [[
This web app [/srv/glassfish4/glassfish/domains/default/applications/EmployeeScheduler-war/] has no resource reference by the name of [users]]]
[2014-11-12T14:08:27.690-0700] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=354 _ThreadName=admin-listener(47)] [timeMillis: 1415826507690] [levelValue: 1000] [[
Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method]]
[2014-11-12T14:08:27.693-0700] [glassfish 4.1] [SEVERE] [] [] [tid: _ThreadID=354 _ThreadName=Thread-9] [timeMillis: 1415826507693] [levelValue: 1000] [[
java.lang.RuntimeException: Invalid resource : users__nontx
The resource should exist and be available. Netbeans connected to it just fine. So why isn't the EAR finding it? What am I doing wrong? How do I fix.
Any other info needed just let me know.
Persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="EmployeeScheduler-warPU_users" transaction-type="JTAs">
<jta-data-source>users</jta-data-source>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:derby://domainaddress/users"/>
<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
<property name="javax.persistence.schema-generation.database.action" value="create"/>
</properties>
</persistence-unit>
</persistence>
So, Turns out the removing the below line from the persistence file let it work.