实体类的娱乐 [英] Recreation of entity classes

查看:95
本文介绍了实体类的娱乐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在netbeans 8.0.1上运行带有hibernate,spring和jpa的Web应用程序,但是现在我在编译应用程序时遇到了这个异常……这是以下错误:

I try to run a web application with hibernate, spring and jpa on netbeans 8.0.1, but now I'm stuck on this exception when compiling app...Here's the error below:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-    compile) on project SMSXxxxx: Compilation failure: Compilation failure:
error: Problem with Filer: Attempt to recreate a file for type  com.equitel.smsmanager.entities.TextMessageContent_
error: Problem with Filer: Attempt to recreate a file for type com.smsmanager.entities.SmsUser_

这是持久性单元,我的项目中只有一个

Here is the persistence unit, I have only one in my project

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence"            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
 <persistence-unit name="SMSManagerPU" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/jboss/datasources/SMSManagerDS</jta-data-source>
<class>com.smsmanager.entities.Approval</class>
<class>com.smsmanager.entities.Changelog</class>
<class>com.smsmanager.entities.Contacts</class>
<class>com.smsmanager.entities.Dispatches</class>
<class>com.smsmanager.entities.MessageSchedule</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
  <property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
</properties>
</persistence-unit>
</persistence>

我没有解决此错误,您能帮我解决此问题吗?

I have not managed to fix this error , could you help me fix this?

推荐答案

由于某些原因,在pom.xml中有一个依赖项,在我看来是导致问题的原因.查找并删除它:

For some reasons, there is a dependency in pom.xml that in my case caused the problem. Look for it and delete it:

    <dependency>
        <groupId>unknown.binary</groupId>
        <artifactId>hibernate-jpamodelgen-4.3.1.Final</artifactId>
        <version>SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>

这可能是Netbeans中的错误. https://netbeans.org/bugzilla/show_bug.cgi?id=183779

This could be a bug in Netbeans. https://netbeans.org/bugzilla/show_bug.cgi?id=183779

这篇关于实体类的娱乐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆