-->
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.  [ 10 posts ] 
Author Message
 Post subject: Error using a Websphere datasource and JTATransactionFactory
PostPosted: Mon Jan 25, 2010 10:34 am 
Newbie

Joined: Thu Jan 14, 2010 4:07 am
Posts: 8
Hello,

I am using :
IBM Rational® Application Developer™ for WebSphere® Software Version: 7.5.0
hibernate-distribution-3.3.2.GA

The relevant lines from hibernate.cfg.xml :
Code:
<property name="hibernate.transaction.factory_class"> org.hibernate.transaction.JTATransactionFactory </property>
<property name="jta.UserTransaction"> java:comp/UserTransaction </property>
<property name="hibernate.transaction.manager_lookup_class"> org.hibernate.transaction.WebSphereExtendedJTATransactionLookup </property>   
<property name="hibernate.connection.datasource">jndi/Phobos</property>

That last being my configured datasource in Websphere.

Some of the code I'm using to start a transaction is :
Code:
         Configuration configuration = new Configuration();
         SessionFactory sessionFactory = configuration.configure().buildSessionFactory();
         Session session = sessionFactory.openSession();
         session.beginTransaction();


And I'm getting an out of memory exception with
org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:172)
that loops.

I checked the infinite loop leading to the out of memory exception and the responses are to add the java:comp/UserTransaction, which I did.

Thanks in advance.


Top
 Profile  
 
 Post subject: Re: Error using a Websphere datasource and JTATransactionFactory
PostPosted: Wed Jan 27, 2010 6:04 am 
Newbie

Joined: Thu Jan 14, 2010 4:07 am
Posts: 8
Sorry to bump my own topic, but here is some more info.

In the hibernate code getUserTransaction calls
UserTransaction ut = ( UserTransaction ) getInitialContext().lookup( utName );

This line is generating the error that's looping.

Is there some way that I can check the result of getInitialContext or
lookup ("java:comp/UserTransaction")?

Thank you.


Top
 Profile  
 
 Post subject: Re: Error using a Websphere datasource and JTATransactionFactory
PostPosted: Wed Jan 27, 2010 6:28 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Please call
jstack <pid>
several times (at least 10 times) while the application is looping and report the outputs here.
This should help us to recognize around which lines the code is looping.

Guenther


Top
 Profile  
 
 Post subject: Re: Error using a Websphere datasource and JTATransactionFactory
PostPosted: Wed Jan 27, 2010 8:55 am 
Newbie

Joined: Thu Jan 14, 2010 4:07 am
Posts: 8
I can't manage to call jstack, the time is too short, almost instant.

It loops a certain number of times, around 6000 and then exits (and it doesn't take more than a fraction of a second), here is the console output.



Code:
[27/01/10 14:45:37:909 GMT+02:00] 00000024 SystemOut     O 2010-01-27 14:45:37 [DEBUG] com.sab2i.sabservice.x3sejbserver.impl.X3SEJBStateful Creating a new TransactionContext
[27/01/10 14:45:38:096 GMT+02:00] 00000024 SystemOut     O 2010-01-27 14:45:38 [DEBUG] com.sab2i.sabservice.ClientsList: Creating a new Hibernate session
[27/01/10 14:45:38:346 GMT+02:00] 00000024 SystemErr     R 62 [WebContainer : 4] INFO org.hibernate.cfg.Environment - Hibernate 3.3.1.GA
[27/01/10 14:45:38:346 GMT+02:00] 00000024 SystemErr     R 62 [WebContainer : 4] INFO org.hibernate.cfg.Environment - hibernate.properties not found
[27/01/10 14:45:38:361 GMT+02:00] 00000024 SystemErr     R 77 [WebContainer : 4] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
[27/01/10 14:45:38:361 GMT+02:00] 00000024 SystemErr     R 77 [WebContainer : 4] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
[27/01/10 14:45:38:486 GMT+02:00] 00000024 SystemErr     R 202 [WebContainer : 4] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
[27/01/10 14:45:38:486 GMT+02:00] 00000024 SystemErr     R 202 [WebContainer : 4] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
[27/01/10 14:45:38:658 GMT+02:00] 00000024 SystemErr     R 374 [WebContainer : 4] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : com/sab2i/sabservice/x3sentities/nouveau/cli/ZCliena0.hbm.xml
[27/01/10 14:45:38:798 GMT+02:00] 00000024 SystemErr     R 514 [WebContainer : 4] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.sab2i.sabservice.x3sentities.nouveau.cli.ZCliena0 -> ZCLIENA0
[27/01/10 14:45:38:829 GMT+02:00] 00000024 SystemErr     R 545 [WebContainer : 4] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : com/sab2i/sabservice/x3sentities/nouveau/com/ZCompte0.hbm.xml
[27/01/10 14:45:38:891 GMT+02:00] 00000024 SystemErr     R 607 [WebContainer : 4] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.sab2i.sabservice.x3sentities.nouveau.com.ZCompte0 -> ZCOMPTE0
[27/01/10 14:45:38:891 GMT+02:00] 00000024 SystemErr     R 607 [WebContainer : 4] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : com/sab2i/sabservice/x3sentities/nouveau/tit/ZTitula0.hbm.xml
[27/01/10 14:45:38:938 GMT+02:00] 00000024 SystemErr     R 654 [WebContainer : 4] INFO org.hibernate.cfg.HbmBinder - Mapping class: com.sab2i.sabservice.x3sentities.nouveau.tit.ZTitula0 -> ZTITULA0
[27/01/10 14:45:38:938 GMT+02:00] 00000024 SystemErr     R 654 [WebContainer : 4] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
[27/01/10 14:45:39:250 GMT+02:00] 00000024 SystemErr     R 966 [WebContainer : 4] INFO org.hibernate.util.NamingHelper - JNDI InitialContext properties:{}
[27/01/10 14:45:41:931 GMT+02:00] 00000024 SystemErr     R 3647 [WebContainer : 4] INFO org.hibernate.connection.DatasourceConnectionProvider - Using datasource: jndi/Phobos
[27/01/10 14:45:42:274 GMT+02:00] 00000024 InternalGener I   DSRA8203I: Database product name : DB2 UDB for AS/400
[27/01/10 14:45:42:274 GMT+02:00] 00000024 InternalGener I   DSRA8204I: Database product version : 05.04.0000 V5R4m0
[27/01/10 14:45:42:274 GMT+02:00] 00000024 InternalGener I   DSRA8205I: JDBC driver name  : AS/400 Toolbox for Java JDBC Driver
[27/01/10 14:45:42:274 GMT+02:00] 00000024 InternalGener I   DSRA8206I: JDBC driver version  : 5.0
[27/01/10 14:45:42:445 GMT+02:00] 00000024 SystemErr     R 4161 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - RDBMS: DB2 UDB for AS/400, version: 05.04.0000 V5R4m0
[27/01/10 14:45:42:445 GMT+02:00] 00000024 SystemErr     R 4161 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: AS/400 Toolbox for Java JDBC Driver, version: 5.0
[27/01/10 14:45:42:492 GMT+02:00] 00000024 SystemErr     R 4208 [WebContainer : 4] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.DB2400Dialect
[27/01/10 14:45:42:492 GMT+02:00] 00000024 SystemErr     R 4208 [WebContainer : 4] INFO org.hibernate.transaction.TransactionFactoryFactory - Transaction strategy: org.hibernate.transaction.JTATransactionFactory
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.util.NamingHelper - JNDI InitialContext properties:{}
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.transaction.TransactionManagerLookupFactory - instantiating TransactionManagerLookup: org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.transaction.TransactionManagerLookupFactory - instantiated TransactionManagerLookup
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 50
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - JDBC result set fetch size: 25
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 8
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
[27/01/10 14:45:42:507 GMT+02:00] 00000024 SystemErr     R 4223 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[27/01/10 14:45:42:523 GMT+02:00] 00000024 SystemErr     R 4239 [WebContainer : 4] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
[27/01/10 14:45:42:523 GMT+02:00] 00000024 SystemErr     R 4239 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
[27/01/10 14:45:42:523 GMT+02:00] 00000024 SystemErr     R 4239 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
[27/01/10 14:45:42:523 GMT+02:00] 00000024 SystemErr     R 4239 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
[27/01/10 14:45:42:523 GMT+02:00] 00000024 SystemErr     R 4239 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
[27/01/10 14:45:42:539 GMT+02:00] 00000024 SystemErr     R 4255 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
[27/01/10 14:45:42:539 GMT+02:00] 00000024 SystemErr     R 4255 [WebContainer : 4] INFO org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge - Cache provider: org.hibernate.cache.NoCacheProvider
[27/01/10 14:45:42:539 GMT+02:00] 00000024 SystemErr     R 4255 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
[27/01/10 14:45:42:539 GMT+02:00] 00000024 SystemErr     R 4255 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
[27/01/10 14:45:42:554 GMT+02:00] 00000024 SystemErr     R 4270 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
[27/01/10 14:45:42:554 GMT+02:00] 00000024 SystemErr     R 4270 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
[27/01/10 14:45:42:554 GMT+02:00] 00000024 SystemErr     R 4270 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
[27/01/10 14:45:42:554 GMT+02:00] 00000024 SystemErr     R 4270 [WebContainer : 4] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
[27/01/10 14:45:42:679 GMT+02:00] 00000024 SystemErr     R 4395 [WebContainer : 4] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
[27/01/10 14:45:43:396 GMT+02:00] 00000024 SystemOut     O 2010-01-27 14:45:43 [DEBUG] com.sab2i.sabservice.x3spersistence.impl.X3SPersistenceHbn= Creating a new session 1264596343396
[27/01/10 14:45:43:442 GMT+02:00] 00000024 SystemOut     O 2010-01-27 14:45:43 [DEBUG] com.sab2i.sabservice.x3spersistence.impl.X3SPersistenceHbn= Begin transaction of session1264596343396
[27/01/10 14:45:43:380 GMT+02:00] 00000024 SystemErr     R 5096 [WebContainer : 4] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
************ Start Display Current Environment ************
WebSphere Platform 7.0.0.0 [BASE 7.0.0.0 r0834.28] running with process name CASTORNode03Cell\CASTORNode03\server1 and process id 3416
Host Operating System is Windows XP, version 5.1 build 2600 Service Pack 2
Java version = 1.6.0, Java Compiler = j9jit24, Java VM name = IBM J9 VM
was.install.root = C:\Program Files\IBM\SDP\runtimes\base_v7
user.install.root = C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile1
Java Home = C:\Program Files\IBM\SDP\runtimes\base_v7\java\jre
ws.ext.dirs = C:\Program Files\IBM\SDP\runtimes\base_v7/java/lib;C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile1/classes;C:\Program Files\IBM\SDP\runtimes\base_v7/classes;C:\Program Files\IBM\SDP\runtimes\base_v7/lib;C:\Program Files\IBM\SDP\runtimes\base_v7/installedChannels;C:\Program Files\IBM\SDP\runtimes\base_v7/lib/ext;C:\Program Files\IBM\SDP\runtimes\base_v7/web/help;C:\Program Files\IBM\SDP\runtimes\base_v7/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime
Classpath = C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile1/properties;C:\Program Files\IBM\SDP\runtimes\base_v7/properties;C:\Program Files\IBM\SDP\runtimes\base_v7/lib/startup.jar;C:\Program Files\IBM\SDP\runtimes\base_v7/lib/bootstrap.jar;C:\Program Files\IBM\SDP\runtimes\base_v7/lib/jsf-nls.jar;C:\Program Files\IBM\SDP\runtimes\base_v7/lib/lmproxy.jar;C:\Program Files\IBM\SDP\runtimes\base_v7/lib/urlprotocols.jar;C:\Program Files\IBM\SDP\runtimes\base_v7/deploytool/itp/batchboot.jar;C:\Program Files\IBM\SDP\runtimes\base_v7/deploytool/itp/batch2.jar;C:\Program Files\IBM\SDP\runtimes\base_v7/java/lib/tools.jar;C:\workspaces\RAD75workspace\X3SCommon\bin;C:\workspaces\RAD75workspace\X3STools\bin;C:\workspaces\RAD75workspace\X3SDataTree\bin;C:\workspaces\RAD75workspace\X3SLogger\bin;C:\workspaces\RAD75workspace\X3SEJBRemote\src;C:\workspaces\RAD75workspace\X3SPersistence\bin;C:\workspaces\RAD75workspace\X3SEntities\bin;C:\workspaces\RAD75workspace\X3SProtoServices\bin;C:\workspaces\RAD75workspace\X3SLauncher\bin;C:\@workspace\lib\SABService\common\antlr.jar;C:\@workspace\lib\SABService\common\commons-collections.jar;C:\@workspace\lib\SABService\common\ejb3-persistence.jar;C:\@workspace\lib\SABService\common\log4j.jar;C:\@workspace\lib\SABService\common\slf4j-api.jar;C:\@workspace\lib\SABService\common\dom4j.jar;C:\@workspace\lib\SABService\common\javassist.jar;C:\@workspace\lib\SABService\common\slf4j-simple-1.5.6.jar;C:\@workspace\lib\SABService\Hibernate\hibernate-annotations.jar;C:\@workspace\lib\SABService\Hibernate\hibernate-commons-annotations.jar;C:\@workspace\lib\SABService\Hibernate\hibernate-core.jar;C:\@workspace\lib\SABService\Hibernate\hibernate-entitymanager.jar;C:\@workspace\lib\SABService\Hibernate\hibernate-jmx.jar;C:\@workspace\lib\SABService\Hibernate\hibernate-validator.jar;C:\@workspace\lib\SABService\AS400\jt400V5R2.jar;C:\@workspace\lib\SABService\tools\coreapis.jar;C:\@workspace\lib\SABService\tools\websphereCompatibility.jar;C:\@workspace\lib\SABService\tools\X3CE.jar;C:\Program Files\IBM\SDP\runtimes\base_v7\lib\j2ee.jar;C:\@workspace\lib\SABService\jta.jar;C:\com\ibm\websphere\jtaextensions
Java Library path = C:\Program Files\IBM\SDP\runtimes\base_v7\java\jre\bin;.;C:\Program Files\IBM\SDP\runtimes\base_v7\bin;C:\Program Files\IBM\SDP\runtimes\base_v7\java\bin;C:\Program Files\IBM\SDP\runtimes\base_v7\java\jre\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Diskeeper Corporation\Diskeeper\;C:\Program Files\Common Files\Lenovo;C:\Program Files\Lenovo\Client Security Solution;C:\PROGRA~1\IBM\CLIENT~1;C:\PROGRA~1\IBM\CLIENT~1\Shared;C:\PROGRA~1\IBM\CLIENT~1\Emulator;C:\Program Files\IDM Computer Solutions\UltraEdit-32;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Sun\AppServer\bin;C:\@maven\apache-maven-2.0.9\bin;C:\@workspace\java_home\jdk1.6.0_02\bin;C:\Jboss_stuff\jboss-5.1.0.GA\bin;C:\eclipse2\plugins\org.apache.ant_1.7.1.v20090120-1145\bin
************* End Display Current Environment *************
rnate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:172)
   at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:172)
   at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:172)
   at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:172)
   at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:172)
###################################
#### 6000 identical lines removed for space  ####
###################################
   at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:172)
   at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:172)
   at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:172)
   at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:149)
   at org.hibernate.jdbc.JDBCContext.getTransaction(JDBCContext.java:220)
   at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1342)
   at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1352)
   at com.sab2i.sabservice.x3spersistence.impl.X3SPersistenceHbn.beginSABTransaction(X3SPersistenceHbn.java:115)
   at com.sab2i.sabservice.x3slauncher.impl.AbstractService.invokeStateful(AbstractService.java:46)
   at com.sab2i.sabservice.x3sejbserver.impl.X3SEJBStateful.executeService(X3SEJBStateful.java:36)
   at com.sab2i.sabservice.x3sejb.stateful.EJSRemote0SFX3SEJBStateful_67c62b99.executeService(EJSRemote0SFX3SEJBStateful_67c62b99.java)
   at com.sab2i.sabservice.x3sejb.stateful._X3SEJBStatefulRemoteIF_Stub.executeService(_X3SEJBStatefulRemoteIF_Stub.java)
   at com.sab2i.sabservice.x3sejb.X3SEJBInterfaceWrapper.executeService(X3SEJBInterfaceWrapper.java:45)
   at com.sab2i.sabservice.presentation.servlet.SSPresentationServlet.performTask(SSPresentationServlet.java:114)
   at com.sab2i.sabservice.presentation.servlet.AbstractServlet.doPost(AbstractServlet.java:45)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
   at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1449)
   at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)
   at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
   at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
   at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
   at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:859)
   at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
   at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
   at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
   at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
   at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
   at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
   at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
   at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
   at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
   at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
   at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
   at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
[27/01/10 14:45:47:962 GMT+02:00] 00000024 SystemOut     O 2010-01-27 14:45:47 [FATAL] An Unexcpected Error Has Occurred
[27/01/10 14:45:48:025 GMT+02:00] 00000024 FfdcProvider  I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files\IBM\SDP\runtimes\base_v7\profiles\was70profile1\logs\ffdc\server1_7ce47ce4_10.01.27_14.45.47.978369.txt com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest 573
[27/01/10 14:45:48:040 GMT+02:00] 00000024 SystemOut     O 2010-01-27 14:45:48 [DEBUG] com.sab2i.sabservice.presentation.servlet.SSPresentationServlet END     =====


Top
 Profile  
 
 Post subject: Re: Error using a Websphere datasource and JTATransactionFactory
PostPosted: Wed Jan 27, 2010 9:21 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Hi,

I just toke a look on the source of JTATransactionFactory.jave version 3.3.2GA.

Code:
protected UserTransaction getUserTransaction() {
                final String utName = getUserTransactionName();
                log.trace( "Attempting to locate UserTransaction via JNDI [{}]", utName );

                try {
                        UserTransaction ut = ( UserTransaction ) getInitialContext().lookup( utName );
                        if ( ut == null ) {
                                throw new TransactionException( "Naming service lookup for UserTransaction returned null [" + utName +"]" );
                        }

                        log.trace( "Obtained UserTransaction" );

                        return ut;
                }
                catch ( NamingException ne ) {
                        throw new TransactionException( "Could not find UserTransaction in JNDI [" + utName + "]", ne );
                }
        }


At line 172 there's only the catch ( NamingException ne ) statement, so it is very strange that this produces the stack you report.
On the stack that you report, it seems that something at line 172 is calling his self (method getUserTransaction()) recursively.
Are you sure to work with a clean Hiberante3.3.2GA version ?

Anyway I suggest you to get the source from
http://repository.jboss.org/maven2/org/hibernate/hibernate-core/3.3.2.GA/hibernate-core-3.3.2.GA-sources.jar
and then debug your application with some debugger.


Top
 Profile  
 
 Post subject: Re: Error using a Websphere datasource and JTATransactionFactory
PostPosted: Wed Jan 27, 2010 9:32 am 
Newbie

Joined: Thu Jan 14, 2010 4:07 am
Posts: 8
Thank you, I'll debug and see if I can figure something out.

I did download 3.3.2.GA recently (2 days ago) and replaced the jars with the one provided.

Yet, in the console, I still get the
Code:
[27/01/10 14:45:38:346 GMT+02:00] 00000024 SystemErr     R 62 [WebContainer : 4] INFO org.hibernate.cfg.Environment - Hibernate 3.3.1.GA

trace, which is weird.


Top
 Profile  
 
 Post subject: Re: Error using a Websphere datasource and JTATransactionFactory
PostPosted: Wed Jan 27, 2010 9:41 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Ok, now it is clear to me:
for what reason ever you are still using 3.3.1GA and such version has a bug:

Code:
protected UserTransaction getUserTransaction() {
                log.trace( "Attempting to locate UserTransaction via JNDI [{}]", getUserTransactionName() );

                try {
                        UserTransaction ut = ( UserTransaction ) getInitialContext().lookup( getUserTransactionName() );
                        if ( ut == null ) {
                                throw new TransactionException( "Naming service lookup for UserTransaction returned null [" + getUserTransactionName() +"]" );
                        }

                        log.trace( "Obtained UserTransaction" );

                        return ut;
                }
                catch ( NamingException ne ) {
                        throw new TransactionException( "Could not find UserTransaction in JNDI [" + getUserTransaction() + "]", ne );
                }
        }


Here line 172 is
Code:
throw new TransactionException( "Could not find UserTransaction in JNDI [" + getUserTransaction() + "]", ne );

which effectively calls hisself recursively.
This is definitely a bug of 3.3.1.GA.

Set your environment proper to 3.3.2.GA or higher and you will not have the out_of_mem problem anymore.


Top
 Profile  
 
 Post subject: Re: Error using a Websphere datasource and JTATransactionFactory
PostPosted: Wed Jan 27, 2010 10:51 am 
Newbie

Joined: Thu Jan 14, 2010 4:07 am
Posts: 8
Thank you.

Upgrading to 3.3.2.GA did indeed remove the loop and the out of memory exception. I thought I had done it before, but apparently I didn't check to see if the old version was removed from the classpath and it had precedence.

Now I finally have a new visible error.

Code:
com.sab2i.sabservice.x3sejb.X3SException: com.sab2i.sabservice.x3slauncher.X3SServiceException: RollBack Failed!
   at com.sab2i.sabservice.x3sejbserver.impl.X3SEJBStateless.executeService(X3SEJBStateless.java:39)
   at com.sab2i.sabservice.x3sejb.stateless.EJSLocal0SLX3SEJBStateless_6333ebbb.executeService(EJSLocal0SLX3SEJBStateless_6333ebbb.java)
   at com.sab2i.sabservice.x3sejb.X3SEJBInterfaceWrapper.executeService(X3SEJBInterfaceWrapper.java:49)
   at com.sab2i.sabservice.presentation.servlet.SSPresentationServlet.performTask(SSPresentationServlet.java:109)
   at com.sab2i.sabservice.presentation.servlet.AbstractServlet.doPost(AbstractServlet.java:45)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
   at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1449)
   at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)
   at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
   at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
   at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)
   at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)
   at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)
   at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
   at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
   at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
   at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
   at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
   at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
   at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
   at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
   at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
   at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
   at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
   at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
   at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
Caused by:
com.sab2i.sabservice.x3slauncher.X3SServiceException: RollBack Failed!
   at com.sab2i.sabservice.x3slauncher.impl.AbstractService.invokeStateless(AbstractService.java:166)
   at com.sab2i.sabservice.x3sejbserver.impl.X3SEJBStateless.executeService(X3SEJBStateless.java:30)
   ... 26 more
Caused by:
com.sab2i.sabservice.x3spersistence.X3SPersistenceException: org.hibernate.TransactionException: Could not find UserTransaction in JNDI [java:comp/UserTransaction]
   at com.sab2i.sabservice.x3spersistence.impl.X3SPersistenceHbn.beginSABTransaction(X3SPersistenceHbn.java:119)
   at com.sab2i.sabservice.x3slauncher.impl.AbstractService.invokeStateless(AbstractService.java:122)
   ... 27 more
Caused by:
org.hibernate.TransactionException: Could not find UserTransaction in JNDI [java:comp/UserTransaction]
   at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:173)
   at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:149)
   at org.hibernate.jdbc.JDBCContext.getTransaction(JDBCContext.java:222)
   at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1343)
   at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)
   at com.sab2i.sabservice.x3spersistence.impl.X3SPersistenceHbn.beginSABTransaction(X3SPersistenceHbn.java:115)
   ... 28 more
Caused by:
javax.naming.NameNotFoundException: Name "comp/UserTransaction" not found in context "java:".
   at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1178)
   at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:1095)
   at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1233)
   at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:394)
   at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:214)
   at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:154)
   at javax.naming.InitialContext.lookup(Unknown Source)
   at org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:163)
   ... 33 more


The root of the problem is still the naming. java:comp/UserTransaction isn't found.

Is there something I'm missing here? Do I have to set this up someplace? Or can I figure out the name of the UserTransaction lookup from some file? The Websphere documentation listed java:comp/UserTransaction and that isn't working.


Top
 Profile  
 
 Post subject: Re: Error using a Websphere datasource and JTATransactionFactory
PostPosted: Wed Jan 27, 2010 10:58 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Hi,

I don't have any experience with WebSphere but as other J2EE container,
it should offer a JNDI service and a TransactionManagerService.
You must properly configure your WebSphere in order that it starts
TransactionManagerService and that it registers it on JNDI.

For details you may consult the WebSpere documentation.


Top
 Profile  
 
 Post subject: Re: Error using a Websphere datasource and JTATransactionFactory
PostPosted: Wed Jan 27, 2010 12:20 pm 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
It might also be that your JNDI service is properly running already,
but hibernate looks for the wrong jndi.class.

In such case you have to set hibernate.jndi.class explicitely in your configuration file.

Code:
<property name="hibernate.jndi.class" value="...."/>


or alternatively you create a jndi.properties file in your classpath
specifying appropriate jndi class with java.naming.factory.initial property

Code:
java.naming.factory.initial=...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.