Hello, I'm trying do deploy JSF with JPA based application in Netweaver CE 7.2. The application deploys fine in tomcat, weblogic and glassfish.
In Netweaver, when Hibernate starts looking for my entities, I keep getting a FileNotFoundException. I've looked up the FileZippedJarVisitor source code, and noticed that there is the following if in the method doProcessElements:
Code:
if ( filePart != null && filePart.indexOf( ' ' ) != -1 ) {
In my case this if is failing because the filePart does not have a space ' ' in it.
And the else does the following:
Code:
jarFile = new JarFile( jarUrl.toURI().getSchemeSpecificPart() );
This is the line that generates the Exception. If I comment out the && part
Code:
filePart.indexOf( ' ' ) != -1
, everything will work fine.
Is there a reason why the jarFile is created differently when it has a space ' ' in it's directoty ?
Below is the stackTrace of my Exception.
Thanks a lot.
Sincerely,
John
Code:
WARN | 2010-09-17 15:42:34,363 | FileZippedJarVisitor.java:50 | Unable to find file (ignored): file://localhost/C:/usr/sap/CE1/J00/j2ee/cluster/apps/JavaEE/sfw-condicao-pagamento-web/servlet_jsp/sfw-condicao-pagamento-web/root/sfw-class-loader-0.0.1-SNAPSHOT.jar
java.io.FileNotFoundException: \\localhost\C:\usr\sap\CE1\J00\j2ee\cluster\apps\JavaEE\sfw-condicao-pagamento-web\servlet_jsp\sfw-condicao-pagamento-web\root\sfw-class-loader-0.0.1-SNAPSHOT.jar (The network name cannot be found)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:114)
at java.util.jar.JarFile.<init>(JarFile.java:133)
at java.util.jar.JarFile.<init>(JarFile.java:70)
at org.hibernate.ejb.packaging.FileZippedJarVisitor.doProcessElements(FileZippedJarVisitor.java:46)
at org.hibernate.ejb.packaging.AbstractJarVisitor.getMatchingEntries(AbstractJarVisitor.java:139)
at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:287)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:614)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:358)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)