【发布时间】:2014-11-28 14:32:10
【问题描述】:
我尝试在 netbeans 8.0.1 上运行带有 hibernate、spring 和 jpa 的 Web 应用程序,但现在我在编译应用程序时遇到了这个异常......这是以下错误:
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_
这里是持久化单元,我的项目中只有一个
<?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>
我还没有解决这个错误,你能帮我解决这个问题吗?
【问题讨论】:
-
你介意给我们看一下 pom.xml 文件吗?
-
在eclipse中能用吗???
-
6年多过去了,这个问题有解决办法吗?
标签: jpa