-->
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: Exception: You cannot set autocommit during a managed transa
PostPosted: Thu Aug 26, 2010 5:44 am 
Newbie

Joined: Fri May 15, 2009 3:36 am
Posts: 3
Hello. I have the next error while starting jboss:

"Exception: You cannot set autocommit during a managed transaction!".

I try to get sessionFactory by Hand:
Code:
cfg = new Configuration();
Properties properties = new Properties();
properties.load(new FileInputStream(new File(GEWConfigurationManager.getInstance().getString(
             CONFIG_HIBERNATE_PROPERTY_FILE))));
cfg.setProperties(properties);
sessionFactory = cfg.buildSessionFactory();


hibernate.properties
Code:
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.hbm2ddl.auto=update
hibernate.show_sql=false
hibernate.format_sql=true
hibernate.connection.datasource=geleng_webDatasource
hibernate.default_entity_mode=dynamic-map
hibernate.transaction.manager_lookup_class = org.hibernate.transaction.JBossTransactionManagerLookup
hibernate.transaction.factory_class = org.hibernate.transaction.JTATransactionFactory
jta.UserTransaction = java:/UserTransaction
hibernate.max_fetch_depth = 1


When i set hibernate.hbm2ddl.auto=validate all work fine. But i nedd to set it update. Where is my errors?


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.