Bonjour à tous,
J'essaye de paramétrer Hibernate pour Oracle 10 et j'ai l'erreur suivante :
La requête exécutée est la suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 org.hibernate.exception.SQLGrammarException: could not load an entity: [hibernate.objects.AlUtilisateur#test]
Il semble que le problème soit lié au gtc. après le "from" de la clause select, j'ai exécuté la même requête (avec Quantum DB) sans le nom de la db et ça passe bien.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2select alutilisat0_.uti_nom as uti1_4_0_, alutilisat0_.uti_auto as uti2_4_0_, alutilisat0_.uti_mdp as uti3_4_0_, alutilisat0_.uti_modif as uti4_4_0_, alutilisat0_.uti_valide as uti5_4_0_, alutilisat0_.uti_nouveau as uti6_4_0_ from gtc.OPS$ORACIM.al_utilisateur alutilisat0_ where alutilisat0_.uti_nom='test'
Comment faire pour que la base de données ne soit pas rajoutée à la requête ?
Mon hibernate.cfg.xml :
Merci pour vos réponses
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 <?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 name="GTC"> <property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property> <property name="hibernate.connection.url">jdbc:oracle:thin:@adresse_ip:1521:GTC</property> <property name="hibernate.connection.username">OPS$ORACIM</property> <property name="hibernate.connection.password">ORAORA</property> <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property> <property name="hibernate.default_schema">OPS$ORACIM</property> <property name="hibernate.show_sql">true</property> <mapping resource="hibernate/objects/AlRegion.hbm.xml" /> <mapping resource="hibernate/objects/AlGroupeU.hbm.xml" /> <mapping resource="hibernate/objects/AlAvoirReg.hbm.xml" /> <mapping resource="hibernate/objects/AlAvoirDom.hbm.xml" /> <mapping resource="hibernate/objects/AlUtilisateur.hbm.xml" /> <mapping resource="hibernate/objects/AlUtilisateurInfo.hbm.xml" /> <mapping resource="hibernate/objects/AlFonctionCim.hbm.xml" /> <mapping resource="hibernate/objects/AlAutorisation.hbm.xml" /> <mapping resource="hibernate/objects/AlListeMdp.hbm.xml" /> <mapping resource="hibernate/objects/AlDomaine.hbm.xml" /> <mapping resource="hibernate/objects/AlAppartenir.hbm.xml" /> <mapping resource="hibernate/objects/AlAutoriser.hbm.xml" /> </session-factory> </hibernate-configuration>
Partager