J'ai comme qui dirais un problème ... Disons que j'ai une requête qui plante la base, ou plutot qui la bloque !

Dans un test JUnit, je crée dans un premier temps mes enregistrement en base, je fais mon test et après je souhaite supprimer les enregistrements précédemment créés. Quand je suis l'execution en debug, tout se passe bien, il arrive aux requetes de suppression, il les déroule et quand vient le executeUpdate() de la dernière requete, plus rien ...

Voilà les logs où ca bloque :

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
 [2007-02-06 10:22:19,484] DEBUG [org.hibernate.impl.SessionImpl] - SessionImpl.java:802 - executeUpdate: delete from Ass where AssNumeroCir = :ass_id
 [2007-02-06 10:22:19,484] DEBUG [org.hibernate.engine.QueryParameters] - QueryParameters.java:220 - named parameters: {ass_id=19001001001}
 [2007-02-06 10:22:19,562] DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] - QueryTranslatorImpl.java:207 - parse() - HQL: delete from fr.gouv.finances.sp.cir.preliq.data.objetmetier.Ass where AssNumeroCir = :ass_id
 [2007-02-06 10:22:19,593] DEBUG [org.hibernate.hql.AST] - QueryTranslatorImpl.java:223 - --- HQL AST ---
 \-[DELETE] 'delete'
    +-[FROM] 'implied-from-so-i-can-use-the-fromClause-rule-during-analysis-phase'
    |  \-[DOT] '.'
    |     +-[DOT] '.'
    |     |  +-[DOT] '.'
    |     |  |  +-[DOT] '.'
    |     |  |  |  +-[DOT] '.'
    |     |  |  |  |  +-[DOT] '.'
    |     |  |  |  |  |  +-[DOT] '.'
    |     |  |  |  |  |  |  +-[DOT] '.'
    |     |  |  |  |  |  |  |  +-[IDENT] 'fr'
    |     |  |  |  |  |  |  |  \-[IDENT] 'gouv'
    |     |  |  |  |  |  |  \-[IDENT] 'finances'
    |     |  |  |  |  |  \-[IDENT] 'sp'
    |     |  |  |  |  \-[IDENT] 'cir'
    |     |  |  |  \-[IDENT] 'preliq'
    |     |  |  \-[IDENT] 'data'
    |     |  \-[IDENT] 'objetmetier'
    |     \-[IDENT] 'Ass'
    \-[WHERE] 'where'
       \-[EQ] '='
          +-[IDENT] 'AssNumeroCir'
          \-[COLON] ':'
             \-[IDENT] 'ass_id'
 
 [2007-02-06 10:22:19,593] DEBUG [org.hibernate.hql.ast.ErrorCounter] - ErrorCounter.java:72 - throwQueryException() : no errors
 [2007-02-06 10:22:19,687] DEBUG [org.hibernate.hql.ast.FromElement] - FromElement.java:79 - FromClause{level=1} :  fr.gouv.finances.sp.cir.preliq.data.objetmetier.Ass (no alias) -> ass0_
 [2007-02-06 10:22:19,687] DEBUG [org.hibernate.hql.ast.FromReferenceNode] - FromReferenceNode.java:48 - Resolved :  AssNumeroCir -> ass_numero_cir
 [2007-02-06 10:22:19,812] DEBUG [org.hibernate.hql.AST] - QueryTranslatorImpl.java:193 - --- SQL AST ---
 \-[DELETE] QueryNode: 'delete'  querySpaces (ass)
    +-[FROM] FromClause: 'implied-from-so-i-can-use-the-fromClause-rule-during-analysis-phase' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[], fromElementByTableAlias=[ass0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
    |  \-[FROM_FRAGMENT] FromElement: 'ass' FromElement{explicit,not a collection join,classAlias=null,role=null,tableName=ass,tableAlias=ass0_,colums={,className=fr.gouv.finances.sp.cir.preliq.data.objetmetier.Ass}}
    \-[WHERE] SqlNode: 'where'
       \-[EQ] SqlNode: '='
          +-[SQL_TOKEN] IdentNode: 'ass_numero_cir' {originalText=AssNumeroCir}
          \-[NAMED_PARAM] SqlNode: '?'
 
 [2007-02-06 10:22:19,812] DEBUG [org.hibernate.hql.ast.ErrorCounter] - ErrorCounter.java:72 - throwQueryException() : no errors
 [2007-02-06 10:22:19,843] DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] - QueryTranslatorImpl.java:177 - HQL: delete from fr.gouv.finances.sp.cir.preliq.data.objetmetier.Ass where AssNumeroCir = :ass_id
 [2007-02-06 10:22:19,843] DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] - QueryTranslatorImpl.java:178 - SQL: delete from ass where ass_numero_cir=?
 [2007-02-06 10:22:19,843] DEBUG [org.hibernate.hql.ast.ErrorCounter] - ErrorCounter.java:72 - throwQueryException() : no errors
 [2007-02-06 10:22:19,843] DEBUG [org.hibernate.jdbc.AbstractBatcher] - AbstractBatcher.java:276 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
 [2007-02-06 10:22:19,843] DEBUG [org.hibernate.jdbc.AbstractBatcher] - AbstractBatcher.java:408 - opening JDBC connection
 [2007-02-06 10:22:19,843] DEBUG [org.hibernate.connection.DriverManagerConnectionProvider] - DriverManagerConnectionProvider.java:93 - total checked-out connections: 0
 [2007-02-06 10:22:19,843] DEBUG [org.hibernate.connection.DriverManagerConnectionProvider] - DriverManagerConnectionProvider.java:99 - using pooled JDBC connection, pool size: 0
 [2007-02-06 10:22:19,843] DEBUG [org.hibernate.SQL] - AbstractBatcher.java:310 - delete from ass where ass_numero_cir=?
 [2007-02-06 10:22:19,843] DEBUG [org.hibernate.jdbc.AbstractBatcher] - AbstractBatcher.java:364 - preparing statement
 [2007-02-06 10:22:19,843] DEBUG [org.hibernate.hql.ast.UpdateStatementExecutor] - UpdateStatementExecutor.java:121 - bindNamedParameters() 19001001001 -> ass_id [1]
 [2007-02-06 10:22:19,843] DEBUG [org.hibernate.type.LongType] - NullableType.java:59 - binding '19001001001' to parameter: 1
et l'appel de la fameuse requete :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
		hqlQuery = "delete from Ass where "+ Ass.PROP_ASS_NUMERO_CIR +" = :ass_id";
		assDAO.getSession().createQuery(hqlQuery)
			.setLong("ass_id", ass_id)
			.executeUpdate();
Si vous avez besoin de plus d'infos hésitez pas à demander, parce que là je vois pas comment plancher sur le problème ... (ben ouais, la base est bloquée après l'execution et je dois aller voir la cellule BDD pour débloquer, donc je peux pas trop debugger ... )

Est-ce que vous pensez que ca pourrait être lié à la base Sybase ASE ?