• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about authentication failure when using hibernate on Weblogic8.1

 
Robert Strong
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using hibernate within Stateless session beans on Weblogic8.1, my hibernate.cfg.xml like below, and I got a warning could not obtain connection metadata and a SQLException, authentication failure, while I'm pretty sure datasource is configured right. any help appreciated!!!

<hibernate-configuration>
<session-factory name="foo">
<property name="transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
<property name="transaction.manager_lookup_class">net.sf.hibernate.transaction.WeblogicTransactionManagerLookup</property>
<property name="connection.datasource">EMartSource</property>
<property name="show_sql">true</property>
<property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>
<mapping resource="com/emart/hibernate/Category.hbm.xml"/>
</session-factory>
</hibernate-configuration>


WARN SettingsFactory:107 - Could not obtain connection metadata
java.sql.SQLException: User: emart, failed to be authenticated.
at weblogic.jdbc.common.internal.RmiDataSource.getSubject(RmiDataSource.java:264)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:195)
at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:56)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1172)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:803)
at com.emart.ejb.session.CatSLSBBean.getCategories(CatSLSBBean.java:39)
at com.emart.ejb.session.CatSLSB_rk9pn4_EOImpl.getCategories(CatSLSB_rk9pn4_EOImpl.java:45)
at com.emart.ejb.session.CatSLSB_rk9pn4_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
at com.emart.ejb.session.CatSLSB_rk9pn4_EOImpl_813_WLStub.getCategories(Unknown Source)
at com.emart.jsf.ui.InitializationServlet.performInitialization(InitializationServlet.java:39)
at com.emart.jsf.ui.InitializationServlet.init(InitializationServlet.java:26)
at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1018)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:894)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:873)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:812)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3281)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3238)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3224)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3207)
at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5737)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:874)
at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2106)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2147)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2434)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2352)
at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2136)
at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2235)
at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2130)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2315)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic