This looks like a really weird issue.
From the two stacktraces (exception as well as normal), I see that the difference boils down to the kind of wrapper class that is used by weblogic. The Positive Case trace that you have provided does not log the actual connection retrieval. I wanted to see the lines that happen in this sequence
at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:405)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:234)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:217)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:50)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy71.getUserByIdAndPassword(Unknown Source)
at com.hli.fm.web.common.delegator.LoginDelegator.getUserByIdAndPassword(LoginDelegator.java:54)
at com.hli.fm.web.common.action.LoginAction.execute(LoginAction.java:64)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
So here’s a question, out of ignorance: Do you have the DataSource and the Application on the same instance of the server? It seems that they may be different because the wrapper driver Weblogic returns on the error condition is a connection through a remote stub. In the snippet below, it seems that weblogic returns an RMI Datasource Wrapper (and I thought it shouldn’t…if the app and the datasource are present on the same instance). A detailed info of this is provided here:
http://www.inf.fu-berlin.de/lehre/WS00/ ... C_RMI.htmlIt seems that although you provide a T3 protocol, it still goes ahead and uses RMI. Try the second method wherein you let the I would suggest following up with the Oracle-Weblogic team again. As a workaround, try if configuring the RMI Driver to be used (instead of a JNDI template) helps in obtaining connections. I wouldn’t know how to define this bean correctly though.
java.lang.ClassCastException: weblogic.jdbc.common.internal.RmiDataSource cannot be cast to weblogic.rmi.extensions.server.RemoteWrapper
at weblogic.rmi.cluster.BasicReplicaHandler.refreshReplicaList(BasicReplicaHandler.java:513)
at weblogic.rmi.cluster.BasicReplicaHandler.failOver(BasicReplicaHandler.java:206)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:264)
at weblogic.jdbc.common.internal.RmiDataSource_1030_WLStub.getConnection(Unknown Source)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:80)