2014-02-10 139 views
1

我使用@Entity對一個小類進行了測試,該類有4個變量,並且所有變量都是通過hibernate構建的,但是當我添加超過20個變量的另一個類時,休眠只是這個錯誤:添加@Entity時出現休眠錯誤

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 

完全錯誤:http://pastebin.com/wrCU0u91

+0

你的新課堂中是否有用@Id標註的字段? – klor

+0

請將您的代碼添加到問題中。 – helderdarocha

回答

5

每個@Entity必須有一個@Id場。你可能沒有在你的新課堂上。

+0

是的,你是正確的,buttt我發現了另一個問題,我有2個表類是由persistence.xml中的hibernate創建的,一個是已經創建的,另一個是新的,有一種方法可以使「不存在創造「?因爲如果它已經存在,請返回另一個大錯誤...但是ID是其中一個問題! – user3284660

+0

@ user3284660您必須爲此設置:hibernate.hbm2ddl.auto屬性。 – Ioan