添加@Entity时发生Hibernate错误 [英] Hibernate error when add @Entity

查看:100
本文介绍了添加@Entity时发生Hibernate错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用@Entity做了一个小类的测试,这个类有4个变量,所有的变量都是通过hibernate构建的,但是当我添加超过20个变量的另一个类时,hibernate只返回这个错误:

  23:34:58,100 INFO [org.jboss.as.connector.deployers.jdbc](MSC service thread 1-7) JBAS010418:使用driver-name = Projeto01.war_org.postgresql.Driver_9_0 
23:34:58,144停止驱动程序服务INFO [服务器服务线程池-236] JBAS011410:停止持久单元(服务'Projeto01.war#cartorio'
23:34:58,175 INFO [org.jboss.as.server.deployment](MSC服务线程1-5)JBAS015877:停止部署Projeto01.war(运行时名称:Projeto01.war)78ms
23:34:58,176 INFO [org.jboss.as.server.deployment](MSC服务线程1-5)JBAS015876:开始部署Projeto01.war(运行时名称:Projeto01.war)
23:34:58,708信息[org.jboss.as.jpa](MSC服务线程1-5)JBAS 011401:读取cartorio的persistence.xml
23:34:58,748信息[org.jboss.as.jpa](服务器服务线程池 - 236)JBAS011409:启动持久性单元(第1阶段的2)Service'Projeto01。 war#cartorio'
23:34:58,748信息[org.hibernate.jpa.internal.util.LogHelper](ServerService线程池 - 236)HHH000204:处理PersistenceUnitInfo [
名称:cartorio
...]
23:34:58,875信息[org.jboss.as.connector.deployers.jdbc](MSC服务线程1-2)JBAS010404:部署不符合JDBC规范的驱动程序类org.postgresql。驱动程序(版本9.0)
23:34:58,876 WARN [org.jboss.weld.deployer](MSC服务线程1-2)JBAS016012:部署部署Projeto01.war包含CDI注释,但没有bean归档文件找到。 (没有beans.xml也没有类定义了注释的bean)
23:34:58,878 INFO [org.jboss.as.connector.deployers.jdbc](MSC服务线程1-8)JBAS010417:带驱动程序的启动驱动程序服务-name = Projeto01.war_org.postgresql.Driver_9_0
23:34:58,879信息[org.jboss.as.jpa](服务器服务线程池-236)JBAS011409:启动持久性单元(2阶段2)服务' Projeto01.war#cartorio'
23:34:58,883信息[org.hibernate.dialect.Dialect](ServerService线程池 - 236)HHH000400:使用方言:org.hibernate.dialect.PostgreSQLDialect
23 :34:58,885错误[org.jboss.msc.service.fail](ServerService线程池 - 236)MSC000001:无法启动服务jboss.persistenceunit。Projeto01.war#cartorio:org.jboss.msc.service。 StartException在服务jboss.persistenceunit。Projeto01.war#cartorio:javax.persistence.PersistenceException:[PersistenceUnit:cartorio]无法在org.jboss.as.jpa.service.Per构建Hibernate SessionFactory
sistenceUnitServiceImpl $ 1 $ 1.run(PersistenceUnitServiceImpl.java:172)[wildfly-jpa-8.0.0.CR1.jar:8.0.0.CR1]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl $ 1 $ 1。运行(PersistenceUnitServiceImpl.java:117)[wildfly-jpa-8.0.0.CR1.jar:8.0.0.CR1]
at java.security.AccessController.doPrivileged(Native Method)[rt.jar:1.7。 0_51]
在org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:463)
在org.jboss.as.jpa.service.PersistenceUnitServiceImpl $ 1.run(PersistenceUnitServiceImpl.java:182 )[wildfly-jpa-8.0.0.CR1.jar:8.0.0.CR1]
在java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[rt.jar:1.7.0_51]
在java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知源代码)[rt.jar:1.7.0_51]
在java.lang.Thread.run(未知源代码)[rt.jar:1.7.0_51 ]
在org.jboss.threads.JBossThread.run(JBossThread.java:122)
导致:javax.persistence.Persist enceException:[PersistenceUnit:cartorio]无法在org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException中创建Hibernate SessionFactory
(EntityManagerFactoryBuilderImpl.java:1225)[hibernate-entitymanager-4.3.0.Final.jar: 4.3.0.Final]
在org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.access $ 600(EntityManagerFactoryBuilderImpl.java:119)[hibernate-entitymanager-4.3.0.Final.jar:4.3.0.Final ]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl $ 4.perform(EntityManagerFactoryBuilderImpl.java:853)[hibernate-entitymanager-4.3.0.Final.jar:4.3.0.Final]
在org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl $ 4.perform(EntityManagerFactoryBuilderImpl.java:843)[hibernate-entitymanager-4.3.0.Final.jar:4.3.0.Final]
org.hibernate。 boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:399)[hibernate-core-4.3.0.Final。 jar:4.3.0.Final]
在org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842)[hibernate-entitymanager-4.3.0.Final.jar:4.3.0。最后]
在org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)[jipijapa-hibernate4-3-1.0.0.Final.jar:]
at org。 jboss.as.jpa.service.PersistenceUnitServiceImpl $ 1 $ 1.run(PersistenceUnitServiceImpl.java:154)[wildfly-jpa-8.0.0.CR1.jar:8.0.0.CR1]
... 8 more
导致:org.hibernate.AnnotationException:没有为实体指定标识符:cartorio.com.br.indicar_PessoaFISICA
at org.hibernate.cfg.InheritanceState.determineDefaultAccessType(InheritanceState.java:277)[hibernate-core- 4.3.0.Final.jar:4.3.0.Final]
在org.hibernate.cfg.InheritanceState.getElementsToProcess(InheritanceState.java:224)[hibernate-core-4.3.0.Final.jar:4.3。 0.Final]
在org.hibernate.cfg.AnnotationBinder.bindClass (AnnotationBinder.java:732)[hibernate-core-4.3.0.Final.jar:4.3.0.Final]
at org.hibernate.cfg.Configuration $ MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3762)[ hibernate-core-4.3.0.Final.jar:4.3.0.Final]
在org.hibernate.cfg.Configuration $ MetadataSourceQueue.processMetadata(Configuration.java:3716)[hibernate-core-4.3.0。 Final.jar:4.3.0.Final]
在org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1410)[hibernate-core-4.3.0.Final.jar:4.3.0.Final]
在org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1844)[hibernate-core-4.3.0.Final.jar:4.3.0.Final]
at org.hibernate.jpa .boot.internal.EntityManagerFactoryBuilderImpl $ 4.perform(EntityManagerFactoryBuilderImpl.java:850)[hibernate-entitymanager-4.3.0.Final.jar:4.3.0.Final]
... 13 more

23:34:58,889错误[org.jboss.as.controller.management-operation](DeploymentScanner-threads - 1)JBAS0146 13:操作(完全替换部署)失败 - 地址:([]) - 失败描述:{JBAS014671:失败的服务=> {jboss.persistenceunit.\Projeto01.war#cartorio \=> org.jboss.msc.service.StartException in service jboss.persistenceunit.\Projeto01.war#cartorio \:javax.persistence.PersistenceException:[PersistenceUnit:cartorio]无法构建Hibernate SessionFactory
导致:javax.persistence.PersistenceException:[PersistenceUnit:cartorio]无法构建Hibernate SessionFactory
导致:org.hibernate.AnnotationException:没有为实体指定标识符:cartorio.com.br.indicar_PessoaFISICA}}
23:34:58,892 WARN [org.jboss.as.jpa](DeploymentScanner线程 - 1)JBAS011411:意外的问题收集统计信息:java.lang.IllegalStateException:JBAS011477:持久性单元'Projeto01.war#cartorio'不可用
at org.jboss.as.jpa.management.EntityManagerFactoryLookup.entityManagerFactory(EntityManagerFactoryLookup.java:44)
at org.jboss.as.jpa.hibernate4.management.HibernateEntityStatistics.getDynamicChildrenNames(HibernateEntityStatistics.java:145 )
at org.jboss.as.jpa.management.DynamicManagementStatisticsResource.getChildren(DynamicManagementStatisticsResource.java:204)
at org.jboss.as.controller.registry.AbstractModelResource $ DelegateResource.getChildren(AbstractModelResource.java:254)[wildfly -controller-8.0.0.CR1.jar:8.0.0.CR1]
... jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default -host./Projeto01,service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component。org.apache。 taglibs.standard.tag.el.fmt.ParamTag.CREATE(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt。 ParamTag.START]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.ParamTag.START(unavailable)dependents:[service jboss.d Projeto01.war.deploymentCompleteService,服务jboss.undertow.deployment.default-server.default-host./Projeto01,服务jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.ParseDateTag.CREATE(unavailable)dependents:[service jboss.deployment.unit Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.ParseDateTag.START]
service jboss.deployment.unit。Projeto01.war.component。org .apache.taglibs.standard.tag.el.fmt.ParseDateTag.START(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default -host./Projeto01,service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component。org。 apache.taglibs.standard.tag.el.fmt.ParseNumberTag.CREATE(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el。 fmt.ParseNumberTag.START]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.ParseNumberTag.START(unavailable)dependents: [service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host./Projeto01,service jboss.undertow.deployment.default-server.default-host./ Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag.CREATE(unavailable)dependents:[service jboss .deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag.START]
service jboss.deployment.unit。Projeto01.war。组件。org.apache.taglibs.sta ndard.tag.el.fmt.RequestEncodingTag.START(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host./Projeto01 ,service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag .el.fmt.SetBundleTag.CREATE(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.SetBundleTag.START]
服务jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.SetBundleTag.START(不可用)依赖项:[service jboss.deployment.unit Projeto01.war.deploymentCompleteService,服务jboss.undertow.deployment.default-server.default-host./Projeto01]
服务jboss.deployment.unit。Projeto01.war.component。org.apache .taglibs.stan dard.tag.el.fmt.SetLocaleTag.CREATE(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag .START]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag.START(unavailable)dependents:[service jboss。 deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host./Projeto01,service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag.CREATE(unavailable)dependents:[service jboss.deployment.unit Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag.START]
service jboss.deployment.unit。Projeto01.war.component。org .apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag。 START(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host./Projeto01,service jboss.undertow.deployment.default-server .default-host。/ Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag.CREATE(unavailable )依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag.START]
service jboss.deployment.unit。 Projeto01.war。组件。 .undertow.deployment.default-server.default-host。/ Projeto01]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.sql。 DateParamTag.CREATE(un可用)依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.sql.DateParamTag.START]
service jboss.deployment.unit Projeto01.war。组件。 jboss.undertow.deployment.default-server.default-host./Projeto01,service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01 .war.component。org.apache.taglibs.standard.tag.el.sql.ParamTag.CREATE(unavailable)dependents:[service jboss.deployment.unit。Projeto01.war.component。org.apache .taglibs.standard.tag.el.sql.ParamTag.START]
服务jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.sql。 ParamTag.START(不可用)依赖项:[service jboss.deployment。单元。Projeto01.war.deploymentCompleteService,服务jboss.undertow.deployment.default-server.default-host./Projeto01,服务jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.sql.QueryTag.CREATE(unavailable)dependents:[service jboss.deployment.unit。 Projeto01.war.component。org.apache.taglibs.standard.tag.el.sql.QueryTag.START]
服务jboss.deployment.unit。Projeto01.war.component。org.apache .taglibs.standard.tag.el.sql.QueryTag.START(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host ./Projeto01]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.sql.SetDataSourceTag.CREATE(unavailable)dependents:[service jboss .deployment.unit。Projeto0 1.war.component。org.apache.taglibs.standard.tag.el.sql.SetDataSourceTag.START]
服务jboss.deployment.unit。Projeto01.war.component。org.apache .taglibs.standard.tag.el.sql.SetDataSourceTag.START(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host ./Projeto01,service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs。 standard.tag.el.sql.TransactionTag.CREATE(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.sql.TransactionTag .START]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.sql.TransactionTag.START(unavailable)dependents:[service jboss。 deployment.unit。 Projeto01.war .deploymentComple teService,服务jboss.undertow.deployment.default-server.default-host./Projeto01,服务jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
服务jboss.deployment.unit Projeto01.war。组件。 org.apache.taglibs.standard.tag.el.sql.UpdateTag.START]
服务jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el .sql.UpdateTag.START(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host./Projeto01]
服务jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.xml.ExprTag.CREATE(unavailable)dependents:[service jboss.deployment.unit。Projeto01。战争 .component。org.apache.taglibs.standa rd.tag.el.xml.ExprTag.START]
服务jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.xml.ExprTag。 START(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host./Projeto01,service jboss.undertow.deployment.default-server .default-host ./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.xml.ParamTag.START(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host./Projeto01,service jboss.undertow.deployment.default-server.default- host./Projeto01.UndertowDeploymentInfoService]
服务jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.xml.ParseTag.CREATE(unavailable)dependents: [SER副jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.xml.ParseTag.START]
服务jboss.deployment.unit。Projeto01.war .component。org.apache.taglibs.standard.tag.el.xml.ParseTag.START(unavailable)dependents:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment .default-server.default-host。/ Projeto01,service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component 。org.apache.taglibs.standard.tag.el.xml.TransformTag.CREATE(unavailable)dependents:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard。 tag.el.xml.TransformTag.START]
服务jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.el.xml.TransformTag.START(不可用)家属:[service jboss.deployment.unit。Projeto01.war.de ploymentCompleteService,服务jboss.undertow.deployment.default-server.default-host./Projeto01,服务jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
服务jboss.deployment.unit Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.ForEachTag.START(unavailable)dependents:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host./Projeto01,service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01 .war.component。org.apache.taglibs.standard.tag.rt.core.ForTokensTag.CREATE(unavailable)dependents:[service jboss.deployment.unit。Projeto01.war.component。org.apache .taglibs.standard.tag.rt.core.ForTokensTag.START]
服务jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.c ore.ForTokensTag.START(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host./Projeto01,service jboss.undertow。 deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
服务jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.IfTag .CREATE(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.IfTag.START]
service jboss .deployment.unitProjeto01.war.component。org.apache.taglibs.standard.tag.rt.core.IfTag.START(unavailable)dependents:[service jboss.deployment.unit。Projeto01.war .deploymentCompleteService,服务jboss.undertow.deployment.default-server.default-host./Projeto01,服务jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
服务jboss .deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.ImportTag.CREATE(unavailable)dependents:[service jboss.deployment.unit。Projeto01.war .component。org.apache.taglibs.standard.tag.rt.core.ImportTag.START]
服务jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard .tags.rt.core.ImportTag.START(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host./Projeto01,服务jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
服务jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag。 rt.core.OutTag.CREATE(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.OutTag.START]
服务jboss.deployment.unit。Projeto01.war.component。org.apac he.taglibs.standard.tag.rt.core.OutTag.START(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default- host./Projeto01,service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs .standard.tag.rt.core.ParamTag.CREATE(unavailable)dependents:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.ParamTag .START]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.ParamTag.START(unavailable)dependents:[service jboss .deployment.unit。Projeto01.war.deploymentCompleteService,service jboss.undertow.deployment.default-server.default-host./Projeto01]
service jboss.deployment.unit。Projeto01.war.component。 org.apache.taglibs.standard.t ag.rt.core.RedirectTag.CREATE(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.RedirectTag.START ]
service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.RedirectTag.START(unavailable)dependents:[service jboss.deployment。单元。Projeto01.war.deploymentCompleteService,服务jboss.undertow.deployment.default-server.default-host./Projeto01,服务jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService]

服务jboss.deployment.unit。Projeto01.war.jndiDependencyService(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard。 tag.rt.sql.ParamTag.START,service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.IfTag.START,service jboss.deployment 。单元 Projeto01.war .component。org.apache.taglib s.standard.tag.rt.core.OutTag.START,service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.common.xml.IfTag.START, JBAS014799:...和另外77个]
服务jboss.persistenceunit。Projeto01.war#cartorio(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.component。org.apache .taglibs.standard.tag.rt.sql.ParamTag.START,service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.IfTag.START ,service jboss.deployment.unit。Projeto01.war.component。org.apache.taglibs.standard.tag.rt.core.OutTag.START,service jboss.deployment.unit。Projeto01.war.component 。org.apache.taglibs.standard.tag.common.xml.IfTag.START,JBAS014799:...和另外78个]
服务jboss.undertow.deployment.default-server.default-host./ Projeto01(不可用)依赖项:[service jboss.deployment.unit。Projeto01.war.deploymentCompleteService]
服务jboss.undertow.deployment.d efault-server.default-host./Projeto01.UndertowDeploymentInfoService(unavailable)dependents:[service jboss.undertow.deployment.default-server.default-host./Projeto01]
JBAS014777:无法启动的服务:service jboss .persistenceunit。Projeto01.war#cartorio
service jboss.persistenceunit。Projeto01.war#cartorio:org.jboss.msc.service.StartException in service jboss.persistenceunit。Projeto01.war#cartorio: javax.persistence.PersistenceException:无法构建Hibernate SessionFactory
< href =http://pastebin.com/wrCU0u91 =nofollow> http://pastebin.com/wrCU0u91

解决方案 @Entity 必须有一个 @Id 字段。你可能没有在你的新课堂上。


i made a test with a small class using @Entity, the class had 4 vars, and all the vars was build by hibernate, but when i add another class with more than 20 vars, the hibernate just return this error:

    23:34:58,100 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) JBAS010418: Stopped Driver service with driver-name = Projeto01.war_org.postgresql.Driver_9_0
    23:34:58,144 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 236) JBAS011410: Stopping Persistence Unit (phase 1 of 2) Service 'Projeto01.war#cartorio'
    23:34:58,175 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment Projeto01.war (runtime-name: Projeto01.war) in 78ms
    23:34:58,176 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "Projeto01.war" (runtime-name: "Projeto01.war")
    23:34:58,708 INFO  [org.jboss.as.jpa] (MSC service thread 1-5) JBAS011401: Read persistence.xml for cartorio
    23:34:58,748 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 236) JBAS011409: Starting Persistence Unit (phase 1 of 2) Service 'Projeto01.war#cartorio'
    23:34:58,748 INFO  [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 236) HHH000204: Processing PersistenceUnitInfo [
        name: cartorio
        ...]
    23:34:58,875 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.0)
    23:34:58,876 WARN  [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016012: Deployment deployment "Projeto01.war" contains CDI annotations but no bean archive was not found. (No beans.xml nor class with bean defining annotations)
    23:34:58,878 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) JBAS010417: Started Driver service with driver-name = Projeto01.war_org.postgresql.Driver_9_0
    23:34:58,879 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 236) JBAS011409: Starting Persistence Unit (phase 2 of 2) Service 'Projeto01.war#cartorio'
    23:34:58,883 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 236) HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
    23:34:58,885 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 236) MSC000001: Failed to start service jboss.persistenceunit."Projeto01.war#cartorio": org.jboss.msc.service.StartException in service jboss.persistenceunit."Projeto01.war#cartorio": javax.persistence.PersistenceException: [PersistenceUnit: cartorio] Unable to build Hibernate SessionFactory
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:172) [wildfly-jpa-8.0.0.CR1.jar:8.0.0.CR1]
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) [wildfly-jpa-8.0.0.CR1.jar:8.0.0.CR1]
        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_51]
        at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:463)
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182) [wildfly-jpa-8.0.0.CR1.jar:8.0.0.CR1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_51]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_51]
        at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_51]
        at org.jboss.threads.JBossThread.run(JBossThread.java:122)
    Caused by: javax.persistence.PersistenceException: [PersistenceUnit: cartorio] Unable to build Hibernate SessionFactory
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1225) [hibernate-entitymanager-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.access$600(EntityManagerFactoryBuilderImpl.java:119) [hibernate-entitymanager-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:853) [hibernate-entitymanager-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) [hibernate-entitymanager-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:399) [hibernate-core-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) [hibernate-entitymanager-4.3.0.Final.jar:4.3.0.Final]
        at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) [jipijapa-hibernate4-3-1.0.0.Final.jar:]
        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154) [wildfly-jpa-8.0.0.CR1.jar:8.0.0.CR1]
        ... 8 more
    Caused by: org.hibernate.AnnotationException: No identifier specified for entity: cartorio.com.br.indicar_PessoaFISICA
        at org.hibernate.cfg.InheritanceState.determineDefaultAccessType(InheritanceState.java:277) [hibernate-core-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.cfg.InheritanceState.getElementsToProcess(InheritanceState.java:224) [hibernate-core-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:732) [hibernate-core-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3762) [hibernate-core-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3716) [hibernate-core-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1410) [hibernate-core-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1844) [hibernate-core-4.3.0.Final.jar:4.3.0.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) [hibernate-entitymanager-4.3.0.Final.jar:4.3.0.Final]
        ... 13 more

    23:34:58,889 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014613: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"Projeto01.war#cartorio\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"Projeto01.war#cartorio\": javax.persistence.PersistenceException: [PersistenceUnit: cartorio] Unable to build Hibernate SessionFactory
        Caused by: javax.persistence.PersistenceException: [PersistenceUnit: cartorio] Unable to build Hibernate SessionFactory
        Caused by: org.hibernate.AnnotationException: No identifier specified for entity: cartorio.com.br.indicar_PessoaFISICA"}}
    23:34:58,892 WARN  [org.jboss.as.jpa] (DeploymentScanner-threads - 1) JBAS011411: Unexpected problem gathering statistics: java.lang.IllegalStateException: JBAS011477: Persistence unit 'Projeto01.war#cartorio' is not available
        at org.jboss.as.jpa.management.EntityManagerFactoryLookup.entityManagerFactory(EntityManagerFactoryLookup.java:44)
        at org.jboss.as.jpa.hibernate4.management.HibernateEntityStatistics.getDynamicChildrenNames(HibernateEntityStatistics.java:145)
        at org.jboss.as.jpa.management.DynamicManagementStatisticsResource.getChildren(DynamicManagementStatisticsResource.java:204)
        at org.jboss.as.controller.registry.AbstractModelResource$DelegateResource.getChildren(AbstractModelResource.java:254) [wildfly-controller-8.0.0.CR1.jar:8.0.0.CR1]
...jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.ParamTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.ParamTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.ParamTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.ParseDateTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.ParseDateTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.ParseDateTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.ParseNumberTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.ParseNumberTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.ParseNumberTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.SetBundleTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.SetBundleTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.SetBundleTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.DateParamTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.DateParamTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.DateParamTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.ParamTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.ParamTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.ParamTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.QueryTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.QueryTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.QueryTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.SetDataSourceTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.SetDataSourceTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.SetDataSourceTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.TransactionTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.TransactionTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.TransactionTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.UpdateTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.UpdateTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.sql.UpdateTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.xml.ExprTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.xml.ExprTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.xml.ExprTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.xml.ParamTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.xml.ParseTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.xml.ParseTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.xml.ParseTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.xml.TransformTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.xml.TransformTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.el.xml.TransformTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.ForEachTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.ForTokensTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.ForTokensTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.ForTokensTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.IfTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.IfTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.IfTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.ImportTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.ImportTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.ImportTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.OutTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.OutTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.OutTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.ParamTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.ParamTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.ParamTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.RedirectTag".CREATE (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.RedirectTag".START] 
          service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.RedirectTag".START (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService, service jboss.undertow.deployment.default-server.default-host./Projeto01, service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService] 

          service jboss.deployment.unit."Projeto01.war".jndiDependencyService (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.sql.ParamTag".START, service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.IfTag".START, service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.OutTag".START, service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.common.xml.IfTag".START, JBAS014799: ... and 77 more ] 
          service jboss.persistenceunit."Projeto01.war#cartorio" (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.sql.ParamTag".START, service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.IfTag".START, service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.rt.core.OutTag".START, service jboss.deployment.unit."Projeto01.war".component."org.apache.taglibs.standard.tag.common.xml.IfTag".START, JBAS014799: ... and 78 more ] 
          service jboss.undertow.deployment.default-server.default-host./Projeto01 (unavailable) dependents: [service jboss.deployment.unit."Projeto01.war".deploymentCompleteService] 
          service jboss.undertow.deployment.default-server.default-host./Projeto01.UndertowDeploymentInfoService (unavailable) dependents: [service jboss.undertow.deployment.default-server.default-host./Projeto01] 
    JBAS014777:   Services which failed to start:      service jboss.persistenceunit."Projeto01.war#cartorio"
          service jboss.persistenceunit."Projeto01.war#cartorio": org.jboss.msc.service.StartException in service jboss.persistenceunit."Projeto01.war#cartorio": javax.persistence.PersistenceException: [PersistenceUnit: cartorio] Unable to build Hibernate SessionFactory

full error: http://pastebin.com/wrCU0u91

解决方案

Each @Entity must have an @Id field. You probably don't have it in your new class.

这篇关于添加@Entity时发生Hibernate错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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