Failed to start component [StandardEngine[Catalina].StandardHost[localhost]异常解决

news/2024/5/20 1:01:42 标签: LifecycleException, eclipse, tomcat, gradle

报错:
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/data-report]]

背景:相同配置文件Gradle构建的两个 Java Web 项目,都可以在tomcat里正常运行,但是其中一个新建项目在eclipse里无法用tomcat插件运行

解决方式:经过检查发现项目.project文件中需要增加配置

<!-- org.eclipse.buildship.core.gradleclasspathcontainer -->
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>

完整.project配置如下

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src/main/java"/>
	<classpathentry kind="src" path="src/main/resources"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
	<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer">
		<attributes>
			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
	<classpathentry kind="output" path="bin"/>
</classpath>

http://www.niftyadmin.cn/n/1413073.html

相关文章

实现一个按比例缩放的Image服务器控件

有时候我们需要实现一个按比例缩放的Image控件&#xff0c;因为在Web上的<image> 当设定了宽度和高度的时候&#xff0c;如果图片本身的长宽比跟它俩的比值不一样&#xff0c;那么图片就变形了。 下面的这个控件派生于System.Web.UI.WebControls.Image&#xff0c;它重写…

移动端基础

1.物理像素 在移动设备上的最小物理显示单元。如&#xff0c;iphone6的物理像素为750*1334。 2.逻辑像素 css中逻辑像素px&#xff0c;可以认为是一个“参考像素”。大小不固定&#xff0c;可以放大和缩小。如PC端上的网页放到手机端浏览时&#xff0c;每个px占的空间缩小&…

Eclipse安装的Git插件Team中不显示

help->installion detail->instaled softwahore, 选中所有git相关插件, 点击下方uninstall进行卸载 如果还存在git插件,在eclipse安装文件, 找到artifacts.xml对应的所有git项&#xff1b; 如果还存在git插件,在eclipse安装文件中, 找到plugins文件夹下删除所有的git相关…

【手撕算法|动态规划系列No.4】leetcode91. 解码方法

个人主页&#xff1a;平行线也会相交 欢迎 点赞&#x1f44d; 收藏✨ 留言✉ 加关注&#x1f493;本文由 平行线也会相交 原创 收录于专栏【手撕算法系列专栏】【LeetCode】 &#x1f354;本专栏旨在提高自己算法能力的同时&#xff0c;记录一下自己的学习过程&#xff0c;希望…

圖片垂直居中的使用技巧

「使用純CSS實現未知尺寸的圖片(但高寬都小於200px)在200px的正方形容器中水平和垂直居中。」當然出題並不是隨意&#xff0c;而是有其現實的原因&#xff0c;垂直居中是網頁中最常遇到的一個問題&#xff0c;很有代表性。題目的難點在於兩點&#xff1a;1. 垂直居中&#xff1…

Python学习之路--time模块

import time# time.sleep()#时间戳time.time()#格式化时间print(time.strftime((%Y-%m-%d %H:%M:%S)))print(time.strftime((%m-%d %H:%M:%S)))print(time.localtime())# 2019-06-03 13:03:53# 06-03 13:03:53# time.struct_time(tm_year2019, tm_mon6, tm_mday3, tm_hour13, t…

php建立多层目录的函数

/***根据路径path建立多级目录*$dir目标目录 $mode权限&#xff0c;0700表示最高权限 */ function makedir( $dir , $mode "0700" ) {if(strpos($dir , "/" )){$dir_path "" ;$dir_info explode ( "/" , $dir );foreach($dir_info…

绑定不同格式的图片

将不同图片格式绑定在一起显示把image元素添加到块级元素(如div或h2)中 <h2><img src"headline_text.gif alt"headline image set in GIF format"></h2>h2 {background-image:url(headline_bkgd.jpg);background-repeat:none;width: 587px;he…