Bonjour,
J'essaye d'executer un petit programme hibernate, il permet de rajouter une ligne dans une table. J'ai pas d'erreur d'execution, mais rien ne se passe dans ma BD !!!!!!
voila le log que Tomcat me retourne :
mon fichier de conf est le suivant :
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 INFO: Server startup in 11719 ms INFO - Hibernate 3.2.6 - org.hibernate.cfg.Environment INFO - hibernate.properties not found - org.hibernate.cfg.Environment INFO - Bytecode provider name : cglib - org.hibernate.cfg.Environment INFO - using JDK 1.4 java.sql.Timestamp handling - org.hibernate.cfg.Environment INFO - configuring from resource: /hibernate.cfg.xml - org.hibernate.cfg.Configuration INFO - Configuration resource: /hibernate.cfg.xml - org.hibernate.cfg.Configuration INFO - Reading mappings from resource : com/prototype/memberarea/mapping/Person.hbm.xml - org.hibernate.cfg.Configuration INFO - Mapping class: com.prototype.memberarea.mapping.Person -> person - org.hibernate.cfg.HbmBinder INFO - Configured SessionFactory: null - org.hibernate.cfg.Configuration INFO - Using Hibernate built-in connection pool (not for production use!) - org.hibernate.connection.DriverManagerConnectionProvider INFO - Hibernate connection pool size: 1 - org.hibernate.connection.DriverManagerConnectionProvider INFO - autocommit mode: false - org.hibernate.connection.DriverManagerConnectionProvider INFO - using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost/bdTest - org.hibernate.connection.DriverManagerConnectionProvider INFO - connection properties: {user=postgres, password=****} - org.hibernate.connection.DriverManagerConnectionProvider INFO - RDBMS: PostgreSQL, version: 8.2.6 - org.hibernate.cfg.SettingsFactory INFO - JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.3 JDBC3 with SSL (build 603) - org.hibernate.cfg.SettingsFactory INFO - Using dialect: org.hibernate.dialect.PostgreSQLDialect - org.hibernate.dialect.Dialect INFO - Using default transaction strategy (direct JDBC transactions) - org.hibernate.transaction.TransactionFactoryFactory INFO - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) - org.hibernate.transaction.TransactionManagerLookupFactory INFO - Automatic flush during beforeCompletion(): disabled - org.hibernate.cfg.SettingsFactory INFO - Automatic session close at end of transaction: disabled - org.hibernate.cfg.SettingsFactory INFO - JDBC batch size: 15 - org.hibernate.cfg.SettingsFactory INFO - JDBC batch updates for versioned data: disabled - org.hibernate.cfg.SettingsFactory INFO - Scrollable result sets: enabled - org.hibernate.cfg.SettingsFactory INFO - JDBC3 getGeneratedKeys(): disabled - org.hibernate.cfg.SettingsFactory INFO - Connection release mode: auto - org.hibernate.cfg.SettingsFactory INFO - Default batch fetch size: 1 - org.hibernate.cfg.SettingsFactory INFO - Generate SQL with comments: disabled - org.hibernate.cfg.SettingsFactory INFO - Order SQL updates by primary key: disabled - org.hibernate.cfg.SettingsFactory INFO - Order SQL inserts for batching: disabled - org.hibernate.cfg.SettingsFactory INFO - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory - org.hibernate.cfg.SettingsFactory INFO - Using ASTQueryTranslatorFactory - org.hibernate.hql.ast.ASTQueryTranslatorFactory INFO - Query language substitutions: {} - org.hibernate.cfg.SettingsFactory INFO - JPA-QL strict compliance: disabled - org.hibernate.cfg.SettingsFactory INFO - Second-level cache: enabled - org.hibernate.cfg.SettingsFactory INFO - Query cache: disabled - org.hibernate.cfg.SettingsFactory INFO - Cache provider: org.hibernate.cache.NoCacheProvider - org.hibernate.cfg.SettingsFactory INFO - Optimize cache for minimal puts: disabled - org.hibernate.cfg.SettingsFactory INFO - Structured second-level cache entries: disabled - org.hibernate.cfg.SettingsFactory INFO - Echoing all SQL to stdout - org.hibernate.cfg.SettingsFactory INFO - Statistics: disabled - org.hibernate.cfg.SettingsFactory INFO - Deleted entity synthetic identifier rollback: disabled - org.hibernate.cfg.SettingsFactory INFO - Default entity-mode: pojo - org.hibernate.cfg.SettingsFactory INFO - Named query checking : enabled - org.hibernate.cfg.SettingsFactory INFO - building session factory - org.hibernate.impl.SessionFactoryImpl INFO - Not binding factory to JNDI, no JNDI name configured - org.hibernate.impl.SessionFactoryObjectFactory INFO - Running hbm2ddl schema export - org.hibernate.tool.hbm2ddl.SchemaExport INFO - exporting generated schema to database - org.hibernate.tool.hbm2ddl.SchemaExport INFO - schema export complete - org.hibernate.tool.hbm2ddl.SchemaExport Hibernate: select nextval ('sequence_name') Hibernate: insert into person (firstname, lastname, address, phone, reference) values (?, ?, ?, ?, ?)
Merci pour votre aide
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 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">org.postgresql.Driver</property> <property name="hibernate.connection.password">ullink2008</property> <property name="hibernate.connection.url">jdbc:postgresql://localhost/bdTest</property> <property name="hibernate.connection.username">postgres</property> <property name="hibernate.connection.password"></property> <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property> <!-- Echo all executed SQL to stdout --> <property name="show_sql">true</property> <!-- Enable Hibernate's automatic session context management --> <property name="current_session_context_class">thread</property> <!-- JDBC connection pool (use the built-in) --> <property name="connection.pool_size">1</property> <!-- Disable the second-level cache --> <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property> <!-- Drop and re-create the database schema on startup --> <property name="hbm2ddl.auto">create</property> <mapping resource="com/prototype/memberarea/mapping/Person.hbm.xml"/> </session-factory> </hibernate-configuration>
Partager