2

将第 9 章从 zk Essentials 导入 Eclipse Kepler EE 作为 Maven 项目可以工作,但是在导入第 10 章时:

安装 JPA 2.0 时失败。

java.lang.NullPointerException
at org.eclipse.jpt.common.core.internal.resource.ModuleResourceLocator.getRootFolder(ModuleResourceLocator.java:85)
at org.eclipse.jpt.common.core.internal.resource.ModuleResourceLocator.getDefaultLocation(ModuleResourceLocator.java:32)
at org.eclipse.jpt.common.core.internal.resource.SimpleProjectResourceLocator.getDefaultLocation(SimpleProjectResourceLocator.java:45)
at org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDelegate.defaultResourceLocation(JpaFacetInstallDelegate.java:123)
at org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDelegate.createPersistenceXml(JpaFacetInstallDelegate.java:107)
at org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDelegate.createProjectXml(JpaFacetInstallDelegate.java:100)
at org.eclipse.jpt.jpa.core.internal.facet.JpaFacetInstallDelegate.execute_(JpaFacetInstallDelegate.java:61)
at org.eclipse.jpt.jpa.core.internal.facet.JpaFacetActionDelegate.execute(JpaFacetActionDelegate.java:35)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1477)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:441)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:1117)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$5.run(FacetedProject.java:1099)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChanges(FacetedProject.java:1109)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.commitChanges(FacetedProjectWorkingCopy.java:2020)
at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard.performFinish(ModifyFacetedProjectWizard.java:400)
at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard$3.run(ModifyFacetedProjectWizard.java:331)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2345)
at org.eclipse.wst.common.project.facet.ui.ModifyFacetedProjectWizard$4.run(ModifyFacetedProjectWizard.java:345)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

感谢您的任何指导,帮助!

4

1 回答 1

4

我通过查看关于 JBIDE-11655 的评论解决了这个问题:删除所有.project.settings.classpath在我的项目文件夹中。

于 2013-12-20T17:13:01.423 回答