java.io.FileNotFoundException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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: if ( filePart != null && filePart.indexOf( ' ' ) != -1 ) { ... In my case this if is failing because the filePart does not have a space ' ' in it. The else does the following: jarFile = new JarFile( jarUrl.toURI().getSchemeSpecificPart() ); The above line is what generates the Exception. If I comment out the && part (filePart.indexOf( ' ' ) != -1), everything will work fine. In netweaver the method jarUrl.toURI().getSchemeSpecificPart(), returns a full qualified name with a \\localhost. This is where the exception occurs. Example: //localhost/C:/usr/sap/CE1/J00/j2ee/cluster/apps/JavaEE/sfw-web-piloto/servlet_jsp/sfw-web-piloto/root/sfw-fmk-log-aop-1.0.3-20110225.130112-22.jar Is there a reason for this different treatment ? (jarFile = new JarFile( jarUrl.getFile() ) and jarUrl.toURI().getSchemeSpecificPart()). Bellow is the stacktrace: 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)
    via by John Augusto Charnet,
  • 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: if ( filePart != null && filePart.indexOf( ' ' ) != -1 ) { ... In my case this if is failing because the filePart does not have a space ' ' in it. The else does the following: jarFile = new JarFile( jarUrl.toURI().getSchemeSpecificPart() ); The above line is what generates the Exception. If I comment out the && part (filePart.indexOf( ' ' ) != -1), everything will work fine. In netweaver the method jarUrl.toURI().getSchemeSpecificPart(), returns a full qualified name with a \\localhost. This is where the exception occurs. Example: //localhost/C:/usr/sap/CE1/J00/j2ee/cluster/apps/JavaEE/sfw-web-piloto/servlet_jsp/sfw-web-piloto/root/sfw-fmk-log-aop-1.0.3-20110225.130112-22.jar Is there a reason for this different treatment ? (jarFile = new JarFile( jarUrl.getFile() ) and jarUrl.toURI().getSchemeSpecificPart()). Bellow is the stacktrace: 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)
    via by John Augusto Charnet,
  • loading icons from jar file
    via by 843802,
  • v3.x Add Bot Task possible Errors
    via runawfe by erickv
    ,
  • Jax-ws war deploys, but gives 404 on tomcat
    via Stack Overflow by user1958756
    ,
    • 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)

    Users with the same issue

    marcbouvierdav
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    29 more bugmates