Hi all,
Meine App läuft auf WAS6.1. Ich setze Hibernate, Spring und EHCache ein. Die Connection läuft über eine DataSource welche auf meine Oracle DB zeigt. Ich verwende den OCI8 Treiber. Nun möchte ich meinen User auf der DB identified externally machen, also OS authentication aktivieren. Ich gebe nun also bei meiner datasource weder benutzername noch passwort an. Die eingerichtete DataSource funktioniert aus der Websphere Admin Console (Test Connection). Aus dem Programm heraus, also über hibernate, krieg ich keine Connection. Folgende Exception wird geraist. Kann mir jemand weiterhelfen? Unterstützt hibernate überhaupt OS Authentication? Meiner Meinung nach sollte das hibernate eigentlich nicht interessieren wenn die connection von einer DataSource kommt...
herzlichen Dank für eure Hinweise.
Gruss, gegel
Meine App läuft auf WAS6.1. Ich setze Hibernate, Spring und EHCache ein. Die Connection läuft über eine DataSource welche auf meine Oracle DB zeigt. Ich verwende den OCI8 Treiber. Nun möchte ich meinen User auf der DB identified externally machen, also OS authentication aktivieren. Ich gebe nun also bei meiner datasource weder benutzername noch passwort an. Die eingerichtete DataSource funktioniert aus der Websphere Admin Console (Test Connection). Aus dem Programm heraus, also über hibernate, krieg ich keine Connection. Folgende Exception wird geraist. Kann mir jemand weiterhelfen? Unterstützt hibernate überhaupt OS Authentication? Meiner Meinung nach sollte das hibernate eigentlich nicht interessieren wenn die connection von einer DataSource kommt...
herzlichen Dank für eure Hinweise.
Gruss, gegel
Code:
[7/21/08 10:40:49:976 MEST] 00000025 FreePool E J2CA0046E: Method createManagedConnectionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/apkMetaDS, throwing ResourceAllocationException. Original exception: <=================================>Exception Message -> null
java.lang.NullPointerException
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:94)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:70)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper$1.run(InternalGenericDataStoreHelper.java:884)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper.getPooledConnection(InternalGenericDataStoreHelper.java:921)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:1392)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1069)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1815)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1546)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2287)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:896)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:596)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:439)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:408)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:825)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:751)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1091)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:396)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:313)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
at com.ubs.swidapk.SpringUtil.<clinit>(SpringUtil.java:47)
at com.ubs.swidapk.business.services.ServiceFactory.getHibernateUtil(ServiceFactory.java:223)
at com.ubs.swidapk.persistency.hibernate.HibernateUtil.getInstance(HibernateUtil.java:61)
at com.ubs.swidapk.persistency.hibernate.HibernateUtil.getSession(HibernateUtil.java:149)
at com.ubs.swidapk.persistency.hibernate.HibernateUtil.getConnectionFromSession(HibernateUtil.java:395)
at com.ubs.swidapk.admin.beans.SsrdJMX.getConnectionUrl(SsrdJMX.java:212)
at com.ubs.swidapk.servlets.WelcomeServlet.doPost(WelcomeServlet.java:152)
at com.ubs.swidapk.servlets.WelcomeServlet.doGet(WelcomeServlet.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1074)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:543)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3357)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115)
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.HttpInboundLink.ready(HttpInboundLink.java:263)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
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:1473)
<=================================>
[7/21/08 10:40:49:995 MEST] 00000025 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident stream file /app/WAS/dyn/was61/6.1.0.13.0/profiles/Node_Mit01/logs/ffdc/as_apkapl_00000025_08.07.21_10.40.49_1.txt
[7/21/08 10:40:50:030 MEST] 00000025 ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file /app/WAS/dyn/was61/6.1.0.13.0/profiles/Node_Mit01/logs/ffdc/as_apkapl_00000025_08.07.21_10.40.49_1.txt
[7/21/08 10:40:53:954 MEST] 00000025 FreePool E J2CA0046E: Method createManagedConnectionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/apkMetaDS, throwing ResourceAllocationException. Original exception: <=================================>Exception Message -> null
java.lang.NullPointerException
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:94)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:70)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper$1.run(InternalGenericDataStoreHelper.java:884)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper.getPooledConnection(InternalGenericDataStoreHelper.java:921)
at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getPooledConnection(WSRdbDataSource.java:1392)
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:1069)
at com.ibm.ejs.j2c.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1815)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1546)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:2287)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:896)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:596)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:439)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:408)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:50)
at $Proxy4.createStatement(Unknown Source)
at com.ubs.swidapk.persistency.hibernate.HibernateUtil.getSession(HibernateUtil.java:163)
at com.ubs.swidapk.persistency.hibernate.HibernateUtil.getConnectionFromSession(HibernateUtil.java:395)
at com.ubs.swidapk.persistency.hibernate.HibernateUtil.getInstance(HibernateUtil.java:64)
at com.ubs.swidapk.persistency.hibernate.HibernateUtil.getSession(HibernateUtil.java:149)
at com.ubs.swidapk.persistency.hibernate.HibernateUtil.getConnectionFromSession(HibernateUtil.java:395)
at com.ubs.swidapk.admin.beans.SsrdJMX.getConnectionUrl(SsrdJMX.java:212)
at com.ubs.swidapk.servlets.WelcomeServlet.doPost(WelcomeServlet.java:152)
at com.ubs.swidapk.servlets.WelcomeServlet.doGet(WelcomeServlet.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1074)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:543)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3357)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115)
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.HttpInboundLink.ready(HttpInboundLink.java:263)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
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:1473)
<=================================>