Hibernate Tools: Error parsing JNDI name
I was having a similar problem, specifically causing the "Error parsing JNDI name", and it was easily fixed by simply removing the empty name attribute from the session-factory tag.
My hibernate.cfg.xml had
<session-factory name="">
This was auto-generated, so I just removed the name
attrib.
This fix was found here: https://forum.hibernate.org/viewtopic.php?f=1&t=1014760
The problem is from your hibernate tool, you have configured the hibernate tool to use persistence unit which has a jta data-source configured via JNDI. In order for the ant task to talk to JNDI it needs naming factory url and provider. Use the naming factory class of your application server where the datasource is configured.
Hope it helps.