<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Why there are two guava JARs in Axon.ivy engine's lib/shared?</title><link>https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared</link><description>&lt;p&gt;Hi Ivy team&lt;/p&gt;
&lt;p&gt;Our team are about to use Guava in our project. The version we use is 19.0. When we test on Axon.ivy Designer, everything works just fine. However, when we deploy on engine, it get exception at runtime:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Caused by: java.lang.NoSuchMethodError: com.google.common.collect.Range.closed(Ljava/lang/Comparable;Ljava/lang/Comparable;)Lcom/google/common/collect/Range;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;After digging around, we discovered that there are 2 jars of guava in Axon.ivy engine's &lt;code&gt;lib/shared&lt;/code&gt; directory: &lt;code&gt;guava-16.0.1.jar&lt;/code&gt; and &lt;code&gt;guava-11.0.2.jar&lt;/code&gt;. At runtime, somehow Axon.ivy Engine chooses to load &lt;code&gt;guava-11.0.2.jar&lt;/code&gt; and ignore the other jar.&lt;/p&gt;
&lt;p&gt;My questions are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Why there two jars of two different version?&lt;/li&gt;
&lt;li&gt;Is there anyway we can use &lt;code&gt;guava-19.0&lt;/code&gt; without overriding Axon.ivy engine's &lt;code&gt;lib/shared&lt;/code&gt;?&lt;/li&gt;
&lt;/ul&gt;</description><atom:link href="https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 10 May 2016 14:51:39 -0400</lastBuildDate><item><title>Comment by Reguel Wermelinger on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared#1767</link><description>&lt;p&gt;No its not intentional. I've fixed it on trunk. With the next version (6.2) only guava-16 will be on the classpath.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Tue, 10 May 2016 14:51:39 -0400</pubDate><guid>https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared#1767</guid></item><item><title>Comment by Genzer Hawker on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared#1766</link><description>&lt;p&gt;But you haven't answered the first question though: why are there 2 version of guava in axon.ivy engine's shared lib? Is it intentional?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Genzer Hawker</dc:creator><pubDate>Tue, 10 May 2016 14:44:36 -0400</pubDate><guid>https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared#1766</guid></item><item><title>Comment by Reguel Wermelinger on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared#1765</link><description>&lt;p&gt;It could be part of the 'applicationContextVersion' feature which we are prototyping right now and should be released at least with 7.0. 
But to be 100% sure, that the server runtime behaves like the designer, OSGI classloading is required. Today there are no plans to do this...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Tue, 10 May 2016 13:59:40 -0400</pubDate><guid>https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared#1765</guid></item><item><title>Comment by Genzer Hawker on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared#1764</link><description>&lt;p&gt;Then somehow I lose the benefits of using &lt;code&gt;maven&lt;/code&gt; to control dependency. Not to mention I have to re-repack every time I want to use a newer version. Is there any better way to deal with this? I mean, in the future release of Axon.ivy?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Genzer Hawker</dc:creator><pubDate>Tue, 10 May 2016 13:36:55 -0400</pubDate><guid>https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared#1764</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared/1763</link><description>&lt;p&gt;I suggest that you repackage the guava version you want to use into a new namespace. Then you are save that no other version is used. More about repackaging can be found in this post: &lt;a href="http://answers.axonivy.com/questions/960/use-the-latest-hsqldb-within-my-project"&gt;http://answers.axonivy.com/questions/960/use-the-latest-hsqldb-within-my-project&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Tue, 10 May 2016 13:27:57 -0400</pubDate><guid>https://answers.axonivy.com/questions/1762/why-there-are-two-guava-jars-in-axon-ivy-engine-s-lib-shared/1763</guid></item></channel></rss>