Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> Hbase with Servlet and JSP


+
SamSalman 2013-07-03, 11:21
Copy link to this message
-
Re: Hbase with Servlet and JSP
Which HBase version are you using ?

In 0.94, take a look at:
src/main/resources/hbase-webapps/master/table.jsp

where you would see:
  String tableName = request.getParameter("name");
  HTable table = new HTable(conf, tableName);

Cheers

On Wed, Jul 3, 2013 at 4:21 AM, SamSalman <[EMAIL PROTECTED]>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.<init>(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.<init>(User.java:397)
>         at
>
> org.apache.hadoop.hbase.security.User$SecureHadoopUser.<init>(User.java:392)
>         at org.apache.hadoop.hbase.security.User.getCurrent(User.java:140)
>         at
>
> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionKey.<init>(HConnectionManager.java:435)
>         at
>
> org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManager.java:180)
>         at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:155)
>         at org.apache.hadoop.hbase.client.HTable.<init>(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)
+
SamSalman 2013-07-03, 15:49
+
Asaf Mesika 2013-07-03, 19:49
+
SamSalman 2013-07-04, 16:02
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB