These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: No CurrentSessionContext configured!
PostPosted: Tue Apr 18, 2006 9:42 am 
Newbie

Joined: Tue Apr 18, 2006 9:27 am
Posts: 5
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Bonjour, j'ai un probleme qui me bloque pas mal. Vous trouverez toutes les infos liees a celui ci en dessous. J'ai regarde les docs, les tutos, fouille google...mais n'ai rien trouve de precis pour m'en sortir.

Si vous avez une manip, un lien sur une doc que je n'aurai pas encore vu, je suis preneur...


Hibernate version: 3

Mapping documents:

<?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.gjt.mm.mysql.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/maquette</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>

<mapping resource="maquette/database/frais.hbm.xml"/>
<mapping resource="maquette/database/individu.hbm.xml"/>
<mapping resource="maquette/database/inscriptionsession.hbm.xml"/>
<mapping resource="maquette/database/lieu.hbm.xml"/>
<mapping resource="maquette/database/organisme.hbm.xml"/>
<mapping resource="maquette/database/salaire.hbm.xml"/>
<mapping resource="maquette/database/service.hbm.xml"/>
<mapping resource="maquette/database/session.hbm.xml"/>
<mapping resource="maquette/database/societe.hbm.xml"/>
<mapping resource="maquette/database/stage.hbm.xml"/>
</session-factory>
</hibernate-configuration>


Full stack trace of any exception that occurs:
Exception in thread "main" org.hibernate.HibernateException: No CurrentSessionContext configured!
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:506)
at maquette.metier.JStage.main(JStage.java:268)


Name and version of the database you are using: maquette, mySQLInnoDB



merci d'avance

_________________
http://www.toyd.org


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 18, 2006 10:24 am 
Newbie

Joined: Tue Apr 18, 2006 9:27 am
Posts: 5
J'ai resolu mon probleme...

_________________
http://www.toyd.org


Top
 Profile  
 
 Post subject: help
PostPosted: Thu Apr 20, 2006 4:47 am 
Newbie

Joined: Thu Apr 20, 2006 4:45 am
Posts: 1
j'ai le meme souçis que toi peux tu m'indiquer comment tu as procéder pour resoudre ton probleme?

_________________
Arnaud


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 25, 2006 3:48 pm 
Beginner
Beginner

Joined: Thu Apr 20, 2006 11:51 am
Posts: 44
Hi
I've the same problem
"No CurrentSessionContext configured!"
How do you have resolved this?
thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 26, 2006 5:15 am 
Newbie

Joined: Tue Apr 18, 2006 9:27 am
Posts: 5
Francais :

J'ai rajoute dans mon hibernate.cfg.xml cette ligne :

<property name="current_session_context_class">thread</property>

Dans la doc hibernate, il est explique ce que ca fait exactement.

ps: petits credits sont toujours les bienvenue si ca resoud ton probleme ;)

---------------------------------------

English :

I add, in hibernate.cfg.xml, this line

<property name="current_session_context_class">thread</property>

To have more informations about it, check in the hibernate documentation. It's all explained.

ps: if it solves your problem, maybe a little credit could be given to me ;)

_________________
http://www.toyd.org


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.