我正在eclipse中创建一个hbase web服务,并尝试将其托管在Tomcat7中。以下是我的.classpath文件条目:
<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)
编辑:不知怎的,我的工作区搞砸了,现在当我刚创建了一个web服务时,上面的异常消失了,但遇到了一个新的异常:
org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: null
这一次我真是疯了。请帮帮我。
1条答案
按热度按时间7cwmlq891#
这应该可以解决你的问题,按照以下步骤
1.单击project properties=>java build path=>order and export选择所有要包含的jar。
2.单击properties=>deployment assembly=>add=>java build path entries=>select jars 3.export and build war。