Why datasource is not found in JNDI after injection from jndi.properties?
This is my persistence.xml : <persistence> <persistence-unit name="MyUnit"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>jdbc/abcDS</jta-data-source> </persistence-unit> </persistence> This is jndi.properties file from src/test/resources which is supposed to create a datasource during testing, since a real application server with a real datasource is absent: java.naming.factory.initial=org.apache.openejb.client.LocalInitialContextFactory jdbc/abcDS=new://Resource?type=DataSource jdbc/abcDS.JdbcDriver=org.hsqldb.jdbcDriver jdbc/abcDS.JdbcUrl=jdbc:hsqldb:mem