cloudera - Accessing HBase using java api within WebLogic -


i have java native api access hbase , works fine standalone program. when deploy same jar file part of jax-rs service, it's not able zookeeper.

i have given below both logs when accessed (doesn't work) weblogic , accessed (works fine) standalone java program using same jar.

any appreciated.

below log when accessed within weblogic 10.3.5 , doesn't work.

 2013-07-19 14:15:30 info  class:68 - ************************************************* 2013-07-19 14:15:30 info  class:69 - hbase configuration info :: zookeeperquorum -->192.168.56.101, zookeeperclientport -->2181, hbasemaster -->192.168.56.101:60000 2013-07-19 14:15:30 info  class:72 - ************************************************* 2013-07-19 14:15:30 debug mutablemetricsfactory:42 - field org.apache.hadoop.metrics2.lib.mutablerate org.apache.hadoop.security.usergroupinformation$ugimetrics.loginsuccess annotation @org.apache.hadoop.metrics2.annotation.metric(valuename=time, about=, value=[rate of successful kerberos logins , latency (milliseconds)], type=default, always=false, samplename=ops) 2013-07-19 14:15:30 debug mutablemetricsfactory:42 - field org.apache.hadoop.metrics2.lib.mutablerate org.apache.hadoop.security.usergroupinformation$ugimetrics.loginfailure annotation @org.apache.hadoop.metrics2.annotation.metric(valuename=time, about=, value=[rate of failed kerberos logins , latency (milliseconds)], type=default, always=false, samplename=ops) 2013-07-19 14:15:30 debug metricssystemimpl:220 - ugimetrics, user , group related metrics 2013-07-19 14:15:30 debug groups:180 -  creating new groups object 2013-07-19 14:15:30 debug nativecodeloader:46 - trying load custom-built native-hadoop library... 2013-07-19 14:15:30 debug nativecodeloader:55 - failed load native-hadoop error: java.lang.unsatisfiedlinkerror: no hadoop in java.library.path 2013-07-19 14:15:30 debug nativecodeloader:56 - java.library.path=c:\java\jrocki~1.0\bin;c:\windows\system32;c:\windows;c:\oracle\middle~3\patch_wls1035\profiles\default\native;c:\oracle\middle~3\patch_ocp360\profiles\default\native;c:\oracle\middle~3\patch_jdev1111\profiles\default\native;c:\oracle\middle~3\wlserv~1.3\server\native\win\32;c:\oracle\middle~3\wlserv~1.3\server\bin;c:\oracle\middle~3\modules\orgapa~1.1\bin;c:\java\jrocki~1.0\jre\bin;c:\java\jrocki~1.0\bin;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\program files (x86)\microsoft application virtualization client;c:\java\jrockit-jdk1.6.0_37-r28.2.5-4.1.0;c:\program files\tortoisesvn\bin;c:\oracl;c:\users\user123\appdata\local\enthought\canopy32\user\scripts;c:\softwares\npp.6.3.2.bin\unicode\notepad++.exe;c:\python\python27;c:\softwares\apache-maven-3.0.5\bin;c:\softwares\depot_tools;c:\softwares\apache-ant-1.9.1\bin;;c:\oracle\middle~3\wlserv~1.3\server\native\win\32\oci920_8;. 2013-07-19 14:15:30 warn  nativecodeloader:62 - unable load native-hadoop library platform... using builtin-java classes applicable 2013-07-19 14:15:30 debug jnibasedunixgroupsmappingwithfallback:40 - falling shell based 2013-07-19 14:15:30 debug jnibasedunixgroupsmappingwithfallback:44 - group mapping impl=org.apache.hadoop.security.shellbasedunixgroupsmapping 2013-07-19 14:15:30 debug groups:66 - group mapping impl=org.apache.hadoop.security.jnibasedunixgroupsmappingwithfallback; cachetimeout=300000 2013-07-19 14:15:30 debug usergroupinformation:175 - hadoop login 2013-07-19 14:15:30 debug usergroupinformation:124 - hadoop login commit 2013-07-19 14:15:30 debug usergroupinformation:154 - using local user:ntuserprincipal: user123 2013-07-19 14:15:30 debug usergroupinformation:697 - ugi loginuser:user123 (auth:simple) 2013-07-19 14:15:30 debug zkutil:120 - hconnection opening connection zookeeper ensemble (192.168.56.101:2181) 2013-07-19 14:15:30 info  recoverablezookeeper:104 - identifier of process 55380@win75cb245190f 2013-07-19 14:15:30 warn  recoverablezookeeper:219 - possibly transient zookeeper exception: org.apache.zookeeper.keeperexception$connectionlossexception: keepererrorcode = connectionloss /hbase/hbaseid 2013-07-19 14:15:30 info  retrycounter:53 - sleeping 2000ms before retry #1... 2013-07-19 14:15:32 warn  recoverablezookeeper:219 - possibly transient zookeeper exception: org.apache.zookeeper.keeperexception$connectionlossexception: keepererrorcode = connectionloss /hbase/hbaseid 2013-07-19 14:15:32 info  retrycounter:53 - sleeping 4000ms before retry #2... 2013-07-19 14:15:37 warn  recoverablezookeeper:219 - possibly transient zookeeper exception: org.apache.zookeeper.keeperexception$connectionlossexception: keepererrorcode = connectionloss /hbase/hbaseid 2013-07-19 14:15:37 info  retrycounter:53 - sleeping 8000ms before retry #3... 2013-07-19 14:15:45 warn  recoverablezookeeper:219 - possibly transient zookeeper exception: org.apache.zookeeper.keeperexception$connectionlossexception: keepererrorcode = connectionloss /hbase/hbaseid 2013-07-19 14:15:45 error recoverablezookeeper:221 - zookeeper exists failed after 3 retries 2013-07-19 14:15:45 warn  zkutil:453 - hconnection unable set watcher on znode (/hbase/hbaseid) org.apache.zookeeper.keeperexception$connectionlossexception: keepererrorcode = connectionloss /hbase/hbaseid     @ org.apache.zookeeper.keeperexception.create(keeperexception.java:99)     @ org.apache.zookeeper.keeperexception.create(keeperexception.java:51)     @ org.apache.zookeeper.zookeeper.exists(zookeeper.java:1041)     @ org.apache.hadoop.hbase.zookeeper.recoverablezookeeper.exists(recoverablezookeeper.java:172)     @ org.apache.hadoop.hbase.zookeeper.zkutil.checkexists(zkutil.java:450)     @ org.apache.hadoop.hbase.zookeeper.clusterid.readclusteridznode(clusterid.java:61)     @ org.apache.hadoop.hbase.zookeeper.clusterid.getid(clusterid.java:50)     @ org.apache.hadoop.hbase.zookeeper.clusterid.hasid(clusterid.java:44)     @ org.apache.hadoop.hbase.client.hconnectionmanager$hconnectionimplementation.ensurezookeepertrackers(hconnectionmanager.java:615)     @ org.apache.hadoop.hbase.client.hconnectionmanager$hconnectionimplementation.locateregion(hconnectionmanager.java:871)     @ org.apache.hadoop.hbase.client.hconnectionmanager$hconnectionimplementation.locateregion(hconnectionmanager.java:846)     @ org.apache.hadoop.hbase.client.htable.finishsetup(htable.java:271)     @ org.apache.hadoop.hbase.client.htable.(htable.java:211)     @ org.apache.hadoop.hbase.client.htablefactory.createhtableinterface(htablefactory.java:36)     @ org.apache.hadoop.hbase.client.htablepool.createhtable(htablepool.java:265)     @ org.apache.hadoop.hbase.client.htablepool.findorcreatetable(htablepool.java:195)     @ org.apache.hadoop.hbase.client.htablepool.gettable(htablepool.java:174)     @ com.cap1.hbase.lookup.hbaseprocessimpl.processtrnx(hbaseprocessimpl.java:87)     @ com.cap1.hbase.lookup.hbaseprocessimpl.processrecord(hbaseprocessimpl.java:64)     @ com.cap1.hbase.callable.hbasecallable.processtrxns(hbasecallable.java:47)     @ com.cap1.hbase.callable.hbasecallable.call(hbasecallable.java:38)     @ com.cap1.hbase.callable.hbasecallable.call(hbasecallable.java:1)     @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:303)     @ java.util.concurrent.futuretask.run(futuretask.java:138)     @ java.util.concurrent.executors$runnableadapter.call(executors.java:439)     @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:303)     @ java.util.concurrent.futuretask.run(futuretask.java:138)     @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908)     @ java.lang.thread.run(thread.java:662) 

below log when same jar file accessed standalone java program.

 2013-07-19 14:22:28 info  class:68 - ************************************************* 2013-07-19 14:22:28 info  class:69 - hbase configuration info :: zookeeperquorum -->192.168.56.101, zookeeperclientport -->2181, hbasemaster -->192.168.56.101:60000 2013-07-19 14:22:28 info  class:72 - ************************************************* 2013-07-19 14:22:29 debug mutablemetricsfactory:42 - field org.apache.hadoop.metrics2.lib.mutablerate org.apache.hadoop.security.usergroupinformation$ugimetrics.loginsuccess annotation @org.apache.hadoop.metrics2.annotation.metric(valuename=time, about=, value=[rate of successful kerberos logins , latency (milliseconds)], always=false, type=default, samplename=ops) 2013-07-19 14:22:29 debug mutablemetricsfactory:42 - field org.apache.hadoop.metrics2.lib.mutablerate org.apache.hadoop.security.usergroupinformation$ugimetrics.loginfailure annotation @org.apache.hadoop.metrics2.annotation.metric(valuename=time, about=, value=[rate of failed kerberos logins , latency (milliseconds)], always=false, type=default, samplename=ops) 2013-07-19 14:22:29 debug metricssystemimpl:220 - ugimetrics, user , group related metrics slf4j: failed load class "org.slf4j.impl.staticloggerbinder". slf4j: defaulting no-operation (nop) logger implementation slf4j: see http://www.slf4j.org/codes.html#staticloggerbinder further details. 2013-07-19 14:22:29 debug groups:180 -  creating new groups object 2013-07-19 14:22:29 debug nativecodeloader:46 - trying load custom-built native-hadoop library... 2013-07-19 14:22:29 debug nativecodeloader:55 - failed load native-hadoop error: java.lang.unsatisfiedlinkerror: no hadoop in java.library.path 2013-07-19 14:22:29 debug nativecodeloader:56 - java.library.path=c:\oracle\middleware\jdk160_29\bin;c:\windows\sun\java\bin;c:\windows\system32;c:\windows;c:\windows\system32;c:\windows;c:\windows\system32\wbem;c:\windows\system32\windowspowershell\v1.0\;c:\program files (x86)\microsoft application virtualization client;c:\java\jrockit-jdk1.6.0_37-r28.2.5-4.1.0;c:\program files\tortoisesvn\bin;c:\oracl;c:\users\user123\appdata\local\enthought\canopy32\user\scripts;c:\softwares\npp.6.3.2.bin\unicode\notepad++.exe;c:\python\python27;c:\softwares\apache-maven-3.0.5\bin;c:\softwares\depot_tools;c:\softwares\apache-ant-1.9.1\bin;;. 2013-07-19 14:22:29 warn  nativecodeloader:62 - unable load native-hadoop library platform... using builtin-java classes applicable 2013-07-19 14:22:29 debug jnibasedunixgroupsmappingwithfallback:40 - falling shell based 2013-07-19 14:22:29 debug jnibasedunixgroupsmappingwithfallback:44 - group mapping impl=org.apache.hadoop.security.shellbasedunixgroupsmapping 2013-07-19 14:22:29 debug groups:66 - group mapping impl=org.apache.hadoop.security.jnibasedunixgroupsmappingwithfallback; cachetimeout=300000 2013-07-19 14:22:29 debug usergroupinformation:175 - hadoop login 2013-07-19 14:22:29 debug usergroupinformation:124 - hadoop login commit 2013-07-19 14:22:29 debug usergroupinformation:154 - using local user:ntuserprincipal: user123 2013-07-19 14:22:29 debug usergroupinformation:697 - ugi loginuser:user123 (auth:simple) 2013-07-19 14:22:29 debug zkutil:120 - hconnection opening connection zookeeper ensemble (192.168.56.101:2181) 2013-07-19 14:22:29 info  recoverablezookeeper:104 - identifier of process 50384@win75cb245190f 2013-07-19 14:22:29 debug zookeeperwatcher:273 - hconnection received zookeeper event, type=none, state=syncconnected, path=null 2013-07-19 14:22:29 debug zookeeperwatcher:350 - hconnection-0x13ff7e7fc02000a connected 2013-07-19 14:22:29 debug zkutil:1601 - hconnection-0x13ff7e7fc02000a retrieved 36 byte(s) of data znode /hbase/hbaseid; data=494de2c7-aa9c-4b24-9f2c-90ba6... 2013-07-19 14:22:29 debug zkutil:423 - hconnection-0x13ff7e7fc02000a set watcher on existing znode /hbase/master 2013-07-19 14:22:29 debug zkutil:1601 - hconnection-0x13ff7e7fc02000a retrieved 36 byte(s) of data znode /hbase/master , set watcher; \x00\x00ubuntu-12.04.2,47663,... 2013-07-19 14:22:29 debug zkutil:423 - hconnection-0x13ff7e7fc02000a set watcher on existing znode /hbase/root-region-server 2013-07-19 14:22:29 debug zkutil:1601 - hconnection-0x13ff7e7fc02000a retrieved 34 byte(s) of data znode /hbase/root-region-server , set watcher; ubuntu-12.04.2,50780,13742537... 2013-07-19 14:22:29 debug hbaserpc:102 - using rpcengine: org.apache.hadoop.hbase.ipc.writablerpcengine 2013-07-19 14:22:29 debug hbaseclient:860 - ping interval is60000ms. 2013-07-19 14:22:29 debug zkutil:1601 - hconnection-0x13ff7e7fc02000a retrieved 34 byte(s) of data znode /hbase/root-region-server , set watcher; ubuntu-12.04.2,50780,13742537... 2013-07-19 14:22:29 debug hconnectionmanager$hconnectionimplementation:875 - looked root region location, connection=org.apache.hadoop.hbase.client.hconnectionmanager$hconnectionimplementation@1077fc9; servername=ubuntu-12.04.2,50780,1374253744820 2013-07-19 14:22:29 debug hbaseclient:434 - connecting org.apache.hadoop.hbase.ipc.hbaseclient$connectionid@430581cd 2013-07-19 14:22:29 debug hbaseclient:608 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 sending #0 2013-07-19 14:22:29 debug hbaseclient:575 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123: starting, having connections 1 2013-07-19 14:22:29 debug hbaseclient:649 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 got value #0 2013-07-19 14:22:29 debug rpcengine:92 - call: getprotocolversion 36 2013-07-19 14:22:29 debug hbaseclient:608 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 sending #1 2013-07-19 14:22:29 debug hbaseclient:649 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 got value #1 2013-07-19 14:22:29 debug rpcengine:92 - call: getclosestrowbefore 5 2013-07-19 14:22:29 debug hconnectionmanager$hconnectionimplementation:1266 - cached location .meta.,,1.1028785192 ubuntu-12.04.2:50780 2013-07-19 14:22:29 warn  configuration:824 - hadoop.native.lib deprecated. instead, use io.native.lib.available 2013-07-19 14:22:29 debug hbaseclient:608 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 sending #2 2013-07-19 14:22:29 debug hbaseclient:649 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 got value #2 2013-07-19 14:22:29 debug rpcengine:92 - call: getclosestrowbefore 3 2013-07-19 14:22:29 debug metascanner:200 - scanning .meta. starting @ row=hbase_test_table,,00000000000000 max=10 rows using org.apache.hadoop.hbase.client.hconnectionmanager$hconnectionimplementation@1077fc9 2013-07-19 14:22:29 debug hbaseclient:608 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 sending #3 2013-07-19 14:22:29 debug hbaseclient:649 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 got value #3 2013-07-19 14:22:29 debug rpcengine:92 - call: openscanner 3 2013-07-19 14:22:29 debug hbaseclient:608 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 sending #4 2013-07-19 14:22:29 debug hbaseclient:649 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 got value #4 2013-07-19 14:22:29 debug rpcengine:92 - call: next 6 2013-07-19 14:22:29 debug hconnectionmanager$hconnectionimplementation:1266 - cached location hbase_test_table,,1373942516744.9243ede59ac4a179cae677d7c4ca964c. ubuntu-12.04.2:50780 2013-07-19 14:22:29 debug hbaseclient:608 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 sending #5 2013-07-19 14:22:29 debug hbaseclient:649 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 got value #5 2013-07-19 14:22:29 debug rpcengine:92 - call: close 2 2013-07-19 14:22:29 info  hbaseprocessimpl:145 - **************************************************************** 2013-07-19 14:22:29 info  hbaseprocessimpl:146 - start row key --> 8f064a8b5da9b68adbaf0db302363dee, stop row key --> 8f064a8b5da9b68adbaf0db302363def 2013-07-19 14:22:29 info  hbaseprocessimpl:148 - ***************************************************************** 2013-07-19 14:22:29 info  hbaseprocessimpl:251 - *********************************************** 2013-07-19 14:22:29 info  hbaseprocessimpl:252 - filter info:: filterlist or (5/6): [singlecolumnvaluefilter (ca, city, equal, chicago), singlecolumnvaluefilter (ca, state, equal, il), singlecolumnvaluefilter (ca, country, equal, ), singlecolumnvaluefilter (ca, mcc, equal, 5814), singlecolumnvaluefilter (ca, terminal_owner, equal, )] 2013-07-19 14:22:29 info  hbaseprocessimpl:253 - *********************************************** 2013-07-19 14:22:29 debug clientscanner:90 - creating scanner on hbase_test_table starting @ key '8f064a8b5da9b68adbaf0db302363dee' 2013-07-19 14:22:29 debug clientscanner:198 - advancing internal scanner startkey @ '8f064a8b5da9b68adbaf0db302363dee' 2013-07-19 14:22:29 debug hbaseclient:608 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 sending #6 2013-07-19 14:22:29 debug hbaseclient:649 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 got value #6 2013-07-19 14:22:29 debug rpcengine:92 - call: openscanner 3 2013-07-19 14:22:29 debug hbaseclient:608 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 sending #7 2013-07-19 14:22:29 debug hbaseclient:649 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 got value #7 2013-07-19 14:22:29 debug rpcengine:92 - call: next 5 2013-07-19 14:22:29 debug hbaseclient:608 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 sending #8 2013-07-19 14:22:29 debug hbaseclient:649 - ipc client (6888942) connection ubuntu-12.04.2/192.168.56.101:50780 user123 got value #8 2013-07-19 14:22:29 debug rpcengine:92 - call: close 1 2013-07-19 14:22:29 debug clientscanner:185 - finished scanning @ {name => 'hbase_test_table,,1373942516744.9243ede59ac4a179cae677d7c4ca964c.', startkey => '', endkey => '', encoded => 9243ede59ac4a179cae677d7c4ca964c,} 2013-07-19 14:22:29 info  taskexecutorservice:87 -  getactivecount:0 getcompletedtaskcount:1 getcorepoolsize:10 getlargestpoolsize:10 getpoolsize:10 gettaskcount:1 getqueue().size():0 2013-07-19 14:22:29 info  customexecutorpool:143 - added executor pool 2013-07-19 14:22:29 info  defaultrequesthandler:59 - processed payload:: d7ca6619-cee6-498f-91a8-bb18de7776c8 size::1 2013-07-19 14:22:29 info  merchantinfolookup:126 - request identifier:: d7ca6619-cee6-498f-91a8-bb18de7776c8 2013-07-19 14:22:29 info  merchantinfolookup:127 - response list size:: 1 2013-07-19 14:22:29 info  merchantinfolookup:128 - ****************** output record **************************** 

found , fixed issue. related sasl.

here description: https://issues.apache.org/jira/browse/zookeeper-1696 http://comments.gmane.org/gmane.comp.java.zookeeper.user/2897 https://gist.github.com/barkbay/4153107


Comments