无法通过SQL Server连接在JPA项目上生成实体

时间:2018-06-20 17:08:37

标签: jpa-2.1

当我尝试在eclipse上生成实体表格时,我看到以下错误。我尝试了多个Java版本,因为9和10也尝试了不同版本的jdbc jar,但从未解决。

以下是日食日志:

!MESSAGE错误生成实体 !堆栈0 java.lang.NoSuchMethodError:org.apache.log4j.PatternLayout。(Ljava / lang / String;)V     在org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:109)     在org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85)     在org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:150)     在org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:208)     在org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:728)     在org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:240)     在org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:534)     在org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:144)     在org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateClass(PackageGenerator.java:303)     在org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateInternal(PackageGenerator.java:132)     在org.eclipse.jpt.jpa.gen.internal.PackageGenerator.doGenerate(PackageGenerator.java:106)     在org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generate(PackageGenerator.java:82)     在org.eclipse.jpt.jpa.ui.internal.wizards.gen.GenerateEntitiesFromSchemaWizard $ GenerateEntitiesJob.runInWorkspace(GenerateEntitiesFromSchemaWizard.java:285)     在org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)     在org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

1 个答案:

答案 0 :(得分:0)

看了很多解决方案之后。我试图从机器上删除eclipse,并重新下载了eclipse版本。这解决了问题