Hello tout le monde,

Lorsque j'essaye de faire fonctionner Hibernate 3 sur un Tomcat 5 sous Netbeans 4.1 avec Mysql 4.1 j'obtiens ceci : (en utilisant le pool de connexion d'hibernate)
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
 
:41:39,031  INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:mysql://127.0.0.1:3306/hibernate
11:41:42,546  INFO Environment:479 - Hibernate 3.1
11:41:42,546  INFO Environment:509 - hibernate.properties not found
11:41:42,546  WARN Environment:516 - could not copy system properties, system properties will be ignored
11:41:42,562  INFO Environment:525 - using CGLIB reflection optimizer
11:41:42,562  INFO Environment:555 - using JDK 1.4 java.sql.Timestamp handling
11:41:42,828  INFO Configuration:1286 - configuring from resource: /hibernate.cfg.xml
11:41:42,828  INFO Configuration:1263 - Configuration resource: /hibernate.cfg.xml
11:41:42,968  INFO Configuration:468 - Reading mappings from resource: metierRandonnee/Event.hbm.xml
11:41:43,109  INFO HbmBinder:265 - Mapping class: metierRandonnee.Event -> EVENTS
11:41:43,171  INFO Configuration:1397 - Configured SessionFactory: null
11:41:43,171  INFO Configuration:1022 - processing extends queue
11:41:43,171  INFO Configuration:1026 - processing collection mappings
11:41:43,171  INFO Configuration:1035 - processing association property references
11:41:43,171  INFO Configuration:1057 - processing foreign key constraints
11:41:43,312  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
11:41:43,312  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 8
11:41:43,312  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
11:41:43,312  INFO DriverManagerConnectionProvider:80 - using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://127.0.0.1:3306/hibernate
11:41:43,312  INFO DriverManagerConnectionProvider:86 - connection properties: {user=root, password=****}
11:41:43,515  WARN SettingsFactory:103 - Could not obtain connection metadata
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: 
 
** BEGIN NESTED EXCEPTION ** 
 
java.net.SocketException
MESSAGE: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)
 
STACKTRACE:
 
java.net.SocketException: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)
...
Pourtant j'ai modifié mon fichier catalina.policy de la manière suivante:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
 
 grant codeBase "jar:file:${catalina.home}/common/lib/-" {
	permission java.net.SocketPermission "*","connect,resolve,read,write";
};
grant codeBase "jar:file:/E:/developpement/netbeans/Rando/lib/-" {
	permission java.net.SocketPermission "*","connect,resolve,read,write";
};
Avec
${catalina.home}/common/lib/
contenant mon driver jdbc pour mysql : mysql-connector-java-3.1.7-bin.jar


E:/developpement/netbeans/Rando/lib/
contenant les 11 librairies Hibernate de base

Comme vous pouvez le voir dans les logs tout est correctement configuré, c'est la connection à la base qui ne marche pas car je n'ai apparement pas les droits, donc ma question naïve est la suivante :
Comment disposer des droits pour me connecter à ma base avec hibernate?

Merci