[jitsi-dev] [jitsi-commits] master: Update Google Collections RC1 to Guava 15 (e7cd23f)


#1

Hey Ingo,

I found that google contacts stopped working. The exception was:

     [java] 11:07:02.764 SEVERE: [37]
util.UtilActivator.uncaughtException().108 An uncaught exception
occurred in thread=Thread[Thread-128,6,main] and message was:
com/google/common/collect/Maps
     [java] java.lang.NoClassDefFoundError: com/google/common/collect/Maps
     [java] at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:118)
     [java] at com.google.gdata.wireformats.AltRegistry.<init>(AltRegistry.java:100)
     [java] at com.google.gdata.client.Service.<clinit>(Service.java:555)
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsConnectionImpl.<init>(GoogleContactsConnectionImpl.java:53)
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsSourceService.getConnection(GoogleContactsSourceService.java:222)
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsQuery.run(GoogleContactsQuery.java:118)
     [java] at net.java.sip.communicator.service.contactsource.AsyncContactQuery$1.run(AsyncContactQuery.java:250)
     [java] Caused by: java.lang.ClassNotFoundException:
com.google.common.collect.Maps not found by
net.java.sip.communicator.googlecontacts [128]
     [java] at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:812)
     [java] at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)
     [java] at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1807)
     [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
     [java] ... 7 more
     [java] 11:07:02.796 SEVERE: [38]
util.UtilActivator.uncaughtException().108 An uncaught exception
occurred in thread=Thread[Thread-130,6,main] and message was: Could
not initialize class com.google.gdata.client.contacts.ContactsService
     [java] java.lang.NoClassDefFoundError: Could not initialize class
com.google.gdata.client.contacts.ContactsService
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsConnectionImpl.<init>(GoogleContactsConnectionImpl.java:53)
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsSourceService.getConnection(GoogleContactsSourceService.java:222)
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsQuery.run(GoogleContactsQuery.java:118)
     [java] at net.java.sip.communicator.service.contactsource.AsyncContactQuery$1.run(AsyncContactQuery.java:250)

I tried fixing it by editing the manifest, but another exception popuped:

     [java] 11:25:55.404 SEVERE: [164]
util.UtilActivator.uncaughtException().108 An uncaught exception
occurred in thread=Thread[Thread-133,6,main] and message was:
com.google.common.collect.ImmutableSet.of([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
     [java] java.lang.NoSuchMethodError:
com.google.common.collect.ImmutableSet.of([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
     [java] at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableTypes(AltFormat.java:399)
     [java] at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableXmlTypes(AltFormat.java:387)
     [java] at com.google.gdata.wireformats.AltFormat.<clinit>(AltFormat.java:49)
     [java] at com.google.gdata.client.Service.<clinit>(Service.java:558)
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsConnectionImpl.<init>(GoogleContactsConnectionImpl.java:53)
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsSourceService.getConnection(GoogleContactsSourceService.java:222)
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsQuery.run(GoogleContactsQuery.java:118)
     [java] at net.java.sip.communicator.service.contactsource.AsyncContactQuery$1.run(AsyncContactQuery.java:250)
     [java] 11:25:55.685 SEVERE: [171]
util.UtilActivator.uncaughtException().108 An uncaught exception
occurred in thread=Thread[Thread-140,6,main] and message was: Could
not initialize class com.google.gdata.client.contacts.ContactsService
     [java] java.lang.NoClassDefFoundError: Could not initialize class
com.google.gdata.client.contacts.ContactsService
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsConnectionImpl.<init>(GoogleContactsConnectionImpl.java:53)
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsSourceService.getConnection(GoogleContactsSourceService.java:222)
     [java] at net.java.sip.communicator.impl.googlecontacts.GoogleContactsQuery.run(GoogleContactsQuery.java:118)
     [java] at net.java.sip.communicator.service.contactsource.AsyncContactQuery$1.run(AsyncContactQuery.java:250)

But for this I think maybe we need to update gdata, but as I remember
I tried it once and there was something missing in newer builds we are
using, but didn't dig in it to check is it needed and how it can be
fixed.

When updating to guava for the debian source package I fixed the
latest exception with a patch for gdata, but this is not the case when
using a jar file :slight_smile:

WDYT?

Regards
damencho

···

On Sun, Jan 12, 2014 at 4:39 PM, <ingo@jitsi.org> wrote:

Repository : ssh://lists.jitsi.org/jitsi

On branch : master
Link : https://github.com/jitsi/jitsi/compare/d25350c7a6f90875070b5784421220fb22f4a169...09c0ef620b050e601cdc75c13bc7d54a2d7cc335

---------------------------------------------------------------

commit e7cd23f4345012d397e9bfe3a0bfd660ba1c100d
Author: Ingo Bauersachs <ingo@jitsi.org>
Date: Sun Jan 12 14:15:30 2014 +0100

    Update Google Collections RC1 to Guava 15

---------------------------------------------------------------

e7cd23f4345012d397e9bfe3a0bfd660ba1c100d
.classpath | 2 +-
build.xml | 11 ++++++++---
lib/felix.client.run.properties | 3 ++-
lib/felix.unit.test.properties | 3 ++-
lib/installer-exclude/google-collect-1.0-rc1.jar | Bin 548821 -> 0 bytes
lib/installer-exclude/guava-15.0.jar | Bin 0 -> 2172168 bytes
6 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/.classpath b/.classpath
index f873dfd..1304681 100755
--- a/.classpath
+++ b/.classpath
@@ -27,7 +27,7 @@
        <classpathentry kind="lib" path="lib/installer-exclude/gdata-contacts-3.0.jar"/>
        <classpathentry kind="lib" path="lib/installer-exclude/gdata-contacts-meta-3.0.jar"/>
        <classpathentry kind="lib" path="lib/installer-exclude/gdata-core-1.0.jar"/>
- <classpathentry kind="lib" path="lib/installer-exclude/google-collect-1.0-rc1.jar"/>
+ <classpathentry kind="lib" path="lib/installer-exclude/guava-15.0.jar"/>
        <classpathentry kind="lib" path="lib/installer-exclude/hexdump-0.2.jar"/>
        <classpathentry kind="lib" path="lib/installer-exclude/httpclient-osgi-4.2.3.jar"/>
        <classpathentry kind="lib" path="lib/installer-exclude/httpcore-osgi-4.2.3.jar"/>
diff --git a/build.xml b/build.xml
index ec40adb..49170e2 100644
--- a/build.xml
+++ b/build.xml
@@ -1086,8 +1086,9 @@
         bundle-globalshortcut,bundle-plugin-msofficecomm,bundle-libjitsi,
         bundle-customcontactactions, bundle-phonenumbercontactsource,
         bundle-demuxcontactsource, bundle-muc,
- bundle-desktoputil,bundle-globaldisplaydetails,
- bundle-plugin-propertieseditor,bundle-plugin-accountinfo"/>
+ bundle-desktoputil,bundle-globaldisplaydetails,
+ bundle-plugin-propertieseditor,bundle-plugin-accountinfo,
+ bundle-guava"/>

     <!--BUNDLE-SC-LAUNCHER-->
     <target name="bundle-sc-launcher">
@@ -1364,7 +1365,6 @@
                 prefix="net/java/sip/communicator/service/googlecontacts"/>
             <zipfileset dir="${dest}/net/java/sip/communicator/impl/googlecontacts"
                 prefix="net/java/sip/communicator/impl/googlecontacts" />
- <zipfileset src="${lib.noinst}/google-collect-1.0-rc1.jar" prefix=""/>
             <zipfileset src="${lib.noinst}/gdata-core-1.0.jar" prefix=""/>
             <zipfileset src="${lib.noinst}/gdata-contacts-3.0.jar" prefix=""/>
             <zipfileset src="${lib.noinst}/gdata-contacts-meta-3.0.jar" prefix=""/>
@@ -1372,6 +1372,7 @@
             <zipfileset src="${lib.noinst}/gdata-client-meta-1.0.jar" prefix=""/>
         </jar>
     </target>
+
     <!--BUNDLE-GOOGLECONTACTS-SERVICE-->
     <target name="bundle-googlecontacts-service">
         <jar compress="false" destfile="${bundles.dest}/googlecontacts-service.jar"
@@ -1381,6 +1382,10 @@
         </jar>
     </target>

+ <target name="bundle-guava">
+ <copy file="${lib.noinst}/guava-15.0.jar" tofile="${bundles.dest}/guava.jar"/>
+ </target>
+
     <!--BUNDLE-SERVICEBINDER -->
     <target name="bundle-servicebinder">
         <jar compress="true" destfile="lib/bundle/servicebinder.jar"
diff --git a/lib/felix.client.run.properties b/lib/felix.client.run.properties
index 21b73a8..ec6b8b6 100644
--- a/lib/felix.client.run.properties
+++ b/lib/felix.client.run.properties
@@ -33,7 +33,8 @@ felix.auto.start.10= \
  reference:file:lib/bundle/org.apache.felix.bundlerepository-1.6.4.jar \
  reference:file:sc-bundles/bouncycastle.jar \
  reference:file:sc-bundles/bccontrib.jar \
- reference:file:sc-bundles/commons-lang.jar
+ reference:file:sc-bundles/commons-lang.jar \
+ reference:file:sc-bundles/guava.jar

# file:lib/bundle/shell.jar \
# file:lib/bundle/servicebinder.jar \
diff --git a/lib/felix.unit.test.properties b/lib/felix.unit.test.properties
index 0b9323f..bfdea57 100644
--- a/lib/felix.unit.test.properties
+++ b/lib/felix.unit.test.properties
@@ -49,7 +49,8 @@ felix.auto.start.10= \
  reference:file:lib/installer-exclude/objenesis-1.2.jar \
  reference:file:lib/installer-exclude/cglib-nodep.osgi-2.1_3.jar \
  reference:file:sc-bundles/bouncycastle.jar \
- reference:file:sc-bundles/bccontrib.jar
+ reference:file:sc-bundles/bccontrib.jar \
+ reference:file:sc-bundles/guava.jar
# file:lib/bundle/shell.jar \
# file:lib/bundle/bundlerepository.jar \
# file:lib/bundle/servicebinder.jar \
diff --git a/lib/installer-exclude/google-collect-1.0-rc1.jar b/lib/installer-exclude/google-collect-1.0-rc1.jar
deleted file mode 100644
index bc499ee..0000000
Binary files a/lib/installer-exclude/google-collect-1.0-rc1.jar and /dev/null differ
diff --git a/lib/installer-exclude/guava-15.0.jar b/lib/installer-exclude/guava-15.0.jar
new file mode 100644
index 0000000..eb9ef8a
Binary files /dev/null and b/lib/installer-exclude/guava-15.0.jar differ

_______________________________________________
commits mailing list
commits@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/commits


#2

Hey Ingo,

I found that google contacts stopped working. The exception was:

[...]

I tried fixing it by editing the manifest, but another exception popuped:

Okay, the manifest would be easy to miss.

[...]

But for this I think maybe we need to update gdata, but as I remember I
tried it once and there was something missing in newer builds we are
using, but didn't dig in it to check is it needed and how it can be
fixed.

When updating to guava for the debian source package I fixed the
latest exception with a patch for gdata, but this is not the case when
using a jar file :slight_smile:

Well, I simply thought there is no harm in updating it to guava as no
compile errors popped up and I knew we already used it in Debian.
Couldn't patch the bundled jar as we do for the Debian builds?

WDYT?

Regards
damencho

Thanks for looking at that,
Ingo


#3

Yes we can do it.

···

On Mon, Jan 13, 2014 at 11:37 AM, Ingo Bauersachs <ingo@jitsi.org> wrote:

Couldn't patch the bundled jar as we do for the Debian builds?