Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0.5
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
5 19:06:05:758 PDT] 0000002d SystemErr R org.hibernate.HibernateException: Not able to obtain connection
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:113)
at org.hibernate.jdbc.AbstractBatcher.prepareSelectStatement(AbstractBatcher.java:82)
at org.hibernate.id.SequenceGenerator.generate(SequenceGenerator.java:73)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:91)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:71)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:486)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:481)
at com.tdemand.server.datamanagement.staging.SourceSystemDAOImpl.addSourceSystem(SourceSystemDAOImpl.java:51)
at com.tdemand.server.datamanagement.staging.SourceSystemReg.addSourceSystem(SourceSystemReg.java:67)
at com.tdemand.server.datamanagement.staging.EJSRemoteStatelessSourceSystemReg_669417a8.addSourceSystem(EJSRemoteStatelessSourceSystemReg_669417a8.java:41)
at com.tdemand.server.datamanagement.staging._EJSRemoteStatelessSourceSystemReg_669417a8_Tie.addSourceSystem(_EJSRemoteStatelessSourceSystemReg_669417a8_Tie.java:154)
at com.tdemand.server.datamanagement.staging._EJSRemoteStatelessSourceSystemReg_669417a8_Tie._invoke(_EJSRemoteStatelessSourceSystemReg_669417a8_Tie.java:97)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:608)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:461)
at com.ibm.rmi.iiop.ORB.process(ORB.java:432)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1728)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2229)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:65)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
Name and version of the database you are using:
Oracle 10g
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
I am getting this exception when I try to invoke the insert method the 2nd time. 1st time the insert method works like a charm. I am guessing its a misconfiguration issue with the managed JTA transaction. The hibernate.cfg.xml looks like the following :-
<session-factory>
<property name="hibernate.jndi.url">iiop://localhost:2809/</property>
<property name="hibernate.jndi.class">com.ibm.websphere.naming.WsnInitialContextFactory</property>
<property name="hibernate.session_factory_name">HibernateSessionFactory</property>
<property name="hibernate.connection.datasource">jdbc/oraPool</property>
<!-- <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property> -->
<property name="hibernate.connection.url">jdbc:oracle:thin:@192.168.1.58:1521:truedema</property>
<property name="hibernate.connection.username">apps</property>
<property name="hibernate.connection.password">apps</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.WebSphereTransactionManagerLookup</property>
<!-- Mapping files -->
<mapping resource="TdConnectorSessions.hbm.xml"/>
<mapping resource="TdSourceSystems.hbm.xml"/>
</session-factory>
</hibernate-configuration>