Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F015F10772 for ; Wed, 3 Jul 2013 19:50:25 +0000 (UTC) Received: (qmail 76760 invoked by uid 500); 3 Jul 2013 19:50:23 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 76707 invoked by uid 500); 3 Jul 2013 19:50:23 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 76699 invoked by uid 99); 3 Jul 2013 19:50:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jul 2013 19:50:23 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of asaf.mesika@gmail.com designates 209.85.219.43 as permitted sender) Received: from [209.85.219.43] (HELO mail-oa0-f43.google.com) (209.85.219.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jul 2013 19:50:17 +0000 Received: by mail-oa0-f43.google.com with SMTP id i7so783710oag.30 for ; Wed, 03 Jul 2013 12:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=yrN3L1SK8sLTvH8dwJBJU9LStHLJu7VjSW++p95CKuY=; b=uf4END5D169QCRe1tuNEaZvhy7y0qJiIANKejR6Mda0vxaW7qYh5XJ6BxTg/p0WbK0 gHR3EPD78RBn2WF8dqyUBQ3Gzr2JwnTYWQOZI09lXimK/J0trADgA/abnF2jmyAIaPAU VDc0cZBulwYsYKh4nhn+oiKRF+dSmwyKTJa/4BZ38+Omd09V7W7JuP50JJkvGfvcvyiN spxjU0oGwB24QORE+P3IcNCzC45xk7rvCw+IQDXLno959yShDdlnxcSh4assmDR/Yos6 yG9JSFqdMV6nPClc/yCGTQPR7/RoLfksHi27BVi+D9wwv0dxL2zAL2zSo1UHaNZBDH0y 2weg== MIME-Version: 1.0 X-Received: by 10.60.132.230 with SMTP id ox6mr2360966oeb.66.1372880996505; Wed, 03 Jul 2013 12:49:56 -0700 (PDT) Received: by 10.60.45.37 with HTTP; Wed, 3 Jul 2013 12:49:56 -0700 (PDT) In-Reply-To: <1372850496506-4047330.post@n3.nabble.com> References: <1372850496506-4047330.post@n3.nabble.com> Date: Wed, 3 Jul 2013 22:49:56 +0300 Message-ID: Subject: Re: Hbase with Servlet and JSP From: Asaf Mesika To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=047d7b41cbb81d9d8404e0a0c4ed X-Virus-Checked: Checked by ClamAV on apache.org --047d7b41cbb81d9d8404e0a0c4ed Content-Type: text/plain; charset=UTF-8 Did you somehow turned the Security flag on for HBase since your exception is Security related. On Wednesday, July 3, 2013, SamSalman wrote: > Hello Experts, > > I am quite new to Hbase and Hadoop and above all new to java too. Recently > started working on Hbase and Java. I have successfully installed & > configured Hadoop & Hbase and also made my 1st ever java application on > hbase using this tutorial > > http://autofei.wordpress.com/2012/04/02/java-example-code-using-hbase-data-model-operations/ > > Now, I want to connect hbase with web application using servlet and Jsp. In > this regard, I made one jsp page where I get users input and transfer them > to servlet to insert them into my HTable, but unfortunately I am facing > this > error : > > SEVERE: java.util.NoSuchElementException > at java.util.HashMap$HashIterator.nextEntry(HashMap.java:897) > at java.util.HashMap$KeyIterator.next(HashMap.java:928) > at > > org.apache.hadoop.security.UserGroupInformation.(UserGroupInformation.java:430) > at > > org.apache.hadoop.security.UserGroupInformation.getCurrentUser(UserGroupInformation.java:452) > 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.apache.hadoop.hbase.util.Methods.call(Methods.java:37) > at org.apache.hadoop.hbase.security.User.call(User.java:590) > at org.apache.hadoop.hbase.security.User.callStatic(User.java:580) > at org.apache.hadoop.hbase.security.User.access$400(User.java:51) > at > > org.apache.hadoop.hbase.security.User$SecureHadoopUser.(User.java:397) > at > > org.apache.hadoop.hbase.security.User$SecureHadoopUser.(User.java:392) > at org.apache.hadoop.hbase.security.User.getCurrent(User.java:140) > at > > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionKey.(HConnectionManager.java:435) > at > > org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:180) > at org.apache.hadoop.hbase.client.HTable.(HTable.java:155) > at org.apache.hadoop.hbase.client.HTable.(HTable.java:133) > at > com.Hbase.Controller.HbaseServlet.addRecord(HbaseServlet.java:89) > at > com.Hbase.Controller.HbaseServlet.processRequest(HbaseServlet.java:67) > at com.Hbase.Controller.HbaseServlet.doPost(HbaseServlet.java:159) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at > org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682) > at > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318) > at > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160) > at > > org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673) > at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99) > at > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174) > at > > org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260) > at > > com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188) > at > > org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) > at > > org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) > at > > org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) > at > > org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) > at > > org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) > at > > org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) > at > > org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) > at > > org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) > at > org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) > at > > org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) > at > > org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) > at > > org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) > at > > org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) > at > > org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) > at > > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) > at > > org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) > at java.lang.Thread.run(Thread.java:724) > > I haven't done anything special just passed values from jps through > parameters to Servlet and used addRecord function that mentioned in given > link. Said error comes when I make instance of my HTable by this code: > HTable table = new HTable(conf, "scores"); > > I really don't know what to do as I couldn't find any tutorial to use Hbase > with Servlet and Jsp. I request please guide me how to use Hbase with > Servlet and Jsp and also kindly point out me any tutorial to use Hbase in > web application as I have to develop a complete web application which will > be my degree project. > > Thanks in advance, > > Regards, > > Sam > > > > > > -- > View this message in context: > http://apache-hbase.679495.n3.nabble.com/Hbase-with-Servlet-and-JSP-tp4047330.html > Sent from the HBase User mailing list archive at Nabble.com. > --047d7b41cbb81d9d8404e0a0c4ed--