-->
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.  [ 2 posts ] 
Author Message
 Post subject: Issues with Websphere 6.0 and Stateless Session Bean
PostPosted: Tue Sep 13, 2005 10:29 pm 
Newbie

Joined: Thu May 05, 2005 4:53 pm
Posts: 11
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>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 14, 2005 12:32 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
This one is almost as regular as lazy load problem .

Your application probably cannot get a connection because the connection pool has been starved. The connection pool is probably starved because Session.close() is not being called .


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.