1 Reply Latest reply on Nov 2, 2014 12:08 PM by Wolf-Dieter Fink

    jboss 7.1.1final Failed to start service

    reda yag Newbie

      hellow !

      i have a problem for deployment EJB project

      server jboss 7.1.1final

       

      14:48:13,773 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA

      14:48:14,279 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA

      14:48:14,411 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting

      14:48:19,773 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)

      14:48:19,851 INFO  [org.xnio] XNIO Version 3.0.3.GA

      14:48:19,872 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA

      14:48:19,972 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA

      14:48:20,118 INFO  [org.jboss.as.configadmin] JBAS016200: Activating ConfigAdmin Subsystem

      14:48:20,213 INFO  [org.jboss.as.clustering.infinispan] JBAS010280: Activating Infinispan subsystem.

      14:48:20,265 INFO  [org.jboss.as.webservices] JBAS015537: Activating WebServices Extension

      14:48:20,305 INFO  [org.jboss.as.security] JBAS013101: Activating Security Subsystem

      14:48:20,405 INFO  [org.jboss.as.osgi] JBAS011940: Activating OSGi Subsystem

      14:48:20,413 INFO  [org.jboss.as.naming] JBAS011800: Activating Naming Subsystem

      14:48:21,136 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

      14:48:24,247 INFO  [org.jboss.as.connector] (MSC service thread 1-1) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

      14:48:24,257 INFO  [org.jboss.as.security] (MSC service thread 1-1) JBAS013100: Current PicketBox version=4.0.7.Final

      14:48:24,330 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-2) JBAS015400: Bound mail session [java:jboss/mail/Default]

      14:48:24,360 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-2) JBoss Web Services - Stack CXF Server 4.0.2.GA

      14:48:24,435 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory C:\Program Files\jboss-as-7.1.1.Final\standalone\deployments

      14:48:24,455 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting failed deployment BanqueEJB.jar

      14:48:24,678 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Démarrage de Coyote HTTP/1.1 sur http-localhost-127.0.0.1-8080

      14:48:24,717 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found BanqueEJB.jar in deployment directory. To trigger deployment create a file called BanqueEJB.jar.dodeploy

      14:48:24,946 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on /127.0.0.1:9999

      14:48:24,992 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on localhost/127.0.0.1:4447

      14:48:25,313 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:/reda]

      14:48:25,416 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "BanqueEJB.jar"

      14:48:25,592 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011401: Read persistence.xml for UP_Banque

      14:48:25,991 INFO  [org.jboss.as.jpa] (MSC service thread 1-1) JBAS011402: Starting Persistence Unit Service 'BanqueEJB.jar#UP_Banque'

      14:48:26,352 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-1) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

      14:48:26,363 INFO  [org.hibernate.Version] (MSC service thread 1-1) HHH000412: Hibernate Core {4.0.1.Final}

      14:48:26,368 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-1) HHH000206: hibernate.properties not found

      14:48:26,373 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-1) HHH000021: Bytecode provider name : javassist

      14:48:26,416 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-1) HHH000204: Processing PersistenceUnitInfo [

          name: UP_Banque

          ...]

      14:48:26,719 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.persistenceunit."BanqueEJB.jar#UP_Banque": org.jboss.msc.service.StartException in service jboss.persistenceunit."BanqueEJB.jar#UP_Banque": 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_11]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_11]

          at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_11]

      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: UP_Banque] 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: @Temporal should only be set on a java.util.Date or java.util.Calendar property: metier.entities.Compte.dateCreation

          at org.hibernate.cfg.annotations.SimpleValueBinder.setType(SimpleValueBinder.java:148)

          at org.hibernate.cfg.annotations.PropertyBinder.makePropertyAndValue(PropertyBinder.java:186)

          at org.hibernate.cfg.annotations.PropertyBinder.makePropertyValueAndBind(PropertyBinder.java:201)

          at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:2011)

          at org.hibernate.cfg.AnnotationBinder.processIdPropertiesIfNotAlready(AnnotationBinder.java:765)

          at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:684)

          at org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3406)

          at org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3360)

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

          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

       

      14:48:26,755 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015951: Admin console listening on http://127.0.0.1:9990

      14:48:26,757 ERROR [org.jboss.as] (MSC service thread 1-2) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 13687ms - Started 154 of 232 services (1 services failed or missing dependencies, 76 services are passive or on-demand)

      14:48:26,764 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "BanqueEJB.jar" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"BanqueEJB.jar#UP_Banque\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"BanqueEJB.jar#UP_Banque\": Failed to start service"}}

      14:48:26,790 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment BanqueEJB.jar in 24ms

      14:48:27,317 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.persistenceunit."BanqueEJB.jar#UP_Banque": org.jboss.msc.service.StartException in service jboss.persistenceunit."BanqueEJB.jar#UP_Banque": Failed to start service

       

      14:48:27,322 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.\"BanqueEJB.jar#UP_Banque\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"BanqueEJB.jar#UP_Banque\": Failed to start service"}}}}

       

       

      My standalone.xml config :

       

      <datasources>

                      <datasource jta="false" jndi-name="java:/reda" pool-name="reda" enabled="true" use-ccm="false">

                          <connection-url>jdbc:mysql://localhost:3306/reda</connection-url>

                          <driver-class>com.mysql.jdbc.Driver</driver-class>

                          <driver>mysql</driver>

                          <security>

                              <user-name>root</user-name>

                          </security>

                          <validation>

                              <validate-on-match>false</validate-on-match>

                              <background-validation>false</background-validation>

                          </validation>

                          <statement>

                              <share-prepared-statements>false</share-prepared-statements>

                          </statement>

                      </datasource>

       

      persistence.xml :

       

      <?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="UP_Banque" transaction-type="JTA">

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

       

          <properties> 

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

          </properties>

        </persistence-unit>

       

      Compte class :

       

      package metier.entities;

       

      import java.io.Serializable;

      import java.sql.Date;

       

      import javax.persistence.Column;

      import javax.persistence.Entity;

      import javax.persistence.GeneratedValue;

      import javax.persistence.GenerationType;

      import javax.persistence.Id;

      import javax.persistence.Table;

      import javax.persistence.Temporal;

      import javax.persistence.TemporalType;

       

      @Entity

      @Table(name="COMPTES")

      public class Compte implements Serializable {

        

       

          @Id

          @GeneratedValue(strategy=GenerationType.IDENTITY)

          @Column(name="CODE")

          private Long code;

          @Column(name="SOLDE")

          private double solde;

          @Temporal(TemporalType.TIMESTAMP)

          private Date dateCreation;

        

          private boolean active;

        

          public Long getCode() {

              return code;

          }

          public void setCode(Long code) {

              this.code = code;

          }

       

          public double getSolde() {

              return solde;

          }

          public void setSolde(double solde) {

              this.solde = solde;

          }

          public Date getDateCreation() {

              return dateCreation;

          }

        

          public void setDateCreation(Date dateCreation) {

              this.dateCreation = dateCreation;

          }

          public boolean isActive() {

              return active;

          }

          public void setActive(boolean active) {

              this.active = active;

          }

        

          public Compte(double solde, Date dateCreation, boolean active) {

           

              this.solde = solde;

              this.dateCreation = dateCreation;

              this.active = active;

          }

          public Compte() {

       

          }

       

      }

       

      </persistence>