星火燎原

千日修以返初心 万日炼以达极致

导航

MyEclipse无法自动编译项目故障一例

MyEclipse导入项目后发现无法自动编译,classes目录下没有编译的类。

尝试的解决方法:

1、刷新项目,失败;

2、project-》clean…,失败;

3、关闭项目再次打开,失败;

 

查看日志发现如下错误信息:

日志目录:D:\WorkSpaces\WorkSpaceOfMyEclipseBlue2014\.metadata\.log

!ENTRY org.eclipse.core.resources 4 75 2017-07-04 20:55:55.278
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.jdt.core 4 75 2017-07-04 20:55:55.279
!MESSAGE Errors running builder 'Java Builder' on project 'ofo_plat'.
!STACK 0
java.lang.IllegalArgumentException: Path must include project and resource name: /
    at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
    at org.eclipse.core.internal.resources.Workspace.newResource(Workspace.java:2170)
    at org.eclipse.core.internal.resources.Container.getFile(Container.java:208)
    at com.genuitec.eclipse.hibernate.util.HTUtils.getConsoleConfigurationPreferences(HTUtils.java:188)
    at com.genuitec.eclipse.hibernate.util.HTUtils.getConsoleConfigurationPreferences(HTUtils.java:138)
    at com.genuitec.eclipse.hibernate.util.HTUtils.getConsoleConfiguration(HTUtils.java:130)
    at com.genuitec.eclipse.hibernate.util.HTUtils.getConsoleConfiguration(HTUtils.java:111)
    at com.genuitec.eclipse.hibernate.util.ConsoleConfigurationRepository.createFromHibernateProject(ConsoleConfigurationRepository.java:53)
    at com.genuitec.eclipse.hibernate.util.ConsoleConfigurationRepository.find(ConsoleConfigurationRepository.java:40)
    at org.hibernate.console.KnownConfigurations.find(KnownConfigurations.java:308)
    at org.hibernate.eclipse.jdt.ui.internal.MEUtils.getConsoleConfiguration(MEUtils.java:38)
    at org.hibernate.eclipse.jdt.ui.internal.HQLExpressionCompilerParticipant.getConsoleConfiguration(HQLExpressionCompilerParticipant.java:83)
    at org.hibernate.eclipse.jdt.ui.internal.HQLExpressionCompilerParticipant.buildStarting(HQLExpressionCompilerParticipant.java:34)
    at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.notifyParticipants(AbstractImageBuilder.java:567)
    at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:289)
    at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
    at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
    at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:178)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

 

经过多次尝试,发现跟Hibernate反向生成引擎的配置有关系,删除掉根目录下的“.myhibernatedata”文件后即可自动编译。

posted on 2017-07-05 15:47  xusweeter  阅读(381)  评论(0编辑  收藏  举报