Bug#589599: jbossas4: FTBFS with Hibernate 3.5.x

Miguel Landaeta miguel at miguel.cc
Mon Jul 19 01:42:30 UTC 2010


tags 589599 + patch
thanks

Please see the attached debdiff.

With that patch I could rebuild jbossas4 in a clean chroot
with Hibernate 3.5.x. libhibernate-jbosscache should be
uploaded in order to fix this FTBFS.

Cheers,

-- 
Miguel Landaeta, miguel at miguel.cc
secure email with PGP 0x7D8967E9 available at http://keyserver.pgp.com/
"Faith means not wanting to know what is true." -- Nietzsche
-------------- next part --------------
diff -Nru jbossas4-4.2.3.GA/debian/changelog jbossas4-4.2.3.GA/debian/changelog
--- jbossas4-4.2.3.GA/debian/changelog	2010-04-15 11:31:56.000000000 -0430
+++ jbossas4-4.2.3.GA/debian/changelog	2010-07-18 21:00:59.000000000 -0430
@@ -1,3 +1,11 @@
+jbossas4 (4.2.3.GA-3) UNRELEASED; urgency=low
+
+  * Team upload.
+  * Fix FTBFS with Hibernate 3.5.x. (Closes: #589599).
+  * Bump Standards-Version to 3.9.0. No changes were needed.
+
+ -- Miguel Landaeta <miguel at miguel.cc>  Sun, 18 Jul 2010 20:47:00 -0430
+
 jbossas4 (4.2.3.GA-2) unstable; urgency=low
 
   * Switch back to jgroups 2.6. (Closes: #577878)
diff -Nru jbossas4-4.2.3.GA/debian/control jbossas4-4.2.3.GA/debian/control
--- jbossas4-4.2.3.GA/debian/control	2010-04-15 11:31:21.000000000 -0430
+++ jbossas4-4.2.3.GA/debian/control	2010-07-18 20:56:56.000000000 -0430
@@ -11,11 +11,11 @@
  libcommons-httpclient-java, libaxis-java, ant-optional, bsh,
  libjavassist-java, libjboss-remoting-java, libjboss-aop-java,
  libjboss-serialization-java, libtrove-java, libjgroups2.6-java,
- libjboss-web-services-java, libjboss-cache1-java, libhibernate3-java,
- libhibernate-entitymanager-java, libhibernate-annotations-java,
+ libjboss-web-services-java, libjboss-cache1-java, libhibernate3-java (>= 3.5),
  libcommons-logging-java, libjboss-vfs-java, libjboss-microcontainer-java,
- libjboss-reflect-java, libquartz-java, libjboss-managed-java
-Standards-Version: 3.8.4
+ libjboss-reflect-java, libquartz-java, libjboss-managed-java,
+ libhibernate-jbosscache-java
+Standards-Version: 3.9.0
 Homepage: http://labs.jboss.com/jbossas/
 Vcs-Svn: svn+ssh://svn.debian.org/svn/pkg-java/trunk/jbossas4
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/jbossas4
diff -Nru jbossas4-4.2.3.GA/debian/patches/hibernate35.diff jbossas4-4.2.3.GA/debian/patches/hibernate35.diff
--- jbossas4-4.2.3.GA/debian/patches/hibernate35.diff	1969-12-31 20:00:00.000000000 -0400
+++ jbossas4-4.2.3.GA/debian/patches/hibernate35.diff	2010-07-18 20:44:44.000000000 -0430
@@ -0,0 +1,52 @@
+Description: Compatibility with Hibernate 3.5
+Author: Miguel Landaeta <miguel at miguel.cc>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Forwarded: no
+Last-Update: 2010-07-18
+
+--- jbossas4-4.2.3.GA.orig/ejb3/src/main/org/jboss/ejb3/entity/InjectedSessionFactory.java
++++ jbossas4-4.2.3.GA/ejb3/src/main/org/jboss/ejb3/entity/InjectedSessionFactory.java
+@@ -42,6 +42,7 @@ import org.hibernate.engine.FilterDefini
+ import org.hibernate.metadata.ClassMetadata;
+ import org.hibernate.metadata.CollectionMetadata;
+ import org.hibernate.stat.Statistics;
++import org.hibernate.Cache;
+ import org.jboss.ejb3.PersistenceUnitRegistry;
+ 
+ /**
+@@ -237,4 +238,15 @@ public class InjectedSessionFactory impl
+       return getSessionFactory().getReference();
+    }
+ 
++   // dummy compatibility with Hibernate 3.5.x
++   public boolean containsFetchProfileDefinition(String name)
++   {
++      throw new UnsupportedOperationException("containsFetchProfileDefinition");
++   }
++
++   public Cache getCache()
++   {
++      throw new UnsupportedOperationException("getCache");
++   }
++
+ }
+--- jbossas4-4.2.3.GA.orig/ejb3/src/main/org/jboss/ejb3/entity/JTATableIdGenerator.java
++++ jbossas4-4.2.3.GA/ejb3/src/main/org/jboss/ejb3/entity/JTATableIdGenerator.java
+@@ -40,7 +40,7 @@ import org.hibernate.engine.SessionImple
+ import org.hibernate.exception.JDBCExceptionHelper;
+ import org.hibernate.id.Configurable;
+ import org.hibernate.id.IdentifierGenerationException;
+-import org.hibernate.id.IdentifierGeneratorFactory;
++import org.hibernate.id.IdentifierGeneratorHelper;
+ import org.hibernate.id.PersistentIdentifierGenerator;
+ import org.hibernate.transaction.JBossTransactionManagerLookup;
+ import org.hibernate.transaction.TransactionManagerLookup;
+@@ -263,7 +263,7 @@ public class JTATableIdGenerator impleme
+          tm.commit();
+ 
+          // transform sequence to the desired type and return the value
+-         Number typedSequence = IdentifierGeneratorFactory.createNumber(sequence, returnClass);
++         Number typedSequence = IdentifierGeneratorHelper.createNumber(sequence, returnClass);
+          if (log.isDebugEnabled())
+          {
+             log.debug("generate() returned: " + typedSequence);
diff -Nru jbossas4-4.2.3.GA/debian/patches/series jbossas4-4.2.3.GA/debian/patches/series
--- jbossas4-4.2.3.GA/debian/patches/series	2010-04-15 11:20:17.000000000 -0430
+++ jbossas4-4.2.3.GA/debian/patches/series	2010-07-18 19:03:42.000000000 -0430
@@ -7,3 +7,4 @@
 cluster_debugger.diff
 catch_exception.diff
 deployers.diff
+hibernate35.diff
diff -Nru jbossas4-4.2.3.GA/debian/rules jbossas4-4.2.3.GA/debian/rules
--- jbossas4-4.2.3.GA/debian/rules	2010-04-15 11:21:38.000000000 -0430
+++ jbossas4-4.2.3.GA/debian/rules	2010-07-18 19:07:54.000000000 -0430
@@ -14,7 +14,7 @@
 			   jboss-remoting jboss-aop jgroups-all-2.6 jbossws-common jbossws-spi jbossws-native\
 			   jboss-reflect jboss-cache1 hibernate3 hibernate-annotations \
 			   hibernate-entitymanager commons-logging bsh jboss-vfs \
-			   jboss-managed.jar
+			   jboss-managed.jar hibernate-jbosscache
 
 ALL_JARS = $(wildcard *.jar)
 DEST_DIR = $(DEB_DESTDIR)/usr/share/java


More information about the pkg-java-maintainers mailing list