phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: linkage error using Groovy
Date Fri, 10 Jun 2016 02:07:35 GMT
FWIW, I've also reproduced this with Groovy 2.4.3, Oracle Java 1.7.0_79 
and Apache Phoenix 4.8.0-SNAPSHOT locally.

Will dig some more.

Brian Jeltema wrote:
> Groovy 2.4.3
> JDK 1.8
>
>> On Jun 8, 2016, at 11:26 AM, Josh Elser <josh.elser@gmail.com
>> <mailto:josh.elser@gmail.com>> wrote:
>>
>> Thanks for the info, Brian!
>>
>> What version of Groovy are ya using? I think I can try to poke at this
>> if I know that too.
>>
>> Brian Jeltema wrote:
>>> Our environment is HortonWorks hdp 2.4 which includes phoenix 4.4.
>>>
>>> To reproduce set CLASSPATH to the phoenix driver, in our case
>>>
>>> export CLASSPATH=/usr/hdp/current/phoenix-cient/phoenix-client.jar
>>>
>>> and run the following groovy script, assuming zookeeper is running on
>>> zknode:
>>>
>>> import groovy.sql.Sql
>>>
>>> Sql.newInstance("jdbc:phoenix:zknode:/hbase-unsecure",
>>> 'foo',
>>> 'bar',
>>> "org.apache.phoenix.jdbc.PhoenixDriver")
>>>
>>>> On Jun 6, 2016, at 11:44 PM, Josh Elser <josh.elser@gmail.com
>>>> <mailto:josh.elser@gmail.com>
>>>> <mailto:josh.elser@gmail.com>> wrote:
>>>>
>>>> Looks like you're knocking up against Hadoop (in
>>>> o.a.h.c.Configuration). Have you checked search results without
>>>> Phoenix specifically?
>>>>
>>>> I haven't run into anything like this before, but I'm also not a bit
>>>> Groovy aficionado. If you can share your environment (or some sample
>>>> project that can exhibit this issue), it might help someone else make
>>>> a recommendation?
>>>>
>>>> Brian Jeltema wrote:
>>>>> I’m trying to get a database connection using the Phoenix JDBC
>>>>> driver in
>>>>> a Groovy script.
>>>>> I’m running into linkage errors. I assume its a conflict between the
>>>>> xerces libraries
>>>>> packaged in the phoenix-client.jar and those included in the JDK. Is
>>>>> there a
>>>>> workaround for this?
>>>>>
>>>>> Caught: java.lang.LinkageError: loader constraint violation in
>>>>> interface
>>>>> itable initialization: when resolving method
>>>>> "org.apache.xerces.dom.NodeImpl.getChildNodes()Lorg/w3c/dom/NodeList;"
>>>>> the class loader (instance of org/codehaus/groovy/tools/RootLoader) of
>>>>> the current class, org/apache/xerces/dom/NodeImpl, and the class loader
>>>>> (instance of <bootloader>) for interface org/w3c/dom/Node have
>>>>> different
>>>>> Class objects for the type getChildNodes used in the signature
>>>>> java.lang.LinkageError: loader constraint violation in interface itable
>>>>> initialization: when resolving method
>>>>> "org.apache.xerces.dom.NodeImpl.getChildNodes()Lorg/w3c/dom/NodeList;"
>>>>> the class loader (instance of org/codehaus/groovy/tools/RootLoader) of
>>>>> the current class, org/apache/xerces/dom/NodeImpl, and the class loader
>>>>> (instance of <bootloader>) for interface org/w3c/dom/Node have
>>>>> different
>>>>> Class objects for the type getChildNodes used in the signature
>>>>> at org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown
>>>>> Source)
>>>>> at org.apache.xerces.xinclude.XIncludeHandler.startDocument(Unknown
>>>>> Source)
>>>>> at org.apache.xerces.impl.dtd.XMLDTDValidator.startDocument(Unknown
>>>>> Source)
>>>>> at org.apache.xerces.impl.XMLDocumentScannerImpl.startEntity(Unknown
>>>>> Source)
>>>>> at
>>>>> org.apache.xerces.impl.XMLVersionDetector.startDocumentParsing(Unknown
>>>>> Source)
>>>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>>>> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>>>>> at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>>>> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>>>>> at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
>>>>> at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2480)
>>>>> at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2468)
>>>>> at
>>>>> org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2539)
>>>>> at
>>>>> org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2492)
>>>>> at
>>>>> org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2405)
>>>>> at org.apache.hadoop.conf.Configuration.get(Configuration.java:981)
>>>>> at
>>>>> org.apache.hadoop.conf.Configuration.getTrimmed(Configuration.java:1031)
>>>>> at
>>>>> org.apache.hadoop.conf.Configuration.getBoolean(Configuration.java:1432)
>>>>> at
>>>>> org.apache.hadoop.hbase.HBaseConfiguration.checkDefaultsVersion(HBaseConfiguration.java:67)
>>>>> at
>>>>> org.apache.hadoop.hbase.HBaseConfiguration.addHbaseResources(HBaseConfiguration.java:81)
>>>>> at
>>>>> org.apache.hadoop.hbase.HBaseConfiguration.create(HBaseConfiguration.java:96)
>>>>> at
>>>>> org.apache.phoenix.query.ConfigurationFactory$ConfigurationFactoryImpl$1.call(ConfigurationFactory.java:49)
>>>>> at
>>>>> org.apache.phoenix.query.ConfigurationFactory$ConfigurationFactoryImpl$1.call(ConfigurationFactory.java:46)
>>>>> at
>>>>> org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
>>>>> at
>>>>> org.apache.phoenix.util.PhoenixContextExecutor.callWithoutPropagation(PhoenixContextExecutor.java:92)
>>>>> at
>>>>> org.apache.phoenix.query.ConfigurationFactory$ConfigurationFactoryImpl.getConfiguration(ConfigurationFactory.java:46)
>>>>> at
>>>>> org.apache.phoenix.query.QueryServicesOptions.withDefaults(QueryServicesOptions.java:219)
>>>>> at
>>>>> org.apache.phoenix.query.QueryServicesImpl.<init>(QueryServicesImpl.java:36)
>>>>> at
>>>>> org.apache.phoenix.jdbc.PhoenixDriver.getQueryServices(PhoenixDriver.java:130)
>>>>> at
>>>>> org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:163)
>>>>> at
>>>>> org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:132)
>>>>> at
>>>>> org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:151)
>>>>> at java_sql_DriverManager$getConnection.call(Unknown Source)
>>>>> at p.run(p.groovy:33)
>

Mime
View raw message