Getting this Error:- "You cannot set autocommit during a managed transaction!"

880 views
Skip to first unread message

Nitin Gupta

unread,
Nov 25, 2008, 5:20:46 AM11/25/08
to mobicent...@googlegroups.com
Hi,
      In Mobicents server, when i m starting the Jboss at end, I m getting below mentioned error. but this error is not affecting of normal behavior of our application..

Is it related to HyperSonic database Transaction's autocommit attribute related ??

--------
15:36:13,372 INFO  [SchemaExport] Running hbm2ddl schema export
15:36:13,388 INFO  [SchemaExport] exporting generated schema to database
15:36:13,388 ERROR [SchemaExport] schema export unsuccessful
java.sql.SQLException: You cannot set autocommit during a managed transaction!
        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommit(BaseWrapperManagedConnection.java:482)
        at org.jboss.resource.adapter.jdbc.WrappedConnection.setAutoCommit(WrappedConnection.java:322)
        at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:36)
        at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:180)
        at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133)
        at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:311)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
        at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
        at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
        at org.mobicents.slee.sipevent.server.subscription.SubscriptionControlSbb.<clinit>(SubscriptionControlSbb.java:160)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at java.lang.Class.newInstance0(Class.java:350)
        at java.lang.Class.newInstance(Class.java:303)
        at org.mobicents.slee.runtime.SbbObject.createConcreteClass(SbbObject.java:592)
        at org.mobicents.slee.runtime.SbbObject.<init>(SbbObject.java:112)
        at org.mobicents.slee.runtime.SbbObjectPoolFactory.makeObject(SbbObjectPoolFactory.java:143)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
        at org.mobicents.slee.runtime.sbbentity.SbbEntity.assignAndCreateSbbObject(SbbEntity.java:921)
        at org.mobicents.slee.runtime.EventRouterImpl.processInitialEvents(EventRouterImpl.java:262)
        at org.mobicents.slee.runtime.EventRouterImpl.routeQueuedEvent(EventRouterImpl.java:735)
        at org.mobicents.slee.runtime.EventRouterImpl.access$100(EventRouterImpl.java:64)
        at org.mobicents.slee.runtime.EventRouterImpl$EventExecutor.run(EventRouterImpl.java:121)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
15:36:13,404 INFO  [NamingHelper] JNDI InitialContext properties:{}
15:36:13,966 INFO  [SubscriptionControlManagement] SIP Event Subscription Control Management MBean started.

--
Regards:-
Nitin Gupta.

Bartosz Baranowski

unread,
Nov 25, 2008, 6:18:25 AM11/25/08
to mobicent...@googlegroups.com
This is because SBBs run in transactional enviroment, if I recall correctly removing this property should kill this error. See how our old JPA RA was configured. It can be found in old release of mc.
--
Bartosz Baranowski
JBoss R & D
==================================
Word of criticism meant to improve is always step forward.

Eduardo Martins

unread,
Nov 25, 2008, 6:42:51 AM11/25/08
to mobicent...@googlegroups.com
Ignore it, it's a bug on Hibernate export schema tools that doesn't do any harm. Probably it will be fixed in a future JBoss AS 4.x release, since it is already fixed on JBoss AS 5 CR2.

-- Eduardo

Nitin Gupta

unread,
Nov 26, 2008, 12:15:58 AM11/26/08
to mobicent...@googlegroups.com
Okay..Thanks..
Reply all
Reply to author
Forward
0 new messages