Hi, 

I've finally been able to get Phoenix working with Saiku! The alternative jars phoenix-*-client-minimal.jar and phoenix-*-client-without-hbase.jar don't working for me because they do not contain the class org.apache.phoenix.jdbc.PhoenixDriver, which Saiku is using as the entry point for the driver, if I understand correctly. But I've managed to use phoenix-3.0.0-SNAPSHOT-client.jar following your suggestions, although I must admit that I've obtained just a quick and dirty solution: 

* To avoid the jar conflict you have to either delete saiku-server/tomcat/lib/servlet-api.jar, or delete the directory javax.servlet from phoenix-3.0.0-SNAPSHOT-client.jar 

* Another thing making noise was that I got another error after this one:  “org.apache.hadoop.conf.Configuration failed to set setxincludeaware(true) for parser”. I undestand this error is originated by a version conflict between the xerces and xalan jars in my windows 8 host computer with JDK 7, and those installed for the JDK 6 and Hadoop compatibles jars in the phoenix driver. To cope with this I just installed Saiku in the Cloudera Quickstart VM and everything works fine

Thanks a lot for your help, greetings!

Juan Rodríguez Hortalá


2014-02-06 18:19 GMT+01:00 James Taylor <jamestaylor@apache.org>:


---------- Forwarded message ----------
From: Jesse Yates <jesse.k.yates@gmail.com>
Date: Thursday, February 6, 2014
Subject: Offending class: javax/servlet/Servlet.class using Phoenix JDBC from Saiku
To: dev@phoenix.incubator.apache.org


OK, this is a bit hacky, but could work. Basically, take a look at the
phoenix assembly files and specifically how the client jar is built - if
just a whitelist (iirc) of dependencies. Similarly you could build one that
doesn't include the offending dependencies that provide the Servlet class.

You could also give the client-minimal jar a try instead; its what we are
using at salesforce for issues like this.

The bigger jar is a full "everything you need" jar and as such can cause
claspath issues like this, or more insidious ones that are silent (e.g. it
comes before your custom hbase jar on the classpath and therefore the jvm
picks the standard phoenix bundled hbase classes, not your custom stuff).

Really, we need to put a warning on about that jar in the docs.

Hope this helps,
Jesse
On Feb 6, 2014 8:50 AM, "James Taylor" <jamestaylor@apache.org> wrote:

> Does anyone have ideas for Juan?

>
> ---------- Forwarded message ----------
> From: *Juan Rodríguez Hortalá* <juan.rodriguez.hortala@gmail.com>
> Date: Thursday, February 6, 2014
> Subject: Offending class: javax/servlet/Servlet.class using Phoenix JDBC
> from Saiku
> To: user@phoenix.incubator.apache.org
>
>
> Hello,
>
> Any ideas about this? In case the message was too long, my problem is that
> I get the Phoenix JDBC jat rejected when I use it in the Saiku tomcat
> webapp. It looks like some kind of packaging problem.
>
> If you want some extra info like logs of something I will be happy to post
> it back
>
> Greetings and thanks again for your help
>
>
> 2014-02-05 17:55 GMT+01:00 Juan Rodríguez Hortalá <
> juan.rodriguez.hortala@gmail.com<javascript:_e(%7B%7D,'cvml','
> juan.rodriguez.hortala@gmail.com');>

> >:
>
> > Hi list!,
> >
> > I've built phoenix following the instructions of
> > http://phoenix.incubator.apache.org/building.html in a Cloudera
> > Quickstart VM for CDH 4.4.0 and I've obtained the following jars:
> >
> > phoenix-core/target/phoenix-core-3.0.0-SNAPSHOT.jar
> > phoenix-assembly/target/phoenix-3.0.0-SNAPSHOT-client.jar
> >
> > Then I have copied phoenix-core-3.0.0-SNAPSHOT.jar into
> > /usr/lib/hbase/lib/ and restarted HBase and I'm able to access to HBase
> > tables and create new HBase tables with sqlline.sh, which means
> > phoenix-3.0.0-SNAPSHOT-client.jar is working ok. But now I would like to
> > use Phoenix as a source for a saiku server I'm running in the host
> machine
> > for the Cloudera VM, which is a windows 8. To do that, following
> >
> http://docs.analytical-labs.com/saiku/documentation/2013/08/15/datasources.html
> ,
> > I have copied the client phoenix-3.0.0-SNAPSHOT-client.jar into
> > saiku-server\tomcat\webapps\saiku\WEB-INF\lib for the Saiku installation
> > and restarted Saiku, and here is where the problem occours, as tomcats
> > rejects phoenix-3.0.0-SNAPSHOT-client.jar with the following message at
> > catalina.*.log:
> >
> > feb 05, 2014 4:20:59 P.M. org.apache.catalina.loader.WebappClassLoader
> > validateJarFile
> > INFO:
> >
> validateJarFile(C:\Users\bc24u_000\Sistemas\Pentaho\saiku-server-foodmart-2.5\saiku-server\tomcat\webapps\saiku\WEB-INF\lib\phoenix-3.0.0-SNAPSHOT-client.jar)
> > - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
> > javax/servlet/Servlet.class
> > feb 05, 2014 4:21:17 P.M. com.sun.jersey.api.core.PackagesResourceConfig
> > init
> > INFO: Scanning for root resource and provider classes in the packages:
> >   org.saiku.web
> > ....
> >
> > After some searching I've found that the problem is that
> > javax.servlet.Servlet.class is already defined in some other jar, so
> tomcat
> > rejects any jar containing another definition of the same class. I've
> tried
> > using the other client jars for phoenix by the class
> > org.apache.phoenix.jdbc.PhoenixDriver seems to be missing in those other
> > jars:
> >
> > [cloudera@localhost target]$ jar tf
> > phoenix-3.0.0-SNAPSHOT-client-without-hbase.jar | grep -i phoenix
> > [cloudera@localhost target]$ jar tf
> > phoenix-3.0.0-SNAPSHOT-client-minimal.jar | grep -i phoenix
> > [cloudera@localhost target]$
> >
> > I've also tried deleting that javax folder from the file
> > phoenix-3.0.0-SNAPSHOT-client.jar, but it doesn't work anyway. I would
> > appreciate any idea for solving this
> >
> > Thanks in advance,
> >
> > Greetings!
> >
> > Juan Rodríguez Hortalá <http://gpd.sip.ucm.es/juanrh/>
> >
> >
>