Hibernate Jboss服务无法启动:服务Jboss.persistenceunit

Hibernate Jboss服务无法启动:服务Jboss.persistenceunit,hibernate,maven,jboss,persistence.xml,Hibernate,Maven,Jboss,Persistence.xml,由于某种原因,我无法再部署我的项目了 我收到以下错误消息: 23:03:58,847 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA 23:03:59,219 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA 23:03:59,276 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" startin

由于某种原因,我无法再部署我的项目了

我收到以下错误消息:

    23:03:58,847 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA
23:03:59,219 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
23:03:59,276 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
23:04:00,736 INFO  [org.xnio] XNIO Version 3.0.3.GA
23:04:00,736 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
23:04:00,745 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
23:04:00,751 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
23:04:00,798 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
23:04:00,803 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
23:04:00,808 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
23:04:00,813 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
23:04:00,819 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
23:04:00,828 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
23:04:00,878 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
23:04:00,892 INFO  [org.jboss.as.naming] (MSC service thread 1-5) JBAS011802: Starting Naming Service
23:04:00,911 INFO  [org.jboss.as.security] (MSC service thread 1-6) JBAS013100: Current PicketBox version=4.0.7.Final
23:04:00,933 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-5) JBAS015400: Bound mail session [java:jboss/mail/Default]
23:04:00,971 INFO  [org.jboss.as.connector] (MSC service thread 1-5) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
23:04:01,095 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
23:04:01,352 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-2) JBoss Web Services - Stack CXF Server 4.0.2.GA
23:04:01,562 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
23:04:01,641 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Started FileSystemDeploymentService for directory C:\Users\Wolf\jboss-as-7.1.1.Final\standalone\deployments
23:04:01,644 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting failed deployment h2console.war
23:04:01,650 WARN  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015002: Deployment of 'h2console' requested, but the deployment is not present
23:04:01,682 INFO  [org.jboss.as.remoting] (MSC service thread 1-7) JBAS017100: Listening on localhost/127.0.0.1:4447
23:04:01,684 INFO  [org.jboss.as.remoting] (MSC service thread 1-8) JBAS017100: Listening on /127.0.0.1:9999
23:04:01,684 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
23:04:01,815 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "myprojectname.war"
23:04:01,815 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "h2console.war"
23:04:02,413 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011401: Read persistence.xml for primary
23:04:02,468 INFO  [org.jboss.web] (MSC service thread 1-8) JBAS018210: Registering web context: /h2console
23:04:02,545 INFO  [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016002: Processing weld deployment myprojectname.war
23:04:02,663 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016005: Starting Services for CDI deployment: myprojectname.war
23:04:02,686 INFO  [org.jboss.weld.Version] (MSC service thread 1-3) WELD-000900 1.1.5 (AS71)
23:04:02,705 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [jboss/datasources/myprojectnameDS]
23:04:02,706 INFO  [org.jboss.as.jpa] (MSC service thread 1-6) JBAS011402: Starting Persistence Unit Service 'myprojectname.war#primary'
23:04:02,791 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-6) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
23:04:02,797 INFO  [org.hibernate.Version] (MSC service thread 1-6) HHH000412: Hibernate Core {4.0.1.Final}
23:04:02,800 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-6) HHH000206: hibernate.properties not found
23:04:02,801 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-6) HHH000021: Bytecode provider name : javassist
23:04:02,821 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-6) HHH000204: Processing PersistenceUnitInfo [
    name: primary
    ...]
23:04:03,040 INFO  [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-6) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
23:04:03,259 INFO  [org.hibernate.dialect.Dialect] (MSC service thread 1-6) HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
23:04:03,264 WARN  [org.hibernate.dialect.H2Dialect] (MSC service thread 1-6) HHH000431: Unable to determine H2 database version, certain features may not work
23:04:03,268 INFO  [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (MSC service thread 1-6) HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4
23:04:03,275 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC service thread 1-6) HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
23:04:03,281 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-6) HHH000397: Using ASTQueryTranslatorFactory
23:04:03,311 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-6) Hibernate Validator 4.2.0.Final
23:04:03,322 INFO  [org.hibernate.validator.xml.ValidationXmlParser] (MSC service thread 1-6) META-INF/validation.xml found. Parsing XML based configuration.
23:04:03,520 INFO  [org.hibernate.validator.xml.ValidationXmlParser] (MSC service thread 1-6) Using org.hibernate.validator.HibernateValidator as validation provider.
23:04:03,520 INFO  [org.hibernate.validator.xml.ValidationXmlParser] (MSC service thread 1-6) Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as message interpolator.
23:04:03,521 INFO  [org.hibernate.validator.xml.ValidationXmlParser] (MSC service thread 1-6) Using org.hibernate.validator.engine.resolver.DefaultTraversableResolver as traversable resolver.
23:04:03,522 INFO  [org.hibernate.validator.xml.ValidationXmlParser] (MSC service thread 1-6) Using org.hibernate.validator.engine.ConstraintValidatorFactoryImpl as constraint factory.
23:04:04,104 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.persistenceunit."myprojectname.war#primary": org.jboss.msc.service.StartException in service jboss.persistenceunit."myprojectname.war#primary": Failed to start service
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_17]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_17]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_17]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: primary] Unable to build EntityManagerFactory
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    ... 3 more
Caused by: org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags
    at org.hibernate.loader.BasicLoader.postInstantiate(BasicLoader.java:93)
    at org.hibernate.loader.entity.EntityLoader.<init>(EntityLoader.java:118)
    at org.hibernate.loader.entity.EntityLoader.<init>(EntityLoader.java:70)
    at org.hibernate.loader.entity.EntityLoader.<init>(EntityLoader.java:53)
    at org.hibernate.loader.entity.BatchingEntityLoader.createBatchingEntityLoader(BatchingEntityLoader.java:131)
    at org.hibernate.persister.entity.AbstractEntityPersister.createEntityLoader(AbstractEntityPersister.java:2323)
    at org.hibernate.persister.entity.AbstractEntityPersister.createEntityLoader(AbstractEntityPersister.java:2346)
    at org.hibernate.persister.entity.AbstractEntityPersister.createLoaders(AbstractEntityPersister.java:3612)
    at org.hibernate.persister.entity.AbstractEntityPersister.postInstantiate(AbstractEntityPersister.java:3598)
    at org.hibernate.persister.entity.SingleTableEntityPersister.postInstantiate(SingleTableEntityPersister.java:1013)
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:422)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
    at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
    at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
    ... 9 more

23:04:04,122 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://onetwoseven.0.0.1:9990
23:04:04,125 ERROR [org.jboss.as] (MSC service thread 1-1) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 5681ms - Started 211 of 311 services (21 services failed or missing dependencies, 78 services are passive or on-demand)
23:04:04,326 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "myprojectname.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"myprojectname.war#primary\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"myprojectname.war#primary\": Failed to start service"}}
23:04:04,329 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015871: Deploy of deployment "h2console.war" was rolled back with no failure message
23:04:04,389 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010409: Unbound data source [jboss/datasources/myprojectnameDS]
23:04:04,654 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment h2console.war in 325ms
23:04:04,801 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment myprojectname.war in 472ms
23:04:04,804 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.persistenceunit."myprojectname.war#primary": org.jboss.msc.service.StartException in service jboss.persistenceunit."myprojectname.war#primary": Failed to start service

23:04:04,811 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS014654: Composite operation was rolled back
23:04:04,818 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"myprojectname.war#primary\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"myprojectname.war#primary\": Failed to start service"}}}}
23:03:58847信息[org.jboss.modules]jboss模块版本1.1.1.GA
23:03:59219信息[org.jboss.msc]jboss msc版本1.0.2.GA
23:03:59276信息[org.jboss.as]JBAS015899:jboss-as 7.1.1.Final“Brontes”开始
23:04:00736信息[org.xnio]xnio版本3.0.3.GA
23:04:00736信息[org.jboss.as.server]JBAS015888:使用套接字绑定创建http管理服务(管理http)
23:04:00745信息[org.xnio.nio]xnio-nio实现版本3.0.3.GA
23:04:00751信息[org.jboss.remoting]jboss远程版本3.2.3.GA
23:04:00798信息[org.jboss.as.logging]JBAS011502:删除引导日志处理程序
23:04:00803信息[org.jboss.as.configadmin](服务器服务线程池--26)JBAS016200:激活configadmin子系统
23:04:00808信息[org.jboss.as.clustering.infinispan](服务器服务线程池--31)JBAS010280:激活infinispan子系统。
23:04:00813信息[org.jboss.as.osgi](服务器服务线程池--39)JBAS011940:激活osgi子系统
23:04:00819信息[org.jboss.as.security](服务器服务线程池--44)JBAS013101:激活安全子系统
23:04:00828信息[org.jboss.as.naming](服务器服务线程池--38)JBAS011800:激活命名子系统
23:04:00878信息[org.jboss.as.webservices](服务器服务线程池--48)JBAS015537:激活webservices扩展
23:04:00892信息[org.jboss.as.naming](MSC服务线程1-5)JBAS011802:启动命名服务
23:04:00911信息[org.jboss.as.security](MSC服务线程1-6)JBAS013100:当前PicketBox版本=4.0.7.Final
23:04:00933信息[org.jboss.as.mail.extension](MSC服务线程1-5)JBAS015400:绑定邮件会话[java:jboss/mail/Default]
23:04:00971信息[org.jboss.as.connector](MSC服务线程1-5)JBAS010408:启动JCA子系统(jboss IronJacamar 1.0.9.Final)
23:04:01095信息[org.jboss.as.connector.subsystem.datasources](ServerService线程池--27)JBAS010403:部署符合JDBC的驱动程序类org.h2.driver(版本1.3)
23:04:01352信息[org.jboss.ws.common.management.AbstractServerConfig](MSC服务线程1-2)jboss Web服务-Stack CXF服务器4.0.2.GA
23:04:01562信息[org.apache.coyote.http11.Http11Protocol](MSC服务线程1-3)在HTTP-localhost-127.0.0.1-8080上启动coyote HTTP/1.1
23:04:01641信息[org.jboss.as.server.deployment.scanner](MSC服务线程1-4)JBAS015012:已启动目录C:\Users\Wolf\jboss-as-7.1.1.Final\standalone\deployments的FileSystemDeploymentService
23:04:01644信息[org.jboss.as.server.deployment.scanner](DeploymentScanner线程-1)JBAS015014:重新尝试部署失败h2console.war
23:04:01650警告[org.jboss.as.server.deployment.scanner](DeploymentScanner线程-1)JBAS015002:已请求部署“h2console”,但部署不存在
23:04:01682信息[org.jboss.as.remoting](MSC服务线程1-7)JBAS017100:在本地主机上侦听/127.0.0.1:4447
23:04:01684信息[org.jboss.as.remoting](MSC服务线程1-8)JBAS017100:listing on/127.0.0.1:9999
23:04:01684信息[org.jboss.as.connector.subsystem.datasources](MSC服务线程1-1)JBAS010400:绑定数据源[java:jboss/datasources/ExampleDS]
23:04:01815信息[org.jboss.as.server.deployment](MSC服务线程1-8)JBAS015876:开始部署“myprojectname.war”
23:04:01815信息[org.jboss.as.server.deployment](MSC服务线程1-1)JBAS015876:开始部署“h2console.war”
23:04:02413信息[org.jboss.as.jpa](MSC服务线程1-3)JBAS011401401:读取主线程的persistence.xml
23:04:02468 INFO[org.jboss.web](MSC服务线程1-8)JBAS018210:注册web上下文:/h2控制台
23:04:02545信息[org.jboss.weld.deployer](MSC服务线程1-4)JBAS016002:处理焊接部署myprojectname.war
23:04:02663信息[org.jboss.weld.deployer](MSC服务线程1-3)JBAS016005:为CDI部署启动服务:myprojectname.war
23:04:02686信息[org.jboss.weld.Version](MSC维修螺纹1-3)weld-000900 1.1.5(AS71)
23:04:02705信息[org.jboss.as.connector.subsystem.datasources](MSC服务线程1-1)JBAS010400:绑定数据源[jboss/datasources/myprojectnameDS]
23:04:02706 INFO[org.jboss.as.jpa](MSC服务线程1-6)JBAS011402:启动持久化单元服务“myprojectname.war#primary”
23:04:02791信息[org.hibernate.annotations.common.Version](MSC服务线程1-6)HCANN000001:hibernate Commons注释{4.0.1.Final}
23:04:02797信息[org.hibernate.Version](MSC服务线程1-6)HH000412:hibernate核心{4.0.1.Final}
23:04:02800信息[org.hibernate.cfg.Environment](MSC服务线程1-6)HH000206:hibernate.properties未找到
23:04:02801信息[org.hibernate.cfg.Environment](MSC服务线程1-6)HH000021:字节码提供程序名称:javassist
23:04:02821信息[org.hibernate.ejb.ejb3配置](MSC服务线程1-6)HH000204:正在处理PersistenceUnitInfo[
姓名:小学
...]
23:04:03040信息[org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator](MSC服务线程1-6)HH000130:实例化显式连接提供程序:org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
23:04:03259信息[org.hibernate.dialogue.dialogue](MSC服务线程1-6)HH000400:使用方言:org.hibernate.dialogue.h2dialogue
23:04:03264警告[org.hibernate.dialogue.h2dialogue](MSC服务线程1-6)HH000431:无法确定H2数据库版本,某些功能可能无法工作
23:04:03268信息[org.hibernate.engine.jdbc.internal.LobCreatorBuilder](MSC服务线程1-6)HHH000423:禁用上下文LOB创建,因为jdbc驱动程序报告的jdbc版本[3]小于4
23:04:03275信息[org.hibernate.engine.transaction.internal.TransactionFactoryIni]
<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0"    xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="
        http://java.sun.com/xml/ns/persistence
        http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">    <persistence-unit name="primary">
      <!-- If you are running in a production environment, add a managed 
         data source, the example data source is just for development and testing! -->
      <jta-data-source>java:jboss/datasources/myprojectnameDS</jta-data-source>
      <properties>
         <!-- Properties for Hibernate -->
         <property name="hibernate.hbm2ddl.auto" value="create-drop" />
         <property name="hibernate.show_sql" value="false" />
      </properties>    </persistence-unit> </persistence>
org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags