phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pradeep arumalla <pradeep.b...@gmail.com>
Subject Re: phoenix-Hbase-client jar web application issue
Date Fri, 25 Nov 2016 07:09:13 GMT
finally success, just exclude the offending classes, mine were, so yours
would be too, if you are trying to connect jdbc driver from a web
server.Please exclude the classes below from the pom file in phoenix-client
folder.

 <excludes>

                  <exclude>org.apache.phoenix:phoenix-client</exclude>

                  <exclude>xom:xom</exclude>

<!--                   <exclude>javax.servlet:*</exclude>

 -->                  <exclude>org.mortbay.jetty:servlet-api-2.5:*</exclude>

  <exclude>javax.servlet:servlet-api:*</exclude>

  <exclude>org.mortbay.jetty:servlet-api:*</exclude>

  <exclude>org.mortbay.jetty:jsp-2.1:*</exclude>

  <exclude>org.mortbay.jetty:jsp-api-2.1:*</exclude>

  <exclude>javax.servlet.jsp:jsp-api:*</exclude>



                </excludes>

On Wed, Nov 23, 2016 at 3:22 PM, pradeep arumalla <pradeep.bill@gmail.com>
wrote:

> thanks josh looking into it.
>
> On Wed, Nov 23, 2016 at 1:48 PM, Josh Elser <josh.elser@gmail.com> wrote:
>
>> Hi Pradeep,
>>
>> No, this is one you will likely have to work around on your own by
>> building a custom Phoenix client jar that does not include the
>> javax-servlet classes. They are getting transitively pulled into Phoenix
>> via Hadoop (IIRC). If your web application already has the classes present,
>> you can build your own client jar that excludes dependencies that you
>> already have bundled.
>>
>> Take a look at [1] for an example of how we build the phoenix-client jar.
>> You can easily add some exclusions to the maven-shade-plugin.
>>
>> - Josh
>>
>> [1] https://github.com/apache/phoenix/blob/v4.8.1-HBase-1.2/phoe
>> nix-client/pom.xml
>>
>> pradeep arumalla wrote:
>>
>>> hello group , when I try to connect to hbase  using
>>> *phoenix-4.8.1-HBase-1.2-client.jar *in my web application on tomcat*,
>>> *I see the jar is getting rejected because of
>>> javax/servlet/Servlet.class package being present in the jar, is there
>>> an other jar to use ?.Please advice.
>>>
>>> INFO:
>>> validateJarFile(/Users/bill/Downloads/apache-tomcat-7.0.72/w
>>> tpwebapps/DataVisualization/WEB-INF/lib/*phoenix-4.8.1-HBase
>>> -1.2-client.jar*)
>>> - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class:
>>> javax/servlet/Servlet.class
>>>
>>> Nov 23, 2016 10:46:41 AM
>>> org.apache.catalina.loader.WebappClassLoaderBase validateJarFile
>>>
>>>
>>> thanks
>>>
>>> Pradeep
>>>
>>>
>
>
> --
> Thanks
> Pradeep
>



-- 
Thanks
Pradeep

Mime
View raw message