分享

求助:java调用phoenix失败!

cerberus 发表于 2016-11-11 11:15:49 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 4 22807
我在本地启动Java工程,连接phoenix没有问题,新增表、查询、修改都可以完成。

但是我把环境部署到hadoop集群master上面的时候,tomcat启动后就报错,提示连接phoenix失败。

求助!

错误信息:
2016-11-11 03:03:55,740 INFO  [http-nio-80-exec-1] impl.MetricsSystemImpl (MetricsSystemImpl.java:start(192)) - phoenix metrics system started
java.sql.SQLException: ERROR 2007 (INT09): Outdated jars. The following servers require an updated phoenix.jar to be put in the classpath of HBase: region=SYSTEM.CATALOG,,1478800105083.084e584cb834eec81fa2aef409e88213., hostname=hd4,16020,1478799262049, seqNum=5
        at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:455)
        at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:145)
        at org.apache.phoenix.query.ConnectionQueryServicesImpl.checkClientServerCompatibility(ConnectionQueryServicesImpl.java:1236)
        at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1071)
        at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1391)
        at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2297)
        at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:940)
        at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:193)
        at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:344)
        at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:332)
        at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
        at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:330)
        at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1423)
        at org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2349)
        at org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2294)
        at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
        at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2294)
        at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:232)
        at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:147)
        at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:202)
        at java.sql.DriverManager.getConnection(DriverManager.java:571)
        at java.sql.DriverManager.getConnection(DriverManager.java:233)
        at com.ai.ocsg.process.core.Hbase.GetConnection(Hbase.java:52)
        at com.ai.ocsg.process.core.Hbase.insert(Hbase.java:63)
        at com.ai.ocsg.controller.UploadController.upload(UploadController.java:119)
        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 org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:920)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:827)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:801)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:745)

已有(4)人评论

跳转到指定楼层
nextuser 发表于 2016-11-11 13:04:13
可能存在两个问题,一个是版本兼容问题,可能需要升级
比如 Phoenix version 4.0 需要HBase 0.98.1 及以后版本


还有另外一个可能就是jar复制的问题
可以把 phoenix-x.x.0-HBase-x.x-server.jar (如phoenix-4.7.0-HBase-1.1-server.jar )及相关依赖包复制到 HBase lib目录。移除其它  phoenix* jars。记得做好备份

回复

使用道具 举报

leletuo2012 发表于 2016-11-11 13:36:17
ERROR 2007 (INT09): Outdated jars. The following servers require an updated phoenix.jar to be put in the classpath of HBase:

Outdated jars.
回复

使用道具 举报

cerberus 发表于 2016-11-11 17:03:40
nextuser 发表于 2016-11-11 13:04
可能存在两个问题,一个是版本兼容问题,可能需要升级
比如 Phoenix version 4.0 需要HBase 0.98.1 及以后 ...

你好,我换了jar包,在本地tomcat运行没有问题,把tomcat放到集群里面还是这个错误。

在集群里面phoenix本身的命令行也都没问题,请教下,还能会是什么原因吗?

非常感谢~
回复

使用道具 举报

tntzbzc 发表于 2016-11-11 18:59:59
cerberus 发表于 2016-11-11 17:03
你好,我换了jar包,在本地tomcat运行没有问题,把tomcat放到集群里面还是这个错误。

在集群里面phoen ...

那就环境差异造成的,楼主可以仔细想想他们的区别在什么地方
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条