我刚刚在netbeans中打开了项目,清理并构建它然后运行项目,但它显示以下错误消息。
注意:同一项目在其他系统中运行良好。
03-Jan-2017 13:38:30.767 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild:start: org.apache.catalina.LifecycleException:无法启动组件[StandardEngine [Catalina] .StandardHost [localhost] .StandardContext []] 在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) 在org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) 在org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702) 在org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697) 在org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579) 在org.apache.catalina.startup.HostConfig $ DeployDescriptor.run(HostConfig.java:1744) at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617) 在java.lang.Thread.run(Thread.java:745) 引起:java.lang.LinkageError:加载器约束违规:加载器(org / apache / catalina / loader / WebappClassLoader的实例)先前为名称为#34; javax / servlet / ServletContext"的其他类型启动加载 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) 在java.net.URLClassLoader.access $ 100(URLClassLoader.java:73) 在java.net.URLClassLoader $ 1.run(URLClassLoader.java:368) 在java.net.URLClassLoader $ 1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) 在org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:894) 在org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1298) 在org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1175) 在org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:167) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5148) 在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ......还有10个
03-Jan-2017 13:38:30.770 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor错误部署配置描述符/opt/apache-tomcat-8.0.5/conf/Catalina /localhost/ROOT.xml java.lang.IllegalStateException:ContainerBase.addChild:start:org.apache.catalina.LifecycleException:无法启动组件[StandardEngine [Catalina] .StandardHost [localhost] .StandardContext []] 在org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729) 在org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702) 在org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697) 在org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579) 在org.apache.catalina.startup.HostConfig $ DeployDescriptor.run(HostConfig.java:1744) at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617) 在java.lang.Thread.run(Thread.java:745)
03-Jan-2017 13:38:30.770 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor部署配置描述符/opt/apache-tomcat-8.0.5/conf/Catalina/本地主机/ aoanalysis.xml 03-Jan-2017 13:38:30.772警告[localhost-startStop-1] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule] {Context}设置属性' antiJARLocking'真的'没有找到匹配的财产。 03-Jan-2017 13:38:30.774 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild:start: org.apache.catalina.LifecycleException:无法启动组件[StandardEngine [Catalina] .StandardHost [localhost] .StandardContext [/ aoanalysis]] 在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) 在org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) 在org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702) 在org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697) 在org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579) 在org.apache.catalina.startup.HostConfig $ DeployDescriptor.run(HostConfig.java:1744) at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617) 在java.lang.Thread.run(Thread.java:745) 引起:org.apache.catalina.LifecycleException:无法启动组件[org.apache.catalina.webresources.StandardRoot@3787a790] 在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) 在org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4842) 在org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4967) 在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ......还有10个 引起:java.lang.IllegalArgumentException:指定的主资源集[/ home / netsys / Documents / aoanalysis / build / web]无效 在org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:634) 在org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ......还有13个
03-Jan-2017 13:38:30.774 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor错误部署配置描述符/opt/apache-tomcat-8.0.5/conf/Catalina /localhost/aoanalysis.xml java.lang.IllegalStateException:ContainerBase.addChild:start:org.apache.catalina.LifecycleException:无法启动组件[StandardEngine [Catalina] .StandardHost [localhost] .StandardContext [/ aoanalysis]] 在org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729) 在org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702) 在org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697) 在org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579) 在org.apache.catalina.startup.HostConfig $ DeployDescriptor.run(HostConfig.java:1744) at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617) 在java.lang.Thread.run(Thread.java:745)
我的pom.xml是 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0
<groupId>com.abc</groupId>
<artifactId>xyz</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>xyz</name>
<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-version>4.2.1.RELEASE</spring-version>
<hibernate.version>4.3.8.Final</hibernate.version>
<mysql.version>5.1.10</mysql.version>
<junit-version>4.11</junit-version>
<servlet-api-version>2.5</servlet-api-version>
<jsp-version>2.1</jsp-version>
<jstl-version>1.2</jstl-version>
<google-client.version>1.17.0-rc</google-client.version> <!-- httpclient version -->
<com.google.api-ads.version>2.15.0</com.google.api-ads.version> <!--google api version -->
</properties>
<dependencies>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
<type>jar</type>
</dependency>
<!-- Reporting -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.3.4</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>3.7</version>
</dependency>
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.17</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>nl.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>1.2.4</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<!-- Hibernate framework-->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.2.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator-annotation-processor</artifactId>
<version>4.2.0.Final</version>
</dependency>
<!-- Spring framwork -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring-version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring-version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!-- Adwords API -->
<dependency>
<groupId>com.google.api-ads</groupId>
<artifactId>adwords-axis</artifactId>
<version>2.15.0</version> <!--google api version -->
</dependency>
<!-- Ads client library dependencies -->
<dependency>
<groupId>com.google.api-ads</groupId>
<artifactId>ads-lib</artifactId>
<version>${com.google.api-ads.version}</version>
</dependency>
<dependency>
<groupId>com.google.api-ads</groupId>
<artifactId>adwords-appengine</artifactId>
<version>${com.google.api-ads.version}</version>
</dependency>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>${google-client.version}</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
<version>${google-client.version}</version>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client</artifactId>
<version>${google-client.version}</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-jackson2</artifactId>
<version>${google-client.version}</version>
</dependency>
<dependency>
<groupId>com.google.api-ads</groupId>
<artifactId>aw-reporting</artifactId>
<version>1.11.0-SNAPSHOT</version> <!--aw reporting version -->
</dependency>
<dependency>
<groupId>com.google.api-ads</groupId>
<artifactId>aw-reporting-model</artifactId>
<version>1.11.0-SNAPSHOT</version> <!--aw reporting model version -->
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>${jstl-version}</version>
</dependency>
<!-- Junit Testing -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<!-- org.apache.poi configuration-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.8</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.8</version>
</dependency>
<!-- JSON Processor -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.4.1.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.16</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>7.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
答案 0 :(得分:0)
您的 tomcat 和 jre 之间似乎有version conflict
。这是version mapping between tomcat and jre。
答案 1 :(得分:0)
在我的情况下,这种情况正在发生,因为我通过IDE删除的一些旧项目仍由Tomcat部署(虽然已停止)。在“服务”窗口(cmd + 5打开)中,在“服务器”下,折叠Apache Tomcat或TomEE文件夹,然后折叠“Web应用程序”文件夹,右键单击/aoanalysis
,然后选择“取消部署”。这对我有用。