The java:comp/env namespace is per component. What this means is, this namespace and the objects bound in this namespace are accessible only to the component to which this java:comp/env namespace belongs to.
at javax.naming.InitialContext.listBindings(InitialContext.java:418)
at com.test.EntityTest.main(EntityTest.java)
Going by this exception stacktrace, you are trying to lookup the java:comp namespace from a standalone java client, which does not have java:comp namespace of its own