Incorrect file being used to create JarVisitor from VFS3 URLs
-------------------------------------------------------------
Key: JBJPA-23
URL:
https://jira.jboss.org/jira/browse/JBJPA-23
Project: JBoss JPA
Issue Type: Bug
Components: deployers
Affects Versions: 1.0.1
Reporter: John Bailey
Assignee: John Bailey
There is a problem with the JarVIsitor being created by
org.hibernate.ejb.EJB3Configuration for VFS3 file: urls. The main problem is the
JarVisitorFactory is calling URL.getFile and then attempting to use a JDK file pointed at
a nested JAR file. This fails as the File points to in an invalid File path.
This can be fixed in a couple different ways:
1. JPA deployers can pass an absolute URL to the JAR file on the filesystem into the
EJB3Configuration. This is inefficient as it will create a JarFile and unzip the jar
file, which has already been scanned by VFS.
2. Pass in a the absolute URL to the temporary directory for the mounted jar. This would
save from second JarFile creation, but will not always work as there is no guarantee the
file system is fully populated in the temp filesystem. So this would require the temp
file system to be forcefully populated from the VFS zip mount.
So for now, we will have to go with the option 1 and pass the fully path to the jar file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira