IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JPA Java Discussion :

Tutorial de M. Sergé Tahé [à propos: JPA]


Sujet :

JPA Java

  1. #1
    Provisoirement toléré
    Inscrit en
    Juin 2006
    Messages
    220
    Détails du profil
    Informations forums :
    Inscription : Juin 2006
    Messages : 220
    Points : 79
    Points
    79
    Par défaut
    Je sais pas pourquoi pour une simple classe de Test

    Mon programme arrete presque une minute à la ligne:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
     
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("jpa");
    ==> j'utilise

    ==> mon persistence.XML


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
     
     
     <persistence-unit name="jpa" transaction-type="RESOURCE_LOCAL">
      <provider>org.hibernate.ejb.HibernatePersistence</provider>
      <properties>
       <property name="hibernate.archive.autodetection" value="class, hbm" />
       <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />
       <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/jpa" />
       <property name="hibernate.connection.username" value="root" />
       <property name="hibernate.connection.password" value="jpa" />
       <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
       <property name="hibernate.c3p0.min_size" value="5" />
       <property name="hibernate.c3p0.max_size" value="20" />
       <property name="hibernate.c3p0.timeout" value="300" />
       <property name="hibernate.c3p0.max_statements" value="50" />
       <property name="hibernate.c3p0.idle_test_period" value="3000" />
      </properties>
     </persistence-unit>

    violà merci

    Pour ceux qui aiment les log4j ,


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
     
     begin ...
    12:43:15,247  INFO Version:15 - Hibernate EntityManager 3.2.0.CR3
    12:43:15,263  INFO Version:15 - Hibernate Annotations 3.2.0.CR3
    12:43:15,279  INFO Environment:500 - Hibernate 3.2.0.cr5
    12:43:15,294  INFO Environment:533 - hibernate.properties not found
    12:43:15,294  INFO Environment:667 - Bytecode provider name : cglib
    12:43:15,294  INFO Environment:584 - using JDK 1.4 java.sql.Timestamp handling
    12:43:15,404 DEBUG Ejb3Configuration:194 - Look up for persistence unit: jpa
    12:43:15,404 DEBUG Ejb3Configuration:206 - Analyse of persistence.xml: file:/C:/DEVO_KML/personnes-entites/bin/META-INF/persistence.xml
    12:43:15,560 DEBUG PersistenceXmlLoader:115 - Persistent Unit name from persistence.xml: jpa
    12:43:15,560 DEBUG Ejb3Configuration:213 - PersistenceMetadata [
     name: jpa
     jtaDataSource: null
     nonJtaDataSource: null
     transactionType: RESOURCE_LOCAL
     provider: org.hibernate.ejb.HibernatePersistence
     classes[
     ]
     packages[
     ]
     mappingFiles[
     ]
     jarFiles[
     ]
     hbmfiles: 0
     properties[
      hibernate.c3p0.timeout: 300
      hibernate.connection.driver_class: com.mysql.jdbc.Driver
      hibernate.c3p0.max_statements: 50
      hibernate.c3p0.max_size: 20
      hibernate.dialect: org.hibernate.dialect.MySQL5InnoDBDialect
      hibernate.c3p0.idle_test_period: 3000
      hibernate.c3p0.min_size: 5
      hibernate.connection.username: jpa
      hibernate.hbm2ddl.auto: create
      hibernate.archive.autodetection: class, hbm
      hibernate.connection.url: jdbc:mysql://localhost:3306/jpa
      hibernate.connection.password: jpa
     ]]
    12:43:15,560 DEBUG Ejb3Configuration:522 - Detect class: true; detect hbm: true
    12:43:15,576 DEBUG JarVisitor:192 - Searching mapped entities in jar/par: file:/C:/DEVO_KML/personnes-entites/bin
    12:43:15,576 DEBUG JarVisitor:232 - Filtering: entites.Personne
    12:43:15,654 DEBUG JarVisitor:283 - Java element filter matched for entites.Personne
    12:43:15,669 DEBUG JarVisitor:232 - Filtering: tests.InitDB
    12:43:15,669 DEBUG JarVisitor:232 - Filtering: tests.Main
    12:43:15,669 DEBUG Ejb3Configuration:522 - Detect class: true; detect hbm: true
    12:43:15,669 DEBUG Ejb3Configuration:151 - Creating Factory: jpa
    12:43:15,732 DEBUG AnnotationConfiguration:235 - Execute first pass mapping processing
    12:43:15,810 DEBUG AnnotationConfiguration:435 - Process hbm files
    12:43:15,810 DEBUG AnnotationConfiguration:443 - Process annotated classes
    12:43:15,810  INFO AnnotationBinder:387 - Binding entity from annotated class: entites.Personne
    12:43:15,826 DEBUG Ejb3Column:161 - Binding column DTYPE unique false
    12:43:15,841 DEBUG EntityBinder:212 - Import with entity name=Personne
    12:43:15,857  INFO EntityBinder:340 - Bind entity entites.Personne on table jpa01_personne
    12:43:15,857 DEBUG AnnotationBinder:940 - Processing entites.Personne property annotation
    12:43:15,872 DEBUG AnnotationBinder:940 - Processing entites.Personne field annotation
    12:43:15,904 DEBUG AnnotationBinder:1032 - Processing annotations of entites.Personne.id
    12:43:15,904 DEBUG Ejb3Column:161 - Binding column ID unique false
    12:43:15,904 DEBUG AnnotationBinder:1153 - id is an id
    12:43:15,904 DEBUG SimpleValueBinder:220 - building SimpleValue for id
    12:43:15,904 DEBUG PropertyBinder:122 - Building property id
    12:43:15,919 DEBUG PropertyBinder:155 - Cascading id with null
    12:43:15,919 DEBUG AnnotationBinder:1186 - Bind @Id on id
    12:43:15,919 DEBUG AnnotationBinder:1032 - Processing annotations of entites.Personne.version
    12:43:15,919 DEBUG Ejb3Column:161 - Binding column VERSION unique false
    12:43:15,919 DEBUG AnnotationBinder:1203 - version is a version property
    12:43:15,919 DEBUG PropertyBinder:102 - binding property version with lazy=false
    12:43:15,919 DEBUG SimpleValueBinder:220 - building SimpleValue for version
    12:43:15,919 DEBUG PropertyBinder:122 - Building property version
    12:43:15,919 DEBUG PropertyBinder:155 - Cascading version with null
    12:43:15,919 DEBUG AnnotationBinder:1223 - Version name: version, unsavedValue: undefined
    12:43:15,919 DEBUG AnnotationBinder:1032 - Processing annotations of entites.Personne.nom
    12:43:15,919 DEBUG Ejb3Column:161 - Binding column NOM unique true
    12:43:15,919 DEBUG PropertyBinder:102 - binding property nom with lazy=false
    12:43:15,919 DEBUG SimpleValueBinder:220 - building SimpleValue for nom
    12:43:15,919 DEBUG PropertyBinder:122 - Building property nom
    12:43:15,919 DEBUG PropertyBinder:155 - Cascading nom with null
    12:43:15,919 DEBUG AnnotationBinder:1032 - Processing annotations of entites.Personne.prenom
    12:43:15,919 DEBUG Ejb3Column:161 - Binding column PRENOM unique false
    12:43:15,919 DEBUG PropertyBinder:102 - binding property prenom with lazy=false
    12:43:15,919 DEBUG SimpleValueBinder:220 - building SimpleValue for prenom
    12:43:15,919 DEBUG PropertyBinder:122 - Building property prenom
    12:43:15,919 DEBUG PropertyBinder:155 - Cascading prenom with null
    12:43:15,919 DEBUG AnnotationBinder:1032 - Processing annotations of entites.Personne.datenaissance
    12:43:15,919 DEBUG Ejb3Column:161 - Binding column DATENAISSANCE unique false
    12:43:15,935 DEBUG PropertyBinder:102 - binding property datenaissance with lazy=false
    12:43:15,935 DEBUG SimpleValueBinder:220 - building SimpleValue for datenaissance
    12:43:15,935 DEBUG PropertyBinder:122 - Building property datenaissance
    12:43:15,935 DEBUG PropertyBinder:155 - Cascading datenaissance with null
    12:43:15,935 DEBUG AnnotationBinder:1032 - Processing annotations of entites.Personne.marie
    12:43:15,935 DEBUG Ejb3Column:161 - Binding column MARIE unique false
    12:43:15,935 DEBUG PropertyBinder:102 - binding property marie with lazy=false
    12:43:15,935 DEBUG SimpleValueBinder:220 - building SimpleValue for marie
    12:43:15,935 DEBUG PropertyBinder:122 - Building property marie
    12:43:15,935 DEBUG PropertyBinder:155 - Cascading marie with null
    12:43:15,935 DEBUG AnnotationBinder:1032 - Processing annotations of entites.Personne.nbenfants
    12:43:15,935 DEBUG Ejb3Column:161 - Binding column NBENFANTS unique false
    12:43:15,935 DEBUG PropertyBinder:102 - binding property nbenfants with lazy=false
    12:43:15,935 DEBUG SimpleValueBinder:220 - building SimpleValue for nbenfants
    12:43:15,935 DEBUG PropertyBinder:122 - Building property nbenfants
    12:43:15,935 DEBUG PropertyBinder:155 - Cascading nbenfants with null
    12:43:15,935 DEBUG AnnotationConfiguration:329 - processing manytoone fk mappings
    12:43:15,951 DEBUG Configuration:1044 - processing extends queue
    12:43:15,951 DEBUG Configuration:1048 - processing collection mappings
    12:43:15,951 DEBUG Configuration:1059 - processing native query and ResultSetMapping mappings
    12:43:15,951 DEBUG Configuration:1067 - processing association property references
    12:43:15,951 DEBUG Configuration:1089 - processing foreign key constraints
    12:43:15,951 DEBUG ClassValidator:160 - ResourceBundle ValidatorMessages not found in thread context classloader
    12:43:15,951 DEBUG ClassValidator:170 - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
    12:43:15,982 DEBUG NamingHelper:30 - Not Ejb3Configuration to JNDI, no JNDI name configured
    12:43:15,982 DEBUG Configuration:1209 - Preparing to build session factory with filters : {}
    12:43:15,982 DEBUG AnnotationConfiguration:235 - Execute first pass mapping processing
    12:43:15,982 DEBUG AnnotationConfiguration:435 - Process hbm files
    12:43:15,982 DEBUG AnnotationConfiguration:443 - Process annotated classes
    12:43:15,982 DEBUG AnnotationConfiguration:329 - processing manytoone fk mappings
    12:43:15,982 DEBUG Configuration:1044 - processing extends queue
    12:43:15,982 DEBUG Configuration:1048 - processing collection mappings
    12:43:15,982 DEBUG Configuration:1059 - processing native query and ResultSetMapping mappings
    12:43:15,982 DEBUG Configuration:1067 - processing association property references
    12:43:15,982 DEBUG Configuration:1089 - processing foreign key constraints
    12:43:15,982 DEBUG ClassValidator:160 - ResourceBundle ValidatorMessages not found in thread context classloader
    12:43:15,982 DEBUG ClassValidator:170 - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
    12:43:16,076  INFO C3P0ConnectionProvider:50 - C3P0 using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/jpa
    12:43:16,076  INFO C3P0ConnectionProvider:51 - Connection properties: {user=jpa, password=****, autocommit=true, release_mode=auto}
    12:43:16,076  INFO C3P0ConnectionProvider:54 - autocommit mode: true
    12:43:46,076  WARN SettingsFactory:109 - Could not obtain connection metadata
    java.sql.SQLException: Connections could not be acquired from the underlying database!
     at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:104)
     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:236)
     at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:94)
     at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:35)
     at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
     at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)
     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1216)
     at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
     at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
     at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
     at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
     at tests.InitDB.main(InitDB.java:16)
    Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
     at com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResourcePool.java:970)
     at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:208)
     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:232)
     ... 10 more

    Si qlq'un comprend les : LOG4J

    la suite dess LOGs est :


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
     
     
    12:43:46,122  INFO Dialect:141 - Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
    12:43:46,138  INFO TransactionFactoryFactory:34 - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
    12:43:46,138  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
    12:43:46,138  INFO SettingsFactory:134 - Automatic flush during beforeCompletion(): disabled
    12:43:46,138  INFO SettingsFactory:138 - Automatic session close at end of transaction: disabled
    12:43:46,138  INFO SettingsFactory:153 - Scrollable result sets: disabled
    12:43:46,138 DEBUG SettingsFactory:157 - Wrap result sets: disabled
    12:43:46,138  INFO SettingsFactory:161 - JDBC3 getGeneratedKeys(): disabled
    12:43:46,138  INFO SettingsFactory:169 - Connection release mode: auto
    12:43:46,154  INFO SettingsFactory:193 - Maximum outer join fetch depth: 2
    12:43:46,154  INFO SettingsFactory:196 - Default batch fetch size: 1
    12:43:46,154  INFO SettingsFactory:200 - Generate SQL with comments: disabled
    12:43:46,154  INFO SettingsFactory:204 - Order SQL updates by primary key: disabled
    12:43:46,154  INFO SettingsFactory:369 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
    12:43:46,169  INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
    12:43:46,169  INFO SettingsFactory:212 - Query language substitutions: {}
    12:43:46,169  INFO SettingsFactory:217 - JPA-QL strict compliance: enabled
    12:43:46,169  INFO SettingsFactory:222 - Second-level cache: enabled
    12:43:46,169  INFO SettingsFactory:226 - Query cache: disabled
    12:43:46,169  INFO SettingsFactory:356 - Cache provider: org.hibernate.cache.NoCacheProvider
    12:43:46,169  INFO SettingsFactory:241 - Optimize cache for minimal puts: disabled
    12:43:46,185  INFO SettingsFactory:250 - Structured second-level cache entries: disabled
    12:43:46,185 DEBUG SQLExceptionConverterFactory:52 - Using dialect defined converter
    12:43:46,201  INFO SettingsFactory:277 - Statistics: disabled
    12:43:46,201  INFO SettingsFactory:281 - Deleted entity synthetic identifier rollback: disabled
    12:43:46,201  INFO SettingsFactory:296 - Default entity-mode: pojo
    12:43:46,310 DEBUG ClassValidator:160 - ResourceBundle ValidatorMessages not found in thread context classloader
    12:43:46,310 DEBUG ClassValidator:170 - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
    12:43:46,404  INFO SessionFactoryImpl:161 - building session factory
    12:43:46,560 DEBUG SessionFactoryImpl:173 - Session factory constructed with filter configurations : {}
    12:43:46,560 DEBUG SessionFactoryImpl:177 - instantiating session factory with properties: {java.vendor=Sun Microsystems Inc., sun.java.launcher=SUN_STANDARD, hibernate.connection.url=jdbc:mysql://localhost:3306/jpa, sun.management.compiler=HotSpot Client Compiler, hibernate.ejb.discard_pc_on_close=false, hibernate.transaction.flush_before_completion=false, os.name=Windows XP, sun.boot.class.path=C:\Program Files\Java\jre1.5.0_11\lib\rt.jar;C:\Program Files\Java\jre1.5.0_11\lib\i18n.jar;C:\Program Files\Java\jre1.5.0_11\lib\sunrsasign.jar;C:\Program Files\Java\jre1.5.0_11\lib\jsse.jar;C:\Program Files\Java\jre1.5.0_11\lib\jce.jar;C:\Program Files\Java\jre1.5.0_11\lib\charsets.jar;C:\Program Files\Java\jre1.5.0_11\classes, sun.desktop=windows, hibernate.c3p0.max_size=20, java.vm.specification.vendor=Sun Microsystems Inc., java.runtime.version=1.5.0_11-b03, hibernate.connection.autocommit=true, hibernate.c3p0.min_size=5, user.name=kamal, hibernate.connection.release_mode=auto, hibernate.c3p0.timeout=300, user.language=fr, sun.boot.library.path=C:\Program Files\Java\jre1.5.0_11\bin, java.version=1.5.0_11, user.timezone=GMT, sun.arch.data.model=32, java.endorsed.dirs=C:\Program Files\Java\jre1.5.0_11\lib\endorsed, sun.cpu.isalist=pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86, sun.jnu.encoding=Cp1252, file.encoding.pkg=sun.io, file.separator=\, java.specification.name=Java Platform API Specification, java.class.version=49.0, user.country=FR, java.home=C:\Program Files\Java\jre1.5.0_11, java.vm.info=mixed mode, sharing, os.version=5.1, hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory, hibernate.query.jpaql_strict_compliance=true, path.separator=;, java.vm.version=1.5.0_11-b03, hibernate.connection.password=jpa, user.variant=, java.awt.printerjob=sun.awt.windows.WPrinterJob, sun.io.unicode.encoding=UnicodeLittle, awt.toolkit=sun.awt.windows.WToolkit, hibernate.connection.username=jpa, user.home=C:\Documents and Settings\kamal, java.specification.vendor=Sun Microsystems Inc., hibernate.hbm2ddl.auto=create, java.library.path=C:\Program Files\Java\jre1.5.0_11\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\Appli\Jonas\bin\nt;C:\Appli\Ant\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Apache Software Foundation\apache-maven-2.0.8\bin;C:\Program Files\Java\jdk1.5.0_11\bin, java.vendor.url=http://java.sun.com/, hibernate.connection.driver_class=com.mysql.jdbc.Driver, java.vm.vendor=Sun Microsystems Inc., hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.archive.autodetection=class, hbm, java.class.path=C:\DEVO_KML\personnes-entites\bin;C:\DEVO_KML\personnes-entites\WebRoot\lib\antlr-2.7.6.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\asm.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\asm-attrs.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\c3p0-0.9.0.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\cglib-2.1.3.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\commons-collections-2.1.1.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\commons-logging-1.0.4.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\dom4j-1.6.1.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\ejb3-persistence.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\hibernate3.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\hibernate-annotations.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\hibernate-entitymanager.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\hibernate-tools.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\javassist.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\jboss-archive-browsing.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\jta.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\log4j-1.2.13.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\mysql-connector-java-5.0.5-bin.jar;C:\DEVO_KML\personnes-entites\WebRoot\lib\testng-5.5-jdk15.jar, hibernate.bytecode.use_reflection_optimizer=false, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.0, sun.cpu.endian=little, sun.os.patch.level=, java.io.tmpdir=C:\DOCUME~1\kamal\LOCALS~1\Temp\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, os.arch=x86, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.ext.dirs=C:\Program Files\Java\jre1.5.0_11\lib\ext, user.dir=C:\DEVO_KML\personnes-entites, hibernate.c3p0.idle_test_period=3000, line.separator=
    , java.vm.name=Java HotSpot(TM) Client VM, file.encoding=Cp1252, hibernate.use_identifier_rollback=false, java.specification.version=1.5, hibernate.c3p0.max_statements=50}
    12:43:46,841 DEBUG AbstractEntityPersister:2673 - Static SQL for entity: entites.Personne
    12:43:46,841 DEBUG AbstractEntityPersister:2678 -  Version select: select VERSION from jpa01_personne where ID =?
    12:43:46,841 DEBUG AbstractEntityPersister:2681 -  Snapshot select: select personne_.ID, personne_.VERSION as VERSION0_, personne_.NOM as NOM0_, personne_.PRENOM as PRENOM0_, personne_.DATENAISSANCE as DATENAIS5_0_, personne_.MARIE as MARIE0_, personne_.NBENFANTS as NBENFANTS0_ from jpa01_personne personne_ where personne_.ID=?
    12:43:46,841 DEBUG AbstractEntityPersister:2684 -  Insert 0: insert into jpa01_personne (VERSION, NOM, PRENOM, DATENAISSANCE, MARIE, NBENFANTS, ID) values (?, ?, ?, ?, ?, ?, ?)
    12:43:46,841 DEBUG AbstractEntityPersister:2685 -  Update 0: update jpa01_personne set VERSION=?, NOM=?, PRENOM=?, DATENAISSANCE=?, MARIE=?, NBENFANTS=? where ID=? and VERSION=?
    12:43:46,841 DEBUG AbstractEntityPersister:2686 -  Delete 0: delete from jpa01_personne where ID=? and VERSION=?
    12:43:46,857 DEBUG AbstractEntityPersister:2690 -  Identity insert: insert into jpa01_personne (VERSION, NOM, PRENOM, DATENAISSANCE, MARIE, NBENFANTS) values (?, ?, ?, ?, ?, ?)
    12:43:46,872 DEBUG EntityLoader:79 - Static select for entity entites.Personne: select personne0_.ID as ID0_0_, personne0_.VERSION as VERSION0_0_, personne0_.NOM as NOM0_0_, personne0_.PRENOM as PRENOM0_0_, personne0_.DATENAISSANCE as DATENAIS5_0_0_, personne0_.MARIE as MARIE0_0_, personne0_.NBENFANTS as NBENFANTS0_0_ from jpa01_personne personne0_ where personne0_.ID=?
    12:43:46,872 DEBUG EntityLoader:79 - Static select for entity entites.Personne: select personne0_.ID as ID0_0_, personne0_.VERSION as VERSION0_0_, personne0_.NOM as NOM0_0_, personne0_.PRENOM as PRENOM0_0_, personne0_.DATENAISSANCE as DATENAIS5_0_0_, personne0_.MARIE as MARIE0_0_, personne0_.NBENFANTS as NBENFANTS0_0_ from jpa01_personne personne0_ where personne0_.ID=?
    12:43:46,872 DEBUG EntityLoader:79 - Static select for entity entites.Personne: select personne0_.ID as ID0_0_, personne0_.VERSION as VERSION0_0_, personne0_.NOM as NOM0_0_, personne0_.PRENOM as PRENOM0_0_, personne0_.DATENAISSANCE as DATENAIS5_0_0_, personne0_.MARIE as MARIE0_0_, personne0_.NBENFANTS as NBENFANTS0_0_ from jpa01_personne personne0_ where personne0_.ID=? for update
    12:43:46,872 DEBUG EntityLoader:79 - Static select for entity entites.Personne: select personne0_.ID as ID0_0_, personne0_.VERSION as VERSION0_0_, personne0_.NOM as NOM0_0_, personne0_.PRENOM as PRENOM0_0_, personne0_.DATENAISSANCE as DATENAIS5_0_0_, personne0_.MARIE as MARIE0_0_, personne0_.NBENFANTS as NBENFANTS0_0_ from jpa01_personne personne0_ where personne0_.ID=? for update
    12:43:46,872 DEBUG EntityLoader:79 - Static select for entity entites.Personne: select personne0_.ID as ID0_0_, personne0_.VERSION as VERSION0_0_, personne0_.NOM as NOM0_0_, personne0_.PRENOM as PRENOM0_0_, personne0_.DATENAISSANCE as DATENAIS5_0_0_, personne0_.MARIE as MARIE0_0_, personne0_.NBENFANTS as NBENFANTS0_0_ from jpa01_personne personne0_ where personne0_.ID=? for update
    12:43:46,888 DEBUG EntityLoader:34 - Static select for action ACTION_MERGE on entity entites.Personne: select personne0_.ID as ID0_0_, personne0_.VERSION as VERSION0_0_, personne0_.NOM as NOM0_0_, personne0_.PRENOM as PRENOM0_0_, personne0_.DATENAISSANCE as DATENAIS5_0_0_, personne0_.MARIE as MARIE0_0_, personne0_.NBENFANTS as NBENFANTS0_0_ from jpa01_personne personne0_ where personne0_.ID=?
    12:43:46,888 DEBUG EntityLoader:34 - Static select for action ACTION_REFRESH on entity entites.Personne: select personne0_.ID as ID0_0_, personne0_.VERSION as VERSION0_0_, personne0_.NOM as NOM0_0_, personne0_.PRENOM as PRENOM0_0_, personne0_.DATENAISSANCE as DATENAIS5_0_0_, personne0_.MARIE as MARIE0_0_, personne0_.NBENFANTS as NBENFANTS0_0_ from jpa01_personne personne0_ where personne0_.ID=?
    12:43:46,888 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
    12:43:46,888 DEBUG SessionFactoryObjectFactory:76 - registered: 444ed49d1a4427a4011a4427a7480000 (unnamed)
    12:43:46,888  INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
    12:43:46,888 DEBUG SessionFactoryImpl:308 - instantiated session factory
    12:43:46,904 DEBUG AnnotationConfiguration:235 - Execute first pass mapping processing
    12:43:46,904 DEBUG AnnotationConfiguration:435 - Process hbm files
    12:43:46,904 DEBUG AnnotationConfiguration:443 - Process annotated classes
    12:43:46,904 DEBUG AnnotationConfiguration:329 - processing manytoone fk mappings
    12:43:46,904 DEBUG Configuration:1044 - processing extends queue
    12:43:46,904 DEBUG Configuration:1048 - processing collection mappings
    12:43:46,904 DEBUG Configuration:1059 - processing native query and ResultSetMapping mappings
    12:43:46,904 DEBUG Configuration:1067 - processing association property references
    12:43:46,904 DEBUG Configuration:1089 - processing foreign key constraints
    12:43:46,904 DEBUG ClassValidator:160 - ResourceBundle ValidatorMessages not found in thread context classloader
    12:43:46,904 DEBUG ClassValidator:170 - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
    12:43:46,904 DEBUG AnnotationConfiguration:235 - Execute first pass mapping processing
    12:43:46,904 DEBUG AnnotationConfiguration:435 - Process hbm files
    12:43:46,904 DEBUG AnnotationConfiguration:443 - Process annotated classes
    12:43:46,904 DEBUG AnnotationConfiguration:329 - processing manytoone fk mappings
    12:43:46,904 DEBUG Configuration:1044 - processing extends queue
    12:43:46,904 DEBUG Configuration:1048 - processing collection mappings
    12:43:46,904 DEBUG Configuration:1059 - processing native query and ResultSetMapping mappings
    12:43:46,904 DEBUG Configuration:1067 - processing association property references
    12:43:46,904 DEBUG Configuration:1089 - processing foreign key constraints
    12:43:46,904 DEBUG ClassValidator:160 - ResourceBundle ValidatorMessages not found in thread context classloader
    12:43:46,904 DEBUG ClassValidator:170 - ResourceBundle ValidatorMessages not found in Validator classloader. Delegate to org.hibernate.validator.resources.DefaultValidatorMessages
    12:43:46,919  INFO SchemaExport:154 - Running hbm2ddl schema export
    12:43:46,919 DEBUG SchemaExport:170 - import file not found: /import.sql
    12:43:46,919  INFO SchemaExport:179 - exporting generated schema to database
    12:44:16,997 ERROR SchemaExport:202 - schema export unsuccessful
    java.sql.SQLException: Connections could not be acquired from the underlying database!
     at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:104)
     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:236)
     at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:94)
     at org.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:35)
     at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:27)
     at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:180)
     at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133)
     at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:311)
     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
     at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
     at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
     at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
     at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
     at tests.InitDB.main(InitDB.java:16)
    Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
     at com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResourcePool.java:970)
     at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:208)
     at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:232)
     ... 12 more
    12:44:16,997 DEBUG SessionFactoryImpl:390 - Checking 0 named HQL queries
    12:44:16,997 DEBUG SessionFactoryImpl:410 - Checking 0 named SQL queries
    12:44:17,060 DEBUG SessionImpl:220 - opened session at timestamp: 12123242570
    12:44:17,060 DEBUG SessionImpl:273 - closing session
    12:44:17,060 DEBUG ConnectionManager:369 - connection already null in cleanup : no action
    12:44:17,060  INFO SessionFactoryImpl:767 - closing
    terminé ...

    c'est tout

  2. #2
    Membre habitué
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    156
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 156
    Points : 191
    Points
    191
    Par défaut
    Il semblerait que ce soit un problème au niveau du pool de connexion qui n'arrive pas à se connecter à ta BD.
    Essaye déjà sans passer par un pool, vire les lignes :
    hibernate.c3p0....

  3. #3
    Provisoirement toléré
    Inscrit en
    Juin 2006
    Messages
    220
    Détails du profil
    Informations forums :
    Inscription : Juin 2006
    Messages : 220
    Points : 79
    Points
    79
    Par défaut
    ça marche mnt,
    avec le pool de connexion et tout
    le probleme c que ttes les modifs apporté à persistence.xma ont
    eu aucun impact!! parceque ce dernier n pas été signalé ds le
    classpath..
    voilà

  4. #4
    Membre du Club
    Inscrit en
    Mars 2005
    Messages
    100
    Détails du profil
    Informations forums :
    Inscription : Mars 2005
    Messages : 100
    Points : 60
    Points
    60
    Par défaut
    c'etait quoi l'erreur exactement? ca m'interesse
    merci

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Cours de serge Tahé sur C# 2008 & MVC
    Par insane_80 dans le forum Général Dotnet
    Réponses: 3
    Dernier message: 13/02/2009, 13h54
  2. tutoriel servlets/jsp/Eclipse/tomcat de serge tahé
    Par dprevots dans le forum Tomcat et TomEE
    Réponses: 11
    Dernier message: 03/04/2006, 21h33

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo