我在Eclipse中創建一個HBASE Web服務,並試圖主機在Tomcat中7。這裏是我的.classpath文件條目:java.lang.NoClassDefFoundError:組織/阿帕奇/ Hadoop的/ conf目錄/配置
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/workspace/SampleWebApp/sqljdbc4.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/commons-logging-1.1.3/commons-logging-1.1.3.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/hadoop-2.2.0/share/hadoop/common/hadoop-common-2.2.0.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/core-3.1.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hadoop-core-1.1.2.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-client-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-common-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-it-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-thrift-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/httpclient-4.1.3.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/httpcore-4.1.3.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/zookeeper-3.4.5.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/activation-1.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/asm-3.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-beanutils-1.7.0.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-beanutils-core-1.8.0.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-cli-1.2.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-codec-1.7.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-collections-3.2.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-configuration-1.6.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-digester-1.8.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-el-1.0.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-httpclient-3.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-io-2.4.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-lang-2.6.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-logging-1.1.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-math-2.2.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/commons-net-1.4.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/findbugs-annotations-1.3.9-1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/guava-12.0.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hamcrest-core-1.3.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-common-0.96.1-hadoop1-tests.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-examples-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-hadoop1-compat-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-hadoop-compat-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-it-0.96.1-hadoop1-tests.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-prefix-tree-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-protocol-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-server-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-server-0.96.1-hadoop1-tests.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-shell-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/hbase-testing-util-0.96.1-hadoop1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/high-scale-lib-1.1.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/htrace-core-2.01.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jackson-core-asl-1.8.8.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jackson-jaxrs-1.8.8.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jackson-mapper-asl-1.8.8.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jackson-xc-1.8.8.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jamon-runtime-2.3.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jasper-compiler-5.5.23.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jasper-runtime-5.5.23.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jaxb-api-2.2.2.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jaxb-impl-2.2.3-1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jersey-core-1.8.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jersey-json-1.8.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jersey-server-1.8.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jettison-1.3.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jetty-6.1.26.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jetty-sslengine-6.1.26.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jetty-util-6.1.26.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jruby-complete-1.6.8.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jsp-2.1-6.1.14.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jsp-api-2.1-6.1.14.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/jsr305-1.3.9.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/junit-4.11.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/libthrift-0.9.0.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/log4j-1.2.17.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/metrics-core-2.1.2.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/netty-3.6.6.Final.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/protobuf-java-2.5.0.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/servlet-api-2.5-6.1.14.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/slf4j-api-1.6.4.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/slf4j-log4j12-1.6.4.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/stax-api-1.0.1.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/lib/xmlenc-0.52.jar"/>
<classpathentry kind="lib" path="C:/Users/cmajumb/Downloads/commons-logging-1.1.3/commons-logging-api-1.1.3.jar"/>
<classpathentry kind="output" path="build/classes"/>
我希望我的班級路徑中都需要JAR(Hadoop核心和常用登錄)。 不過我正在同時託管服務以下錯誤:
The Starter service, which is not valid, caused java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.axis2.description.java2wsdl.DefaultSchemaGenerator.<init>(DefaultSchemaGenerator.java:140)
at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:453)
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:388)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:101)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:178)
at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:82)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:813)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:142)
at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:283)
at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:95)
at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:60)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3988)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:425)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Unknown Source)
編輯:不知怎的,我搞砸我的工作區,現在當我剛創建的大網絡服務隊那麼上面的異常走了,但一個新的例外是遇到:
org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: null
這次我沒有主意了。請幫助我。
感謝您的答案subzero。有些東西與工作區混淆,當我從頭開始創建服務時,它工作正常。 – tom