-->
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: Indirect jndi call for datasource doesnt work w/WAS 6.1
PostPosted: Wed Nov 21, 2007 12:47 am 
Newbie

Joined: Tue Nov 20, 2007 4:18 pm
Posts: 2
Hibernate version: 3.2.5

Mapping documents:
<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.WebSphereExtendedJTATransactionLookup</property>
<property name="connection.datasource">jdbc/dbn</property>

Full stack trace of any exception that occurs:

Name and version of the database you are using: MS Sql Server 2000 and we are using MS Sqlserver 2005 drivers

Websphere 6.1

Linux Redhat V4

When we change the datasource to indirect jndi lookup hibernate fails to initialize
<property name="connection.datasource">java:comp/env/jdbc/dbn</property>

but it works when we change it to
<property name="connection.datasource">jdbc/dbn</property>

Are we doing anything wrong? Any help is greatly appreciated.

thanks


Top
 Profile  
 
 Post subject: The Exception is added below.
PostPosted: Mon Dec 03, 2007 10:29 pm 
Newbie

Joined: Tue Nov 20, 2007 4:18 pm
Posts: 2
03 Dec 2007 21:04:07,999 FATAL DatasourceConnectionProvider:configure 55 - Could not find datasource: java:comp/env/jdbc/mydbname
javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".
at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1767)
at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1083)
at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:991)
at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263)
at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204)
at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at com.ms.epr.db.dao.HibernateUtil.<clinit>(HibernateUtil.java:18)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at com.ms.epr.core.ReviewCycleMgr.getReviewCycleId(ReviewCycleMgr.java:160)
at com.ms.epr.core.ReviewCycleMgr.GetReviewCycle(ReviewCycleMgr.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.waveset.util.Reflection.invoke(Reflection.java:885)
at com.waveset.util.Reflection.invoke(Reflection.java:846)
at com.waveset.expression.ExInvoke.evalInternal(ExInvoke.java:171)
at com.waveset.expression.ExNode.eval(ExNode.java:79)
at com.waveset.expression.ExFunction$f_isnull.evalInternal(ExFunction.java:906)
at com.waveset.expression.ExNode.eval(ExNode.java:79)
at com.waveset.expression.ExNode.evalToBoolean(ExNode.java:464)
at com.waveset.object.Form$Field.isDisabled(Form.java:2329)
at com.waveset.object.FieldIterator.pushField(FieldIterator.java:525)
at com.waveset.object.FieldIterator.advance(FieldIterator.java:414)
at com.waveset.object.FieldIterator.hasNext(FieldIterator.java:211)
at com.waveset.view.UserViewConverter.getAccountSpecificAttributes(UserViewConverter.java:4660)
at com.waveset.view.UserViewConverter.buildGlobal(UserViewConverter.java:3029)
at com.waveset.view.UserViewer.assembleView(UserViewer.java:933)
at com.waveset.view.UserViewer.getView(UserViewer.java:794)
at com.waveset.object.ViewMaster.getView(ViewMaster.java:549)
at com.waveset.session.LocalSession.getView(LocalSession.java:582)
at com.waveset.ui.util.GenericViewSource.getView(GenericViewSource.java:445)
at com.waveset.ui.web.user.MainMenu$XViewSource.<init>(MainMenu.java:79)
at com.waveset.ui.web.user.MainMenu.createViewSource(MainMenu.java:100)
at com.waveset.ui.util.GenericEditForm.getViewSource(GenericEditForm.java:238)
at com.waveset.ui.util.GenericEditForm.process(GenericEditForm.java:449)
at com.ibm._jsp._main._jspService(_main.java:352)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:930)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:498)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:205)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3252)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:264)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:112)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
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:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)


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.