I've been spending some time getting Hiberbnate's JPA implementation working with 1.4, and I can run all the JUnit test cases now without errors (excepting the three errors I get out of the box).
I use an automatic bytecode rewriting tool (i.e. Retroweaver), and the only real problem I had was that org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses is using the new 1.5 chained exception constructor for IllegalArgumentException:
Code:
if ( pkg == null ) {
throw new IllegalArgumentException( "class or package not found: ", cnfe );
}
There are ways for me to work around this, but the simplest method is just for the Hibernate team to rewrite this code using the 1.4 constructor.
So, the broader question I have, is:
In general, how would the Hibernate team feel about trying to avoid 1.5 specific APIs in their implementation of JPA? Seeing as the team already strives to keep the core of Hibernate compatible with earlier JDK versions, it would be super nice if the same approach could be used for JPA.