[
https://issues.apache.org/jira/browse/PHOENIX-1613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14296565#comment-14296565
]
Gabriel Reid commented on PHOENIX-1613:
---------------------------------------
As far as I can see, this issue probably started coming up with the addition of
tracing. Disabling the initialization of tracing using the following change
allows me to connect via Phoenix:
{code}
--- a/phoenix-core/src/main/java/org/apache/phoenix/metrics/Metrics.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/metrics/Metrics.java
@@ -42,7 +42,7 @@ public class Metrics {
synchronized (Metrics.class) {
if (!initialized) {
LOG.info("Initializing metrics system: " +
Metrics.METRICS_SYSTEM_NAME);
- manager.init(Metrics.METRICS_SYSTEM_NAME);
+// manager.init(Metrics.METRICS_SYSTEM_NAME);
initialized = true;
}
}
{code}
I'm thinking that the approach of pasting commons-collections 3.2.1 won't
really solve the issue either, seeing as Squirrel would probably still be
loading the 2.x version of classes, causing the same kinds of conflicts.
I also don't think it'll work to have phoenix-client phoenix-server depend on
different versions of commons-collections. As far as I know, there isn't a sane
way to convince maven to do this.
Options I can think of right now are:
* just suggest dropping in commons-collections 3.2.1 into the Squirrel install
(although this still needs to be tested)
* make the initialization of metrics able to deal with this kind of failure and
just log it instead of propagating the exception up the stack. This would mean
that metrics wouldn't work (for now) with Squirrel, but other than that I don't
think there would be any other issues.
My feeling is that the second option is the best one for now, unless there are
other suggestions.
> Phoenix can't be used directly with SquirrelSQL
> -----------------------------------------------
>
> Key: PHOENIX-1613
> URL: https://issues.apache.org/jira/browse/PHOENIX-1613
> Project: Phoenix
> Issue Type: Bug
> Reporter: Gabriel Reid
> Attachments: PHOENIX-1613.patch
>
>
> Due to an conflicting versions of (at least) commons-collections, Phoenix no
> longer works with [SquirrelSQL|http://squirrel-sql.sourceforge.net]. The
> error that is given is the following:
> {code}
> java.lang.IllegalAccessError: class
> org.apache.commons.collections.iterators.EmptyOrderedIterator cannot access
> its superclass
> org.apache.commons.collections.iterators.AbstractEmptyIterator
> {code}
> SquirrelSQL apparently uses commons-collections 2.x, while Phoenix uses
> commons-collections 3.2.1.
> It's not totally clear what can be done to resolve this. It wasn't previously
> an issue, so there is a specific piece of code (apparently related to
> tracing) that now tickles this incompatibility. Probably the easiest fix is
> to get SquirrelSQL to upgrade to a more recent version of
> commons-collections, although there may be other ways to resolve this.
> This issue has already been reported as-is to the SquirrelSQL project:
> http://sourceforge.net/p/squirrel-sql/mailman/message/33039278/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)