gpt4 book ai didi

构建JPA项目期间的Eclipse AbstractMethodError

转载 作者:行者123 更新时间:2023-12-01 06:34:19 29 4
gpt4 key购买 nike

我对配备 jboss 开发工作室的 Eclipse IDE (Juno RE 2) 有问题。我有几个使用 JPA 的 Maven 项目。在这些项目中,Eclipse 报错“
此项目具有 JPA 方面,但无法创建 JPA 项目。有关更多详细信息,请参阅错误日志。”

当我在工作区的 .metadata 文件夹中看到 .log 文件时,我看到了这个异常:

java.lang.AbstractMethodError: org.jboss.tools.hibernate.jpt.core.internal.jpa2.HibernateJpa2_0PlatformFactory.buildJpaPlatform(Lorg/eclipse/jpt/jpa/core/JpaPlatform$Config;)Lorg/eclipse/jpt/jpa/core/JpaPlatform;
at org.eclipse.jpt.jpa.core.internal.platform.InternalJpaPlatformConfig.buildJpaPlatform(InternalJpaPlatformConfig.java:109)
at org.eclipse.jpt.jpa.core.internal.platform.InternalJpaPlatformConfig.getJpaPlatform(InternalJpaPlatformConfig.java:102)
at org.eclipse.jpt.jpa.core.internal.platform.InternalJpaPlatformManager.getJpaPlatform(InternalJpaPlatformManager.java:288)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.getJpaPlatform(InternalJpaProjectManager.java:666)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.buildJpaProjectConfig(InternalJpaProjectManager.java:653)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.buildJpaProject(InternalJpaProjectManager.java:623)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.addJpaProject(InternalJpaProjectManager.java:604)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.buildJpaProject_(InternalJpaProjectManager.java:303)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager$BuildJpaProjectCommand.execute(InternalJpaProjectManager.java:297)
at org.eclipse.jpt.common.core.internal.utility.command.CommandJobCommandAdapter.execute(CommandJobCommandAdapter.java:50)
at org.eclipse.jpt.common.core.internal.utility.command.JobCommandJob.run(JobCommandJob.java:42)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

我真的找不到这个错误的原因。我也不能绕着它转。
任何形式的解释和/或帮助将不胜感激。

编辑:
或者,当我告诉 Maven 更新项目时,我得到
java.lang.NoClassDefFoundError: org/eclipse/jpt/jpa/core/JpaFacet
at org.jboss.tools.maven.jpa.configurators.JpaProjectConfigurator.canConfigure(JpaProjectConfigurator.java:171)
at org.jboss.tools.maven.jpa.configurators.JpaProjectConfigurator.configure(JpaProjectConfigurator.java:73)
at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:109)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:413)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:350)
at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:74)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

最佳答案

更新我的 Eclipse (Kepler) 后,我遇到了同样的问题。我通过删除项目属性中的 JPA Facet 解决了这个问题。不幸的是,这只是一个临时解决方案。在“Maven”>“更新项目...”之后,JPA 问题标记返回...

也许有人会想出更好、更持久的解决方案!

How to remove JPA Facet from project properties

关于构建JPA项目期间的Eclipse AbstractMethodError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16509133/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com