-->
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.  [ 11 posts ] 
Author Message
 Post subject: Building with Hibernate 3.05
PostPosted: Thu Jul 12, 2007 11:44 am 
Regular
Regular

Joined: Tue Oct 10, 2006 2:21 pm
Posts: 58
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.05

We have an application that uses Hibernate 3.05 and we can't easily upgrade to a more recent version of Hibernate. This application is deployed on WebSphere, and we are trying to upgrade our development platform from Rational Application Developer 6.0 to 7.0. This has brought up a couple of issues with Hibernate.

RAD 7.0 attempts to validate hibernate mapping files against http://hibernate.sourceforge.net/hibern ... ng-3.0.dtd
RAD 6.0 does not do so and had no problem. Run-time validation is done against the hibernate-mapping-3.0.dtd file included in the hibernate3.jar included in the 3.05 distribution. But there are a few differences between the version of hibernate-mapping-3.0.dtd file in the 3.05 distribution jar and what currently sits on the WEB, so we can't build.

Should Hibernate be changing this file? I suppose I can turn validation off, but I'd rather not.

Another issue is that Hibernate 3.05 ships with antlr-2.7.5H3.jar, which contains a manifest.mf file that does not terminate with a line-feed, an apparently ancient standard that IBM/Rational has now decided to enforce.

Any suggestions on working around these ridiculous issues would be appreciated.

I know someone is going to say we should be taking these issues up with IBM. Please be assured that we are - but I wanted to touch all bases before resorting to some ugly hack.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 11:48 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
1. The mapping file online is for Hibernate 3.2 (yes, the version number didn't change because it is essentially backwards compatbile). Your environment should not resolve this online, this is a bug in your IDE/whatever.

2. Unpack the antlr.jar, change the manifest, build a new JAR.

3. Talk to IBM.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 11:53 am 
Regular
Regular

Joined: Tue Oct 10, 2006 2:21 pm
Posts: 58
Thanks.

While I agree that the problem with the DTDs is the IDE doing validation where it shouldn't

Is there any reason why you wouldn't want to have a
http://hibernate.sourceforge.net/hibern ... ng-3.2.dtd

to avoid such confusion?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 12:04 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
"(yes, the version number didn't change because it is essentially backwards compatbile)"

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 12:13 pm 
Regular
Regular

Joined: Tue Oct 10, 2006 2:21 pm
Posts: 58
Your "essentially" is essentially like being a little bit pregnant. From the point of view of the 3.0 user you are not backward compatible at all.

I still don't understand why you wouldn't post a 3.2 version, recommend 3.2 users to use it, understanding that they might be able to get away with using the 3.0 version and leave the 3.0 version for the 3.0 users.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 12:21 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
3. Talk to IBM.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 12:25 pm 
Regular
Regular

Joined: Tue Oct 10, 2006 2:21 pm
Posts: 58
Quote:
Talk to IBM.


Believe me, I am and more sharply than I am to you.

But you haven't answered my question.

I am essentially caught in the middle of a food fight between JBoss and IBM.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 12:34 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
No, you are caught in the middle between an open source project, which you can modify at any time, and a proprietary closed source product, which you can not touch at all except through the vendor. JBoss has nothing to do with this, otherwise you'd be using a customer support system for your request.

Hibernate 3.2 mapping files run on Hibernate 3.0.5, minus not supported features. Your 3.0.5 mapping files validate against the 3.0(3.2) online DTD. No elements or attributes have been taken away. They are _essentially_ compatible, and if not, the problem should be fixed.

Since you have shown no code, no mappings, no exceptions, "we can't build" is unlikely to get you any more specific help here.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 12:49 pm 
Regular
Regular

Joined: Tue Oct 10, 2006 2:21 pm
Posts: 58
Fair enough.

Here is the mapping file showing the problematic attribute (in bold)

Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
...      
      <one-to-one name="featureSettings"
         class="blah.blah.blah.FeatureSettingsPackage"
         property-ref="lcmSession"
         cascade="delete"
         [b]lazy="true"[/b]
         fetch="select"
         
      />
...      

   
   
</hibernate-mapping>


Is there a value of the lazy attribute that does what we want and satisfies both the distributed and currently public definitions of hibernate-mapping-3.0.dtd?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 2:09 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
OK, here is the summary for 3.0.5:

A. lazy="true" requires the bytecode enhancer for lazy loading without proxies

B. lazy="proxy" requires constraint="true" for lazy loading with proxies

C. lazy="false" disables lazy loading

Option A. was renamed to "no-proxy" in 3.2 to avoid confusion and to align it with other options. So yes, this mapping file does not validate against the 3.2 DTD because lazy="true" doesn't exist anymore. File a JIRA issue and get IBM to fix the resolver meanwhile.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 2:11 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Note that it is extremely unlikely that we will introduce lazy="true" again for the newest DTD, exactly because that would defeat the purpose of avoiding confusion.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.