-->
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.  [ 1 post ] 
Author Message
 Post subject: Unable to create requested service Error
PostPosted: Tue Aug 13, 2013 6:19 am 
Beginner
Beginner

Joined: Thu Jul 11, 2013 7:58 am
Posts: 22
Hi friends,

when I try to store some Data in Database I get this error: Unable to create requested service [org.hibernate.engine.transaction.spi.TransactionFactory] How can I solve this problem. I am using MongoDb as Database and HibernateOGM. here zou can find mz block of code:

Code:
OgmConfiguration cfgogm=new OgmConfiguration();
            cfgogm.configure("hibernate.cfg.xml");
           
            serviceregistry=new ServiceRegistryBuilder().applySettings(cfgogm.getProperties()).buildServiceRegistry();
            sessionfactory=cfgogm.buildSessionFactory(serviceregistry);
            Session session=sessionfactory.getCurrentSession();
            session.beginTransaction();
            Contact cnt=new Contact();
            cnt.setEmail("bbb@gmail.com");
            cnt.setFirstname("bowi");
            cnt.setLastname("bowia");
            session.persist(cnt);
            session.flush();
            session.getTransaction().commit();
            System.out.println("Done...");
           


thank you for your helps


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

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.