[
https://issues.apache.org/jira/browse/PHOENIX-831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Somesh Sasalatti reopened PHOENIX-831:
--------------------------------------
PhoenixDriverTest was changed to use BaseConnectionlessQueryTest . and the test
that connects to jdbc:phoenix:localhost was removed.
Doing this won't exercise the init() method in ConnectionQueryServicesImpl
which is where the bug really is.
I removed the base class and re-added the test that tries to connect to
"jdbc:phoenix:localhost;test=true" this ends up in
ConnectionQueryServicesTestImpl which is a child of ConnectionQueryServicesImpl
and will end up calling the init() method in the base class, which is good and
we can test it.
However ConnectionQueryServicesTestImpl tries to use HbaseTestUtil to bring up
a local cluster which isn't working for me as yet. Compiling and running with
java 1.6 on my mac. Here's the error that I'm running into. Any ideas on how to
get the tests going locally ?
java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:171)
at
org.apache.hadoop.hbase.mapreduce.MapreduceTestingShim.<clinit>(MapreduceTestingShim.java:45)
at
org.apache.hadoop.hbase.HBaseTestingUtility.createDirsAndSetProperties(HBaseTestingUtility.java:571)
at
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniDFSCluster(HBaseTestingUtility.java:507)
at
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:845)
at
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:770)
at
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:741)
at
org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:710)
at
org.apache.phoenix.end2end.ConnectionQueryServicesTestImpl.setupServer(ConnectionQueryServicesTestImpl.java:58)
at
org.apache.phoenix.end2end.ConnectionQueryServicesTestImpl.init(ConnectionQueryServicesTestImpl.java:90)
at
org.apache.phoenix.jdbc.PhoenixTestDriver.getConnectionQueryServices(PhoenixTestDriver.java:80)
at
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:112)
at
org.apache.phoenix.jdbc.PhoenixDriverTest.verifyConnectionValid(PhoenixDriverTest.java:62)
at
org.apache.phoenix.jdbc.PhoenixDriverTest.testFirstConnectionWhenPropsHasTenantId(PhoenixDriverTest.java:47)
> First Connection to Phoenix blows up if it is tenant specific
> -------------------------------------------------------------
>
> Key: PHOENIX-831
> URL: https://issues.apache.org/jira/browse/PHOENIX-831
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 3.0.0
> Reporter: Somesh Sasalatti
>
> Driver driver = DriverManager.getDriver(url);
> Properties props = new Properties();
> final String tenantId = "00Dxx0000001234";
> props.put(PhoenixRuntime.TENANT_ID_ATTRIB, tenantId);
> Connection connection = driver.connect(url, props);
> BOOM!
> I have pull request coming shortly
--
This message was sent by Atlassian JIRA
(v6.2#6252)