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)

Hibernate JIRA | John Augusto Charnet | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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)

    Hibernate JIRA | 6 years ago | John Augusto Charnet
    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)
  2. 0

    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)

    Hibernate JIRA | 6 years ago | John Augusto Charnet
    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)
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    FileNotFoundException: Publishing to Oracle Web... | Oracle Community

    oracle.com | 2 years ago
    java.io.FileNotFoundException: C:\my\worspace\path\.metadata\.plugins\org.eclipse.core.resources\.projects\MyProjectNameEAR\beadep\my_domain_name\MyProjectNameEAR\split_src\MyProjectNameWeb.war (The system cannot find the file specified)
  5. 0

    FileNotFoundException: Publishing to Oracle Web... | Oracle Community

    oracle.com | 1 year ago
    java.io.FileNotFoundException: C:\my\worspace\path\.metadata\.plugins\org.eclipse.core.resources\.projects\MyProjectNameEAR\beadep\my_domain_name\MyProjectNameEAR\split_src\MyProjectNameWeb.war (The system cannot find the file specified)

  1. marcbouvierdav 1 times, last 2 weeks ago
  2. Victor_IT 2 times, last 4 weeks ago
  3. QrCeric 1 times, last 3 months ago
  4. Omya 1 times, last 3 months ago
  5. ccarpenter04 1 times, last 3 months ago
6 more registered users
4 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Java RT
    JarFile.<init>
    1. java.util.zip.ZipFile.open(Native Method)
    2. java.util.zip.ZipFile.<init>(ZipFile.java:114)
    3. java.util.jar.JarFile.<init>(JarFile.java:133)
    4. java.util.jar.JarFile.<init>(JarFile.java:70)
    4 frames
  3. Hibernate EJB
    HibernatePersistence.createContainerEntityManagerFactory
    1. org.hibernate.ejb.packaging.FileZippedJarVisitor.doProcessElements(FileZippedJarVisitor.java:46)
    2. org.hibernate.ejb.packaging.AbstractJarVisitor.getMatchingEntries(AbstractJarVisitor.java:139)
    3. org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:287)
    4. org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:614)
    5. org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:358)
    6. org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
    6 frames