I'm not sure where is the bug, sorry if I'm wrong.
I can reproduce it in the following way:
Creating tests backed by OpenEJB, I add a dependency in test scope, which have other dependency, which have more beans and another PersistenceContext.
Something like: Root <- dep <- Persistence
Anyway, what happens is that somehow the FileZippedJarVisitor searches for Persistence.jar inside dep.jar, like dep.jar was a directory, throwing a FileNotFoundException.
I describe a little more this bug in stackoverflow (http://stackoverflow.com/questions/16422225/hibernate-filezippedjarvisitor-error-in-test-jar), if you need any more info, please let me know.
Linux 3.2.0-25 - Ubuntu, Hibernate 3.3.2, Maven3, HSQLDB (for test) and MySQL (production)
Oops, wrong version, is actually 4.0.1.Final. Sorry;
Please provide a test case that we can use to reproduce the issue. Although, I'm curious to see if you still have an issue in a more recent version of ORM. The scanner concepts are very different in 4.3.
Note: In an attempt to clean up the HHH JIRA, we will be rejecting any ticket that sits in the "Awaiting Test Case" state for 2-3 months with no response. So, if this issue is critical to you, please attach a reproducing test case ASAP. Thanks!
Bulk rejecting issues lacking a test case or recent response.