incubator-hcatalog-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thejas Nair <the...@hortonworks.com>
Subject Re: First request fail in webhcat
Date Fri, 08 Mar 2013 03:48:17 GMT
Hi Mohammad,
Thanks for finding the fix. We can upgrade the jackson version to fix this.
Yes, please open a jira and submit a patch.

Thanks,
Thejas


On 3/7/13 5:36 PM, Mohammad Islam wrote:
> Can someone please address this?
> Regards,
> Mohammad
>
> ------------------------------------------------------------------------
> *From:* Mohammad Islam <mislam77@yahoo.com>
> *To:* "hcatalog-user@incubator.apache.org"
> <hcatalog-user@incubator.apache.org>
> *Sent:* Wednesday, March 6, 2013 12:33 AM
> *Subject:* First request fail in webhcat
>
> Hi All,
> I started webhcat server using sbin/webhcat_server.sh start.
>
> Problem:
> ---------
> Later when I sent the **first** curl request, I got HTTP error 500 with
> ClassNotFound exception
> "org/codehaus/jackson/map/deser/std/StdDeserializer".
>
> However, immediately after this, if I  sent the same request for the
> *second* time, it started working fine.
>
> More explanations of the command-used and the associated error messages
> both in client and server sides are pasted at the end.
>
> My Workaround:
> -----------
> After different tries, I was able to solve the problem as follows:
>
> 1. In $HCAT_HOME/share/webhcat/svr/lib, I found the
> jackson-mapper-asl-1.8.3.jar there. I replaced it with a newer version
> jackson-mapper-asl-1.9.2.jar.
> 2. Restart webhcat server.
> 3. Submit (the first time failure ) curl command. And it worked without
> any problem from the beginning.
>
> Btw, I got the resolution hints from the internet proposed for different
> product.
>
> Question:
> --------
> Should we use jackson.version 1.9.2 instead of  1.8.3?
> If yes, I could create a JIRA and send a patch.
>
> Or am I missing something obvious?
>
> Regards,
> Mohammad
>
>
>
> Details commands and error
>
>
> First Command:
> ---------------
> curl -s -d user.name=<xyz>      -d 'exec=show tables;'
>   'http://localhost:50111/templeton/v1/ddl'
>
> Client response:
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;"/>
> <title>Error 500 org/codehaus/jackson/map/deser/std/StdDeserializer</title>
> </head>
> <body>
> <h2>HTTP ERROR: 500</h2>
> <p>Problem accessing /templeton/v1/ddl. Reason:
> <pre>  org/codehaus/jackson/map/deser/std/StdDeserializer</pre></p>
> <hr /><i><small>Powered by Jetty://</small></i>
>
>
> webhcat-console-error.log:
>
> 13/03/06 08:04:43 WARN servlet.WebComponent: A servlet request, to the
> URI http://localhost:50111/templeton/v1/ddl, contains form parameters in
> the request body but the request body has been consumed by the servlet
> or a servlet filter accessing the request parameters. Only resource
> methods using @FormParam will work as expected. Resource methods
> consuming the request body by other means will not work as expected.
> 13/03/06 08:04:43 INFO templeton.ExecServiceImpl:
> Running: $HOME//softwares/hcatalog/hcatalog-0.5.0-incubating/bin/hcat -e
> show tables;
> 13/03/06 08:04:43 INFO templeton.ExecServiceImpl: Env
> HADOOP_PREFIX=$HOME//softwares/hadoop/hadoop-1.0.4/libexec/..
> 13/03/06 08:04:43 INFO templeton.ExecServiceImpl: Env
> JAVA_HOME=/usr/java/default
> 13/03/06 08:04:43 INFO templeton.ExecServiceImpl: Env
> HADOOP_USER_NAME=mislam
> 13/03/06 08:04:43 INFO templeton.ExecServiceImpl: Env
> HIVE_HOME=$HOME/softwares//hive/current
> 13/03/06 08:04:43 INFO templeton.ExecServiceImpl: Env
> HADOOP_HOME=$HOME//softwares/hadoop/hadoop-1.0.4/libexec/..
> 13/03/06 08:04:45 WARN servlet.ServletHandler: Error for /templeton/v1/ddl
> java.lang.NoClassDefFoundError:
> org/codehaus/jackson/map/deser/std/StdDeserializer
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
> at java.lang.Class.getConstructor0(Class.java:2699)
> at java.lang.Class.newInstance0(Class.java:326)
> at java.lang.Class.newInstance(Class.java:308)
> at
> org.codehaus.jackson.jaxrs.MapperConfigurator._resolveIntrospector(MapperConfigurator.java:173)
> at
> org.codehaus.jackson.jaxrs.MapperConfigurator._resolveIntrospectors(MapperConfigurator.java:146)
> at
> org.codehaus.jackson.jaxrs.MapperConfigurator._setAnnotations(MapperConfigurator.java:133)
> at
> org.codehaus.jackson.jaxrs.MapperConfigurator.getDefaultMapper(MapperConfigurator.java:70)
> at
> org.codehaus.jackson.jaxrs.JacksonJsonProvider.locateMapper(JacksonJsonProvider.java:648)
> at
> org.codehaus.jackson.jaxrs.JacksonJsonProvider.writeTo(JacksonJsonProvider.java:500)
> at
> com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy.writeTo(JacksonProviderProxy.java:160)
> at
> com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1448)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1360)
> at
> org.apache.hadoop.security.authentication.server.AuthenticationFilter.doFilter(AuthenticationFilter.java:372)
> at org.apache.hadoop.hdfs.web.AuthFilter.doFilter(AuthFilter.java:85)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1331)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:477)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
> at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:47)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
> at org.eclipse.jetty.server.Server.handle(Server.java:349)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
> at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:925)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857)
> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.ClassNotFoundException:
> org.codehaus.jackson.map.deser.std.StdDeserializer
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> ... 55 more
>
>
> Second Command:
> -----------
>
>
> curl -s -d user.name=<xyz>        -d 'exec=show tables;'
>   'http://localhost:50111/templeton/v1/ddl'
>
> webhcat-console-error.log : No error..
>
> 13/03/06 08:06:43 WARN servlet.WebComponent: A servlet request, to the
> URI http://localhost:50111/templeton/v1/ddl, contains form parameters in
> the request body but the request body has been consumed by the servlet
> or a servlet filter accessing the request parameters. Only resource
> methods using @FormParam will work as expected. Resource methods
> consuming the request body by other means will not work as expected.
> 13/03/06 08:06:43 INFO templeton.ExecServiceImpl: Running:
> $HOME/softwares/hcatalog/hcatalog-0.5.0-incubating/bin/hcat -e show tables;
> 13/03/06 08:06:43 INFO templeton.ExecServiceImpl: Env
> HADOOP_PREFIX=$HOME//softwares/hadoop/hadoop-1.0.4/libexec/..
> 13/03/06 08:06:43 INFO templeton.ExecServiceImpl: Env
> JAVA_HOME=/usr/java/default
> 13/03/06 08:06:43 INFO templeton.ExecServiceImpl: Env
> HADOOP_USER_NAME=mislam
> 13/03/06 08:06:43 INFO templeton.ExecServiceImpl: Env
> HIVE_HOME=$HOME//softwares//hive/current
> 13/03/06 08:06:43 INFO templeton.ExecServiceImpl: Env
> HADOOP_HOME=$HOME//softwares/hadoop/hadoop-1.0.4/libexec/..
>
>
>


Mime
View raw message