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?