-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: FileNotFoundException FileZippedJarVisitor in Netweaver
PostPosted: Thu Mar 10, 2011 3:18 pm 
Newbie

Joined: Wed Jul 07, 2010 10:01 am
Posts: 5
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)


Top
 Profile  
 
 Post subject: Re: FileNotFoundException FileZippedJarVisitor in Netweaver
PostPosted: Thu Mar 10, 2011 7:17 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi, could you please report this as an issue on JIRA http://opensource.atlassian.com/projects/hibernate/browse/HHH
and mention the exact versions you're using

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: FileNotFoundException FileZippedJarVisitor in Netweaver
PostPosted: Fri Mar 11, 2011 8:47 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
if you could also give us:
- the url.toString() value
- the jarUrl.toURI().getSchemeSpecificPart()
I'd be nice.

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Re: FileNotFoundException FileZippedJarVisitor in Netweaver
PostPosted: Fri Mar 11, 2011 8:55 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Note that I think it's a Netweaver bug as they seem to be a bit too liberal with their URLs / file names
http://en.wikipedia.org/wiki/File_URI_scheme#Windows_2

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Re: FileNotFoundException FileZippedJarVisitor in Netweaver
PostPosted: Fri Mar 11, 2011 12:59 pm 
Newbie

Joined: Wed Jul 07, 2010 10:01 am
Posts: 5
jarUrl:
file://localhost/C:/usr/sap/CE1/J00/j2e ... 112-22.jar

jarUrl.toURI().getSchemeSpecificPart():
//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

jarUrl.getFile():
/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

Do you really think it is a SAP bug ?

Thanks


Top
 Profile  
 
 Post subject: Re: FileNotFoundException FileZippedJarVisitor in Netweaver
PostPosted: Fri Mar 11, 2011 1:31 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Yes

file://localhost/C:/usr/sap/CE1/J00/j2e ... 112-22.jar

is not valid as one cannot have : in a share name

The correct URL should be

file:///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

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Re: FileNotFoundException FileZippedJarVisitor in Netweaver
PostPosted: Fri Mar 11, 2011 1:32 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Can you open the JIRA, with this information we might be able to find some workaround.

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Re: FileNotFoundException FileZippedJarVisitor in Netweaver
PostPosted: Fri Mar 11, 2011 1:47 pm 
Newbie

Joined: Wed Jul 07, 2010 10:01 am
Posts: 5
I don't know if it is an error.
It looks like Java doesn't know how to interpret this format.
If you use this format in windows explorer (for example), windows will resolve this format and find the file.

I'll open the JIRA and I'll also post in SAP's forum to see what they have to say.

Thanks a lot.

John


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.