我正在尝试Eclipse Kepler 4.3 EE
在我的旧工作区打开之后,我的项目以构建错误开始:
This project has the JPA facet, but no JPA project could be created. See the error log for more details.
这是详细信息:
eclipse.buildId=4.3.0.I20130605-2000
java.version=1.7.0_21
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -data D:\JJW\srcWeb -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
Error
Mon Aug 19 14:46:53 BRT 2013
null JPA platform: P/jjwxp-web
java.lang.IllegalArgumentException
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.buildJpaProject(InternalJpaProjectManager.java:643)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.buildJpaProject(InternalJpaProjectManager.java:635)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.buildJpaProject(InternalJpaProjectManager.java:628)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.addJpaProject(InternalJpaProjectManager.java:609)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager.buildJpaProject_(InternalJpaProjectManager.java:312)
at org.eclipse.jpt.jpa.core.internal.InternalJpaProjectManager$BuildJpaProjectCommand.execute(InternalJpaProjectManager.java:306)
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)
项目方面:JPA 2.0
的persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="jjwxp-web-unit"
transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>br.com.jjw.jjwxp.web.model.Pais</class>
<class>br.com.jjw.jjwxp.web.model.Estado</class>
<class>br.com.jjw.jjwxp.web.model.Cidade</class>
<class>br.com.jjw.jjwxp.web.model.Usuario</class>
<class>br.com.jjw.jjwxp.web.model.Empresa</class>
<class>br.com.jjw.jjwxp.web.model.Pessoa</class>
<class>br.com.jjw.jjwxp.web.model.PessoaCliente</class>
<class>br.com.jjw.jjwxp.web.model.PessoaRepresentante</class>
<class>br.com.jjw.jjwxp.web.model.PessoaContato</class>
<class>br.com.jjw.jjwxp.web.model.ListaPrecos</class>
<class>br.com.jjw.jjwxp.web.model.ListaPrecosRepresentante</class>
<class>br.com.jjw.jjwxp.web.model.ListaPrecosColuna</class>
<class>br.com.jjw.jjwxp.web.model.ListaPrecosItem</class>
<class>br.com.jjw.jjwxp.web.model.Produto</class>
<class>br.com.jjw.jjwxp.web.model.ProdutoGrade</class>
<class>br.com.jjw.jjwxp.web.model.ProdutoEstoque</class>
<class>br.com.jjw.jjwxp.web.model.ProdutoCor</class>
<class>br.com.jjw.jjwxp.web.model.FaixaTamanho</class>
<class>br.com.jjw.jjwxp.web.model.GrupoProduto</class>
<class>br.com.jjw.jjwxp.web.model.Tamanho</class>
<class>br.com.jjw.jjwxp.web.model.Cor</class>
<class>br.com.jjw.jjwxp.web.model.ProdutoImagem</class>
<class>br.com.jjw.jjwxp.web.model.ProdutoCorImagem</class>
<class>br.com.jjw.jjwxp.web.model.PVE</class>
<class>br.com.jjw.jjwxp.web.model.PVEItem</class>
<class>br.com.jjw.jjwxp.web.model.PVEItemGrade</class>
<class>br.com.jjw.jjwxp.web.model.CondicaoPagamento</class>
<class>br.com.jjw.jjwxp.web.model.ModalidadeVenda</class>
<class>br.com.jjw.jjwxp.web.model.Moeda</class>
<class>br.com.jjw.jjwxp.web.model.ClassificacaoFiscal</class>
<class>br.com.jjw.jjwxp.web.model.ClassificacaoFiscalEmpresa</class>
<class>br.com.jjw.jjwxp.web.model.RepresentanteProduto</class>
<class>br.com.jjw.jjwxp.web.model.ModuloSistema</class>
<shared-cache-mode>NONE</shared-cache-mode>
<properties>
<property name="eclipselink.ddl-generation" value="NONE" />
<property name="eclipselink.weaving" value="dynamic" />
<property name="eclipselink.logging.level" value="FINE" />
<property name="eclipselink.logging.logger"
value="org.eclipse.persistence.logging.CommonsLoggingSessionLog" />
</properties>
</persistence-unit>
</persistence>
有关正在发生的事情的任何想法?
答案 0 :(得分:0)
如果重命名了项目,则重命名后会发生错误 (或在另一个文件夹下载svn)..
原因在这个日食中解释Eclipse BUG 414688(OPEN) https://bugs.eclipse.org/bugs/show_bug.cgi?id=414688
问题的真正根源在于BUG 414795(已修复) https://bugs.eclipse.org/bugs/show_bug.cgi?id=414795
自第二个Bug于2013年12月修复,并于2014年1月验证, 我想Eclipse的下一个版本将解决这个错误。
答案 1 :(得分:0)
我在下载Eclipse Neon后遇到了同样的问题。我解决了这个问题:
同样在项目属性下---&gt; Project Facets,确保选择正确的Java版本和目标运行时(JDK),如果选中,则取消选中Utility Module复选框。