This combinatios is possible?
I´m getting following exceptions when invocation my EJB save data using Hibernate...
ps. the data are commited correctly....
1) Jboss version:
15:04:58,671 INFO [Server] Starting JBoss (MX MicroKernel)...
15:04:58,703 INFO [Server] Release ID: JBoss [Zion] 4.0.1 (build: CVSTag=JBoss_4_0_1 date=200412230944)
2) Hibernate - configurations
<server>
<mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
<attribute name="DatasourceName">java:/InformixXADS_dblojas</attribute>
<attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.InformixDialect</attribute>
<attribute name="CacheProviderClass">net.sf.hibernate.cache.HashtableCacheProvider</attribute>
</mbean>
My datasource configurations....
<xa-datasource>
<jndi-name>InformixXADS_dblojas</jndi-name>
<xa-datasource-class>com.informix.jdbcx.IfxXADataSource</xa-datasource-class>
<xa-datasource-property name="Description">Banco do Novo Sistema</xa-datasource-property>
<xa-datasource-property name="IfxIFXHOST">svrl3000</xa-datasource-property>
<xa-datasource-property name="PortNumber">1560</xa-datasource-property>
<xa-datasource-property name="DatabaseName">dblojas</xa-datasource-property>
<xa-datasource-property name="ServerName">dcompras_ows</xa-datasource-property>
<xa-datasource-property name="User">p</xa-datasource-property>
<xa-datasource-property [/list]name="Password">t</xa-datasource-property>
<application-managed-security/>
<transaction-isolation>TRANSACTION_SERIALIZABLE</transaction-isolation>
<min-pool-size>01</min-pool-size>
<max-pool-size>80</max-pool-size>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorter</exception-sorter-class-name>
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>InformixDB</type-mapping>
</metadata>
</xa-datasource>
3) My Application...
public class ImportacaoService {
private static final String SESSION_FACTORY_NAME = "java:/hibernate/SessionFactory";
public Object gravar(Object obj) throws HibernateException {
getSession().save(obj);
getSession().flush();
return obj;
}
private Session getSession()
{
return HibernateContext.getSession(SESSION_FACTORY_NAME);
}
}
4) Log...
2005-01-27 15:07:20,625 DEBUG [net.sf.hibernate.engine.CacheSynchronization] transaction before completion callback
2005-01-27 15:07:20,687 INFO [STDOUT] Middlog: Thread recebendo mensagem...
2005-01-27 15:07:20,687 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url null
2005-01-27 15:07:20,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@c11557, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@712ee9{ url=null ,addedOrder=0}
2005-01-27 15:07:20,687 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url null
2005-01-27 15:07:20,687 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@c11557, cl=org.jboss.mx.loading.UnifiedClassLoader3@bec43f{ url=null ,addedOrder=0}
2005-01-27 15:07:20,687 DEBUG [net.sf.hibernate.impl.SessionImpl] closing session
2005-01-27 15:07:20,687 DEBUG [net.sf.hibernate.impl.SessionImpl] disconnecting session
2005-01-27 15:07:20,687 DEBUG [net.sf.hibernate.util.JDBCExceptionReporter] SQL Warning
java.sql.SQLWarning: Database has transactions
at com.informix.util.IfxWarnMsg.getSQLWarning(IfxWarnMsg.java:125)
at com.informix.util.IfxWarnMsg.getSQLWarning(IfxWarnMsg.java:149)
at com.informix.jdbc.IfxSqliConnect.addWarning(IfxSqliConnect.java:1874)
at com.informix.jdbc.IfxSqliConnect.setWarnings(IfxSqliConnect.java:4009)
at com.informix.jdbc.IfxSqliConnect.OpenDbInit(IfxSqliConnect.java:2648)
at com.informix.jdbc.IfxSqliConnect.xaSetSerWarnFlags(IfxSqliConnect.java:5351)
at com.informix.jdbcx.IfxXASqli.executeXAOpen(IfxXASqli.java:198)
at com.informix.jdbcx.IfxXAPooledConnection.openDBforXA(IfxXAPooledConnection.java:219)
at com.informix.jdbcx.IfxXAPooledConnection.<init>(IfxXAPooledConnection.java:134)
at com.informix.jdbcx.IfxXADataSource.getXAConnection(IfxXADataSource.java:75)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:138)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:508)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:207)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:396)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:299)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:448)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1155)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:789)
at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:583)
at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:551)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:416)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:416)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:413)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:310)
at org.jboss.Main.boot(Main.java:162)
at org.jboss.Main$1.run(Main.java:423)
at java.lang.Thread.run(Thread.java:595)
2005-01-27 15:07:20,687 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Warning: 0, SQLState: 01I01
2005-01-27 15:07:20,687 WARN [net.sf.hibernate.util.JDBCExceptionReporter] Database has transactions
2005-01-27 15:07:20,703 WARN [net.sf.hibernate.util.JDBCExceptionReporter] SQL Warning: 0, SQLState: 01I04
2005-01-27 15:07:20,703 WARN [net.sf.hibernate.util.JDBCExceptionReporter] Database selected
2005-01-27 15:07:20,703 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.parentTraceEnabled=true
2005-01-27 15:07:20,703 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
2005-01-27 15:07:20,703 DEBUG [org.jboss.util.NestedThrowable] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
2005-01-27 15:07:20,703 ERROR [org.jboss.resource.connectionmanager.TxConnectionManager] Error while closing connection handle!
org.jboss.resource.JBossResourceException: Error in delist!; - nested throwable: (java.lang.IllegalStateException: Already committed. TransactionImpl:XidImpl[FormatId=257, GlobalId=popshopdes/18, BranchQual=, localId=18])
at org.jboss.resource.connectionmanager.BaseConnectionManager2.rethrowAsResourceException(BaseConnectionManager2.java:102)
at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.delist(TxConnectionManager.java:490)
at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionClosed(TxConnectionManager.java:524)
at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.closeHandle(BaseWrapperManagedConnection.java:300)
at org.jboss.resource.adapter.jdbc.WrappedConnection.close(WrappedConnection.java:116)
at net.sf.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:64)
at net.sf.hibernate.impl.BatcherImpl.closeConnection(BatcherImpl.java:305)
at net.sf.hibernate.impl.SessionImpl.disconnect(SessionImpl.java:3352)
at net.sf.hibernate.impl.SessionImpl.close(SessionImpl.java:576)
at org.jboss.hibernate.session.TransactionSynch.afterCompletion(TransactionSynch.java:71)
at org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1418)
at org.jboss.tm.TransactionImpl.completeTransaction(TransactionImpl.java:1090)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:349)
at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:454)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:322)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:123)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:870)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.IllegalStateException: Already committed. TransactionImpl:XidImpl[FormatId=257, GlobalId=popshopdes/18, BranchQual=, localId=18]
at org.jboss.tm.TransactionImpl.delistResource(TransactionImpl.java:444)
at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.delist(TxConnectionManager.java:478)
... 41 more
|