[英]Eclipse Tomcat Publishing Error: FlatFile Cannot be cast to IFlatFolder
I have an application which I can't deploy or run in Tomcat because as soon as I attempt to start Tomcat in Eclipse (with this application configured in Add/Remove Project), I get this error: 我有一个无法在Tomcat中部署或运行的应用程序,因为一旦我尝试在Eclipse中启动Tomcat(在“添加/删除项目”中配置了该应用程序),就会收到以下错误消息:
Could not publish to the server.
org.eclipse.wst.common.componentcore.internal.flat.FlatFile cannot be cast to org.eclipse.wst.common.componentcore.internal.flat.IFlatFolder
This happens on starting, publishing, and cleaning the Tomcat server in Eclipse, as long as my application is configured there. 只要在此处配置了我的应用程序,就会在启动,发布和清理Eclipse中的Tomcat服务器时发生这种情况。 When I remove the application, I can publish fine. 当我删除应用程序时,我可以很好地发布。
What is this error about? 这个错误是关于什么的? I couldn't find any resources in Google. 我在Google中找不到任何资源。
Check for ' org.eclipse.wst.common.component ' in your ' .settings ' folder in your maven project location. 在您的maven项目位置的.settings文件夹中检查org.eclipse.wst.common.component 。 Check that the dependencies in that file are configured correctly. 检查该文件中的依赖项是否配置正确。 Make sure that a file (jar) is not added as a dependency at a placeholder for a folder . 确保没有在文件夹的占位符上将文件 (jar)添加为依赖项。
I faced this issue when I added jar dependencies which were sibling modules to my project. 当我将jar依赖项添加到项目中时,我遇到了这个问题。 I removed the 'dependency' tags and let maven configure the deployment descriptor for me automatically. 我删除了“ dependency”标签,然后让maven自动为我配置部署描述符。
This worked for me and I cannot seem to find any other resource on google for this. 这为我工作,我似乎无法在Google上找到任何其他资源。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.