0

Eclipse 在一个项目上给了我一个红色的 X。我将此项目与另一个工作区中的类似项目进行了比较。类路径是不同的(它应该是),并且应该是一些源文件。但是问题选项卡中的错误说

“由于“”,项目未构建。修复问题,然后尝试刷新此项目并构建它,因为它可能不一致”

是的,看起来像关键信息的关键点只是说“”。我尝试刷新和重建无济于事。该项目是从工作区外部导入的。但这应该没关系,不是吗?我以前做过,没有任何问题。但是一个类似的项目(我正在比较的那个)在工作区中运行良好。

我还能在哪里寻找可能帮助我缩小范围的错误信息?

update - 这个项目被其他人用作项目参考,但这个项目不依赖其他人。这是它的类路径文件内容:

    <classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="src" path="test"/>
    <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
    <classpathentry kind="con" path="org.eclipse.jst.server.core.container/com.ibm.ws.ast.st.runtime.runtimeTarget.v70/was.base.v7">
        <attributes>
            <attribute name="owner.project.facets" value="jst.utility"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="src" path=".apt_generated">
        <attributes>
            <attribute name="optional" value="true"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/WebSphere Application Server v7.0 JRE">
        <attributes>
            <attribute name="owner.project.facets" value="java"/>
        </attributes>
    </classpathentry>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/antlr-2.7.6.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/aspectjweaver-1.6.8.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/buisnessObjects/cecore.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/buisnessObjects/celib.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/buisnessObjects/ceplugins_client.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/buisnessObjects/ceplugins_core.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/buisnessObjects/ceplugins_cr.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/buisnessObjects/cereports.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/buisnessObjects/cesession.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/buisnessObjects/ceutils.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/cglib-nodep-2.2.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/aopalliance-1.0.0.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/apache-commons/commons-beanutils.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/apache-commons/commons-collections-3.2.1.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/apache-commons/commons-lang-2.4.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/apache-commons/commons-logging-1.1.1.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/buisnessObjects/corbaidl.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/dom4j-1.6.1.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/buisnessObjects/ebus405.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/hibernate/hibernate-3.5.1/hibernate3.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/icu4j-3.4.4.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/jasypt-1.7.1.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/javassist-3.9.0.GA.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/joda-time-1.6.1.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/jpa-api-2.0-cr-1.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/junit-4.8.2.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/log4j-1.2.5.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/buisnessObjects/logging.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.aop-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.asm-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.aspects-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.beans-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.context.support-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.context-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.core-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.expression-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.instrument.tomcat-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.instrument-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.jdbc-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.jms-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.orm-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.oxm-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.test-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.transaction-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.web.portlet-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.web.servlet-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.web.struts-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/spring/spring-framework-3.0.1/org.springframework.web-3.0.1.RELEASE-A.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/poi-3.7-beta3-20100924.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/serialization.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/SL_plugins.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/slf4j-api-1.5.8.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/misc3rdParty/slf4j-log4j12-1.5.8.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/wicket/wicket-1.4.7/wicket-1.4.7.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/wicket/wicket-1.4.7/wicket-auth-roles-1.4.7.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/wicket/wicket-1.4.7/wicket-datetime-1.4.7.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/wicket/wicket-1.4.7/wicket-devutils-1.4.7.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/wicket/wicket-1.4.7/wicket-extensions-1.4.7.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/wicket/wicket-1.4.7/wicket-guice-1.4.7.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/wicket/wicket-1.4.7/wicket-ioc-1.4.7.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/wicket/wicket-1.4.7/wicket-jmx-1.4.7.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/wicket/wicket-1.4.7/wicket-objectsizeof-agent-1.4.7.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/wicket/wicket-1.4.7/wicket-spring-1.4.7.jar"/>
    <classpathentry kind="lib" path="C:/views/SharedComp_Development/SharedComp_Software/jar/wicket/wicket-1.4.7/wicket-velocity-1.4.7.jar"/>
    <classpathentry kind="output" path="bin"/>
</classpath>
4

2 回答 2

0

感谢 Zagrev 的帮助,但事实证明,有人已将我们的 bin 文件夹检查到我们的集成源代码控制中,因此 eclipse 实际上无法编译代码。一旦我删除了 bin 并且它可以生成,它生成得很好并且错误消失了。

尽管如此,那里的信息仍然非常无用。如果该消息将我指向不可写的类文件,我可能会立即找到它。相反,我挣扎了好几个小时,试图找出我的 .classpath 或 .settings 出了什么问题。

于 2013-09-25T17:27:54.153 回答
0

听起来该项目定义了一个依赖项,但项目名称已被删除。这可以通过手动编辑 .classpath 文件来完成。我会尝试从 .classpath 文件中删除所有依赖项目。

您可以从 Eclipse 中通过编辑构建路径并删除任何项目来执行此操作。然后将依赖的项目添加回来。这应该清理 .classpath 文件。

于 2013-09-25T15:07:27.583 回答