求使用webdav映射hdfs为本地文件的解答
http://hayash.blog.163.com/blog/static/1110517201081613941237/我根据这篇文章里将http://hdfs-webdav.googlecode.com/files/hdfs-webdav.war 中下载的hdfs-webdav.war部署到tomcat中:
我的tomcat是安装在有linux系统的机器上的,并且机器上已经安装了hadoop,且该机器作为hadoop的namenode节点,
我不太懂文章中所说的hdfs-webdav.war部署到tomcat中,这里要求的机器是必须是装有hadoop的namenode节点的机器还是任何一台
计算机都可以吗?
按照我上面的部署,测试http://localhost:8080/hdfs-webdav 出现如下错误
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error instantiating servlet class org.apache.hadoop.fs.webdav.WebdavServlet
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
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)
root cause
java.lang.NoClassDefFoundError: org/apache/catalina/util/StringManager
org.apache.hadoop.fs.webdav.DefaultServlet.(DefaultServlet.java:198)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
java.lang.Class.newInstance0(Class.java:355)
java.lang.Class.newInstance(Class.java:308)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
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)
root cause
java.lang.ClassNotFoundException: org.apache.catalina.util.StringManager
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
org.apache.hadoop.fs.webdav.DefaultServlet.(DefaultServlet.java:198)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
java.lang.Class.newInstance0(Class.java:355)
java.lang.Class.newInstance(Class.java:308)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:301)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:162)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
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)
不知道怎么回事,求哪位大神给个解答 要求的机器是任意一台,只需要把NameNode的地址配置好就可以啦 替换下项目的jar包 回复 1# chenaiping
同问啊,我也出现同样。
以前部署过一次是window版的cygwin的hadoop,tomcat也在本地,没有。
现在是在虚拟机linux上部署伪分布的hadoop,不管tomat是装在linux还是window下,都出现同样。错误代码跟你一样,
请问你解决了吗吗? 哈哈,我已经解决了。
不要用tomcat7,换成6的就可以了。 回复 5# hxsstar
我用的是6.0 可还是不行 爆的错误和你一样 请问还修改别的地方了么
页:
[1]