phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajeshbabu chintaguntla <>
Subject RE: Phoenix4.2.1 against HBase0.98.6 encountered a strange problem when using connection with props
Date Thu, 04 Dec 2014 05:57:52 GMT
I think you are missing create table statement. That's why getting TableNotFoundException.
Please check once..

This e-mail and its attachments contain confidential information from HUAWEI, which
is intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
phone or email immediately and delete it!
From: chenwenhui []
Sent: Thursday, December 04, 2014 11:19 AM
Subject: Phoenix4.2.1 against HBase0.98.6 encountered a strange problem when using connection
with props

The main code fragment is as follow:
        final Properties props = new Properties();
        final long ts = 1417597200000L;
        props.put(PhoenixRuntime.CURRENT_SCN_ATTRIB, Long.toString(ts));
        final Connection con = DriverManager.getConnection("jdbc:phoenix:", props);
        stmt = con.createStatement();
        stmt.executeUpdate("upsert into mytest1 values(3,'abc')");
It will report the following exception:
Exception in thread "main" org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03):
Table undefined. tableName=MYTEST1
at org.apache.phoenix.compile.FromCompiler$BaseColumnResolver.createTableRef(
at org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.<init>(
at org.apache.phoenix.compile.FromCompiler$SingleTableColumnResolver.<init>(
at org.apache.phoenix.compile.FromCompiler.getResolverForMutation(
at org.apache.phoenix.compile.UpsertCompiler.compile(
at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(
at org.apache.phoenix.jdbc.PhoenixStatement$ExecutableUpsertStatement.compilePlan(
at org.apache.phoenix.jdbc.PhoenixStatement$
at org.apache.phoenix.jdbc.PhoenixStatement$
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(
at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(
at com.bitauto.phoenix.FirstTest.main(

But the table named MYTEST1 indeed exists, and if using connection without props, i.e.
Connection con = DriverManager.getConnection("jdbc:phoenix:";
all things will become  okay.

Any ideas can be appreciated!

View raw message