I saw in an post in payara blog that after create the data source for jta in web.xml, you have to put the JDBC Driver jar in lib dir inside of WEB-INF, but I don't put, and worked independently, do you know if is really necessary or why worked?
In Payara Micro you don't need to add the jdbc jar to any folder.
You simply add it in your maven pom.xml file and it will package it into the war file which will be your application. When it starts that jdbc.jar driver will be in your classpath so your DataSource will have access to it. Really convenient.
This works at least since 5.194, but likely before that as well.
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.16</version>
</dependency>