phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Biyuhao <byh0...@gmail.com>
Subject Re: ClassNotFoundException with sqlline.py (phoenix 4.4 rc0)
Date Thu, 07 May 2015 01:17:58 GMT
Thanks for your reply,

Phoenix 4.4 rc0 (HBase 1.0)
I run this version of phoenix with my CDH5.4.0 cluster. I modified two java
files and pom file then compiled it with cdh jars.

This problem was solved by adding classpath of "netty-3.6.6.Final.jar" to
"java_cmd" in sqlline.py .[?]

And then I got another abnormal situation. At first line I print out
java_cmd value used in sqlline.py.

[root@master bin]# ./sqlline.py 10.0.0.100
/opt/jdk1.7.0_80/bin/java -cp
"./netty-3.2.4.Final.jar:.:/root/phoenix/bin/../phoenix-assembly/target/phoenix-4.4.0-HBase-1.0-client.jar::"
-Dlog4j.configuration=file:/root/phoenix/bin/log4j.properties
sqlline.SqlLine -d org.apache.phoenix.jdbc.PhoenixDriver -u
jdbc:phoenix:10.0.0.100 -n none -p none --color=true --fastConnect=false
--verbose=true --isolation=TRANSACTION_READ_COMMITTED
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
issuing: !connect jdbc:phoenix:10.0.0.100 none none
org.apache.phoenix.jdbc.PhoenixDriver
Connecting to jdbc:phoenix:10.0.0.100
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details.
15/05/06 21:04:11 WARN util.NativeCodeLoader: Unable to load native-hadoop
library for your platform... using builtin-java classes where applicable
Error: ERROR 1102 (XCL02): Cannot get all table regions
(state=XCL02,code=1102)
java.sql.SQLException: ERROR 1102 (XCL02): Cannot get all table regions
at
org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:386)
at
org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.getAllTableRegions(ConnectionQueryServicesImpl.java:443)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.checkClientServerCompatibility(ConnectionQueryServicesImpl.java:941)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:867)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1213)
at
org.apache.phoenix.query.DelegateConnectionQueryServices.createTable(DelegateConnectionQueryServices.java:112)
at
org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1902)
at
org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:744)
at
org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:186)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:303)
at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:295)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:293)
at
org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1236)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1891)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1860)
at
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1860)
at
org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:162)
at
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:131)
at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:133)
at sqlline.DatabaseConnection.connect(DatabaseConnection.java:157)
at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)
at sqlline.Commands.connect(Commands.java:1064)
at sqlline.Commands.connect(Commands.java:996)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
at sqlline.SqlLine.dispatch(SqlLine.java:804)
at sqlline.SqlLine.initArgs(SqlLine.java:588)
at sqlline.SqlLine.begin(SqlLine.java:656)
at sqlline.SqlLine.start(SqlLine.java:398)
at sqlline.SqlLine.main(SqlLine.java:292)
Caused by: org.apache.hadoop.hbase.client.NoServerForRegionException: No
server address listed in hbase:meta for region
SYSTEM.CATALOG,,1430916071842.f3a8f2ab3e8d43d9fd1f14e2e1228734. containing
row
at
org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegionInMeta(ConnectionManager.java:1333)
at
org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.locateRegion(ConnectionManager.java:1126)
at
org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.relocateRegion(ConnectionManager.java:1097)
at
org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.relocateRegion(ConnectionManager.java:1081)
at
org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.getRegionLocation(ConnectionManager.java:902)
at
org.apache.phoenix.query.ConnectionQueryServicesImpl.getAllTableRegions(ConnectionQueryServicesImpl.java:429)
... 33 more
sqlline version 1.1.8
0: jdbc:phoenix:192.168.90.103>
0: jdbc:phoenix:192.168.90.103>
0: jdbc:phoenix:192.168.90.103>
0: jdbc:phoenix:192.168.90.103>
0: jdbc:phoenix:192.168.90.103>
Connection closed by foreign host.




2015-05-07 1:19 GMT+08:00 Nick Dimiduk <ndimiduk@gmail.com>:

> Which RC build are you using (0.98 or 1.0)? Does your HBase deploy match
> the Phoenix version? Can you compare the class path for the process (use
> `ps aux | grep -i sqlline` or similar) to the actual jars on disk --
> everything is there?
>
> Thanks,
> Nick
>
> On Wed, May 6, 2015 at 2:42 AM, Biyuhao <byh0831@gmail.com> wrote:
>
> > Hello everyone,
> >
> > When I trying to use sqlline.py I got this error.
> > Am i doing something wrong? Or there is some miss configuration in my
> > environment?
> >
> >
> >
> > 0: jdbc:phoenix:localhost> Error: ERROR 103 (08004): Unable to establish
> > connection. (state=08004,code=103)
> > java.sql.SQLException: ERROR 103 (08004): Unable to establish connection.
> > at
> >
> >
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:386)
> > at
> >
> >
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
> > at
> >
> >
> org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:288)
> > at
> >
> >
> org.apache.phoenix.query.ConnectionQueryServicesImpl.access$300(ConnectionQueryServicesImpl.java:171)
> > at
> >
> >
> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1881)
> > at
> >
> >
> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:1860)
> > at
> >
> >
> org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:77)
> > at
> >
> >
> org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1860)
> > at
> >
> >
> org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:162)
> > at
> >
> >
> org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:131)
> > at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:133)
> > at sqlline.DatabaseConnection.connect(DatabaseConnection.java:157)
> > at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)
> > at sqlline.Commands.close(Commands.java:906)
> > at sqlline.Commands.closeall(Commands.java:880)
> > at sqlline.SqlLine.begin(SqlLine.java:709)
> > at sqlline.SqlLine.start(SqlLine.java:398)
> > at sqlline.SqlLine.main(SqlLine.java:292)
> > Caused by: java.io.IOException:
> java.lang.reflect.InvocationTargetException
> > at
> >
> >
> org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:240)
> > at
> >
> >
> org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:414)
> > at
> >
> >
> org.apache.hadoop.hbase.client.ConnectionManager.createConnectionInternal(ConnectionManager.java:323)
> > at
> >
> >
> org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:144)
> > at
> >
> >
> org.apache.phoenix.query.HConnectionFactory$HConnectionFactoryImpl.createConnection(HConnectionFactory.java:47)
> > at
> >
> >
> org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:286)
> > ... 15 more
> > Caused by: java.lang.reflect.InvocationTargetException
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> > at
> >
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> > at
> >
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> > at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
> > at
> >
> >
> org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:238)
> > ... 20 more
> > Caused by: java.lang.NoClassDefFoundError:
> > org/jboss/netty/channel/ChannelFactory
> > at java.lang.Class.forName0(Native Method)
> > at java.lang.Class.forName(Class.java:278)
> > at
> >
> >
> org.apache.hadoop.conf.Configuration.getClassByNameOrNull(Configuration.java:2051)
> > at
> >
> >
> org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2016)
> > at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2110)
> > at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2136)
> > at
> >
> >
> org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.<init>(ConnectionManager.java:643)
> > ... 25 more
> > Caused by: java.lang.ClassNotFoundException:
> > org.jboss.netty.channel.ChannelFactory
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> > ... 32 more
> >
> > Thank all of you,
> >
>

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message