0 Replies Latest reply on Sep 9, 2012 11:59 AM by Ryan Li

    Fail to deploy application due to fail to start persistence unit?

    Ryan Li Newbie

      I would like to make a webapp to put it in my portfolio.

      as you can tell, I am a newbie.

      I don't know why or what make the persistence.xml block the deployment. but that's what jboss said it's persistence unit.

      Could someone help me out?

      below is my persistence.xml and the stack trace.

       

      <?xml version="1.0" encoding="UTF-8"?>

      <persistence 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"

                   version="2.0">

                      

          <persistence-unit name="h2oImages" transaction-type="JTA">

              <provider>org.hibernate.ejb.HibernatePersistence</provider>

              <jta-data-source>java:/OraclePool</jta-data-source>

              <class>com.h2o.h2oUser</class>

              <class>com.h2o.ImageBase</class>

              <properties>

                  <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>

                  <property name="hibernate.hbm2ddl.auto" value="create"/>   

                  <property name="hibernate.show_sql" value="true"/>       

              </properties>

          </persistence-unit>

      </persistence>

       

       

      23:28:11,363 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

      23:28:11,666 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

      23:28:11,775 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

      23:28:13,347 INFO  [org.xnio] XNIO Version 3.0.3.GA

      23:28:13,347 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)

      23:28:13,360 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

      23:28:13,371 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

      23:28:13,433 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

      23:28:13,447 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem

      23:28:13,525 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.

      23:28:13,562 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem

      23:28:13,577 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem

      23:28:13,633 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

      23:28:13,694 INFO  [org.jboss.as.connector] (MSC service thread 1-4) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

      23:28:13,525 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem

      23:28:13,762 INFO  [org.jboss.as.security] (MSC service thread 1-3) JBAS013100: Current PicketBox version=4.0.7.Final

      23:28:13,904 INFO  [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service

      23:28:14,056 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)

      23:28:14,251 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-4) JBoss Web Services - Stack CXF Server 4.0.2.GA

      23:28:14,304 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

      23:28:14,413 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-4) JBAS015400: Bound mail session [java:jboss/mail/Gmail]

      23:28:14,413 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-3) JBAS015400: Bound mail session [java:jboss/mail/Default]

      23:28:14,707 WARN  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-3) JBAS015005: Reliable deployment behaviour is not possible when auto-deployment of exploded content is enabled (i.e. deployment without use of ".dodeploy"' marker files). Configuration of auto-deployment of exploded content is not recommended in any situation where reliability is desired. Configuring the deployment scanner's auto-deploy-exploded setting to "false" is recommended.

      23:28:14,710 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-3) JBAS015012: Started FileSystemDeploymentService for directory C:\jboss-as-7.1.1.Final\standalone\deployments

      23:28:14,718 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting failed deployment h2o.war

      23:28:14,758 INFO  [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on localhost/127.0.0.1:4447

      23:28:14,779 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on /127.0.0.1:9999

      23:28:14,880 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080

      23:28:15,026 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:/OraclePool]

      23:28:15,028 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

      23:28:15,067 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "h2o.war"

      23:28:15,548 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011401: Read persistence.xml for h2oImages

      23:28:15,631 ERROR [org.jboss.web] (MSC service thread 1-1) JBAS018213: Failed to parse "/C:/jboss-as-7.1.1.Final/standalone/deployments/h2o.war/WEB-INF/faces-config.xml", managed beans defined in this file will not be available

      23:28:15,835 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016002: Processing weld deployment h2o.war

      23:28:15,845 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-1) JNDI bindings for session bean named UserEJB in deployment unit deployment "h2o.war" are as follows:

       

          java:global/h2o/UserEJB!com.h2o.UserEJB

          java:app/h2o/UserEJB!com.h2o.UserEJB

          java:module/UserEJB!com.h2o.UserEJB

          java:global/h2o/UserEJB

          java:app/h2o/UserEJB

          java:module/UserEJB

       

      23:28:16,222 INFO  [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016005: Starting Services for CDI deployment: h2o.war

      23:28:16,402 INFO  [org.jboss.weld.Version] (MSC service thread 1-1) WELD-000900 1.1.5 (AS71)

      23:28:16,580 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011402: Starting Persistence Unit Service 'h2o.war#h2oImages'

      23:28:16,845 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-1) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

      23:28:16,858 INFO  [org.hibernate.Version] (MSC service thread 1-1) HHH000412: Hibernate Core {4.0.1.Final}

      23:28:16,861 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-1) HHH000206: hibernate.properties not found

      23:28:16,863 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-1) HHH000021: Bytecode provider name : javassist

      23:28:16,919 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-1) HHH000204: Processing PersistenceUnitInfo [

          name: h2oImages

          ...]

      23:28:17,185 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.persistenceunit."h2o.war#h2oImages": org.jboss.msc.service.StartException in service jboss.persistenceunit."h2o.war#h2oImages": 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(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]

          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]

      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: h2oImages] 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.AnnotationException: mappedBy reference an unknown target entity property: com.h2o.ImageBase.h2oUser in com.h2o.h2oUser.images

          at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:666)

          at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:626)

          at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:66)

          at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1586)

          at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1359)

          at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1724)

          at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)

          at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)

          ... 9 more

       

      23:28:17,809 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990

      23:28:17,810 ERROR [org.jboss.as] (MSC service thread 1-1) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 6803ms - Started 185 of 289 services (26 services failed or missing dependencies, 76 services are passive or on-demand)

      23:28:18,013 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "h2o.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"h2o.war#h2oImages\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"h2o.war#h2oImages\": Failed to start service"}}

      23:28:18,050 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment h2o.war in 38ms

      23:28:18,052 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.persistenceunit."h2o.war#h2oImages": org.jboss.msc.service.StartException in service jboss.persistenceunit."h2o.war#h2oImages": Failed to start service

       

      23:28:18,054 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.\"h2o.war#h2oImages\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"h2o.war#h2oImages\": Failed to start service"}}}}