-->
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.  [ 10 posts ] 
Author Message
 Post subject: Incorrect processing of URLs in Hibernate
PostPosted: Wed Jun 28, 2006 2:15 pm 
Newbie

Joined: Wed Mar 29, 2006 3:47 pm
Posts: 17
Looking at the source code of org.jboss.util.file.ArchiveBrowser available at http://fisheye.jboss.com/viewrep/JBoss/jboss-common/src/main/org/jboss/util/file/ArchiveBrowser.java?r=1.2&k=

I see that it is using

Code:
new File(url.getFile())
instead of using

Code:
new File(url.toURI())


URL.toURI() method does appropriate escape character decoding which is necessary since the original file name contains white space character. See http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#toURL() for more details.

This is causing users of GlassFish who are trying to use Hibernate in GlassFish on Windows platform as reported in http://forums.java.net/jive/thread.jspa?threadID=16472

Thanks,
Sahoo


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 28, 2006 6:31 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
JBoss != Hibernate

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 28, 2006 7:36 pm 
Senior
Senior

Joined: Sun Jun 04, 2006 1:58 am
Posts: 136
tenwit wrote:
JBoss != Hibernate


not yet i guess ;)

_________________
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 28, 2006 8:50 pm 
Newbie

Joined: Wed Mar 29, 2006 3:47 pm
Posts: 17
tenwit wrote:
JBoss != Hibernate

Sorry, I don't understand why you mentioned the above line. Explain, please. User is using Hibernate in GlassFish, so there is no JBoss here. If Hibernate is using a JBoss library in its implementation, then from a user's stand point, it's a bug in Hibernate.

Thanks,
Sahoo.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 28, 2006 9:11 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Hibernate does not use JBoss. JBoss uses hibernate. The link that you posted is a link to JBoss code, not hibernate code. This is not the correct forum to post bugs in JBoss code.

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 28, 2006 9:46 pm 
Newbie

Joined: Wed Mar 29, 2006 3:47 pm
Posts: 17
tenwit wrote:
Hibernate does not use JBoss. JBoss uses hibernate. The link that you posted is a link to JBoss code, not hibernate code. This is not the correct forum to post bugs in JBoss code.


From the beginning, I have been saying that user is using Hibernate in GlassFish application server. There is no JBoss here. Look at the stacktrace in GlassFish forum (link posted in my first posting) which shows the following:
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: The system cannot find the path specified
at org.jboss.util.file.JarArchiveBrowser.<init>(JarArchiveBrowser.java:40)
at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:37)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:541)

What does this mean? Hibernate class org.hibernate.ejb.Ejb3Configuration uses JBoss utility class org.jboss.util.file.ArchiveBrowser, right? By the way, I am not denying that JBoss uses Hibernate. All I am saying is that in this case, Hibernate has a dependency on JBoss library, to be particular jboss-archive-browsing.jar.

Coming to why I used this forum:
I need a context to report an issue. Since I came across the issue in the context of Hibernate, I reported in this forum. How many forums do you want users to go to use Hibernate? Are Hibernate developers not responsible for getting this bug fixed in JBoss library. Which JBoss forum is the appropriate place for this question?
More importantly, we are deviating from the real issue. The real issues is to find out if this is acknowledged as a bug by Hibernate developers or not. I hope one of them responds soon.

Sahoo


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 28, 2006 10:02 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Whether or not they respond, it's not part of the hibernate code base. Hibernate developers are a separate group of people to JBoss developers, and as the bug you've found is part of the JBoss code base, it is the JBoss developers who need to be informed.

Hibernate is an open source project, run by volunteers. Not paid support staff. You cannot expect people who have put hard work into giving you free software to put effort into fixing a bug that has nothing to do with them. You're obviosuly willing to go to some effort to ensure that someone knows that there's a problem: why not put a little of that effort into finding out who needs to know about this, and how to get in contact with them? If it helps, I'll even do it for you. You need to go to http://jira.jboss.com/jira/secure/Dashboard.jspa

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 25, 2006 8:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
tenwit: that code is most likely used by Hibernate Annotations and thus it is relevant.

Afaik, emmanuel already fixed this.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 6:37 am 
Newbie

Joined: Fri Jul 20, 2007 6:02 pm
Posts: 12
I've read that in many places, but was unable to get it to work. I'm using the latest hibernate core, annotations and entitymanager on Glassfish. What I ended up getting to work was

Session session = ((HibernateEntityManager) em.getDelegate()).getSession();

Even the netbeans wiki page about using the hibernate session with JPA (on glassfish) shows doing it the way emmanuel said.

I feel like a must be missing something. Hopefully I can revisit this sometime.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 6:39 am 
Newbie

Joined: Fri Jul 20, 2007 6:02 pm
Posts: 12
Ups, not here.
Sorry.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 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.