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.  [ 1 post ] 
Author Message
 Post subject: Integration issue between WebSphere 6.0.2.7 and Hibernate3.1
PostPosted: Thu Sep 14, 2006 9:13 am 
Newbie

Joined: Thu Sep 14, 2006 8:47 am
Posts: 2
I am running into following issue when trying to use WebSphere datasource and transaction management. It looks like it is able to get a handle on datasource but throws the exception as seen below. I have tried everything possible I can think of including using ojdbc14.jar driver for Oracle 9i, as it helped resolve some of Oracle database issues. My datasource in websphere is configure to run as Container managed persistence. I am attaching hibernate.cfg.xml and full error log. Please provide your input as soon as possible.

Class invoking save
try {
// This step will read hibernate.cfg.xml and prepare hibernate for use
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
//Uncomment below to use websphere jdbc connection pool
Context ctx = new InitialContext();
Object obj = ctx.lookup(factoryName);
sessionFactory = (SessionFactory) obj;
session = sessionFactory.openSession();
//some code here adding the objects to parent object
session.save(objects);
}
catch(HibernateException he) {
if (transaction != null)
transaction.rollback();
throw new NavisysException(he);
}
catch(NamingException ne) {
throw new NavisysException(ne);
}
finally {

session.flush();
session.close();
}

hibernate.cfg.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

<session-factory>

<!-- Database connection settings -->
<property name="hibernate.connection.datasource">jdbc/acord</property>
<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.WebSphereExtendedJTATransactionLookup</property>

<!-- JDBC connection pool (use the built-in)
<property name="connection.pool_size">1</property>-->

<property name="hibernate.session_factory_name">
HibernateSessionFactory</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.OracleDialect</property>

<!-- Enable Hibernate's automatic session context management-->
<property name="current_session_context_class">thread</property>

<!-- Disable the second-level cache
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>-->

<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>

<!-- Drop and re-create the database schema on startup -->
<!-- <property name="hbm2ddl.auto">create</property> -->

<mapping resource="com/xyz/hibernate/dao/test1.hbm.xml"/>
<mapping resource="com/xyz/hibernate/dao/test2.hbm.xml"/>
<mapping resource="com/xyz/hibernate/dao/test3.hbm.xml"/>

</session-factory>

</hibernate-configuration>

ERROR LOG

[9/14/06 9:05:42:199 EDT] 00000025 ConnectionFac W J2CA0294W: Deprecated usage of direct JNDI lookup of resource jdbc/acord. The following default values are used: [Resource-ref settings]

res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
loginConfigurationName: null
loginConfigProperties: null
[Other attributes]

res-resolution-control: 999 (undefined)
isCMP1_x: false (not CMP1.x)
isJMS: false (not JMS)

[9/14/06 9:05:42:308 EDT] 00000025 DatasourceCon I org.hibernate.connection.DatasourceConnectionProvider configure Using datasource: jdbc/acord
[9/14/06 9:05:42:918 EDT] 00000025 InternalOracl I DSRA8203I: Database product name : Oracle
[9/14/06 9:05:42:949 EDT] 00000025 InternalOracl I DSRA8204I: Database product version : Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
[9/14/06 9:05:42:949 EDT] 00000025 InternalOracl I DSRA8205I: JDBC driver name : Oracle JDBC driver
[9/14/06 9:05:42:949 EDT] 00000025 InternalOracl I DSRA8206I: JDBC driver version : 9.2.0.1.0
[9/14/06 9:05:42:964 EDT] 00000025 InternalOracl I DATA_STORE_HELPER_NAME
[9/14/06 9:05:42:980 EDT] 00000025 WSRdbDataSour I DSRA8208I: JDBC driver type : thin
[9/14/06 9:05:43:293 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings RDBMS: Oracle, version: Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
[9/14/06 9:05:43:293 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC driver: Oracle JDBC driver, version: 9.2.0.1.0
[9/14/06 9:05:43:574 EDT] 00000025 Dialect I org.hibernate.dialect.Dialect <init> Using dialect: org.hibernate.dialect.OracleDialect
[9/14/06 9:05:43:589 EDT] 00000025 TransactionFa I org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory Transaction strategy: org.hibernate.transaction.JTATransactionFactory
[9/14/06 9:05:43:605 EDT] 00000025 NamingHelper I org.hibernate.util.NamingHelper getInitialContext JNDI InitialContext properties:{}
[9/14/06 9:05:43:621 EDT] 00000025 TransactionMa I org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup instantiating TransactionManagerLookup: org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
[9/14/06 9:05:43:621 EDT] 00000025 TransactionMa I org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup instantiated TransactionManagerLookup
[9/14/06 9:05:43:636 EDT] 00000025 TransactionMa I org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup instantiating TransactionManagerLookup: org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
[9/14/06 9:05:43:636 EDT] 00000025 TransactionMa I org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup instantiated TransactionManagerLookup
[9/14/06 9:05:43:652 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Automatic flush during beforeCompletion(): disabled
[9/14/06 9:05:43:652 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Automatic session close at end of transaction: disabled
[9/14/06 9:05:43:668 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC batch size: 15
[9/14/06 9:05:43:668 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC batch updates for versioned data: disabled
[9/14/06 9:05:43:683 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Scrollable result sets: enabled
[9/14/06 9:05:43:683 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings JDBC3 getGeneratedKeys(): disabled
[9/14/06 9:05:43:683 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Connection release mode: auto
[9/14/06 9:05:43:699 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Default batch fetch size: 1
[9/14/06 9:05:43:714 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Generate SQL with comments: disabled
[9/14/06 9:05:43:714 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Order SQL updates by primary key: disabled
[9/14/06 9:05:43:714 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[9/14/06 9:05:43:746 EDT] 00000025 ASTQueryTrans I org.hibernate.hql.ast.ASTQueryTranslatorFactory <init> Using ASTQueryTranslatorFactory
[9/14/06 9:05:43:746 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Query language substitutions: {}
[9/14/06 9:05:43:746 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Second-level cache: enabled
[9/14/06 9:05:43:746 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory buildSettings Query cache: disabled
[9/14/06 9:05:43:761 EDT] 00000025 SettingsFacto I org.hibernate.cfg.SettingsFactory createCacheProvider Cache provider: org.hibernate.cache.EhCacheProvider
[9/14/06 9:05:43:777 EDT] 00000025 XMLContentTre E com.xyz.jaxb.controller.XMLContentTreeBuilder parseXML XMLContentTreeBuilder.parseXML() - Exception null

STACK TRACE:
java.lang.NullPointerException
at com.xyz.hibernate.manager.HibernateDBManager.save(HibernateDBManager.java:222)
at com.xyz.jaxb.controller.XMLContentTreeBuilder.parseXML(XMLContentTreeBuilder.java:75)
at com.ibm._jsp._testPersistence._jspService(_testPersistence.java:69)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:673)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:178)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:252)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2954)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:221)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:210)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1912)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:84)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminaters(NewConnectionInitialReadCallback.java:207)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:109)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:566)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:619)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:952)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1039)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)

[9/14/06 9:05:43:839 EDT] 00000025 LocalTranCoor W WLTC0033W: Resource jdbc/acord rolled back in cleanup of LocalTransactionContainment.
[9/14/06 9:05:43:855 EDT] 00000025 LocalTranCoor W WLTC0032W: One or more local transaction resources were rolled back during the cleanup of a LocalTransactionContainment.


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

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.