Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Weird Problem

1 view
Skip to first unread message

Rupesh

unread,
Jun 5, 2002, 10:03:51 AM6/5/02
to
Hi,
I am facing a very weird problem. I have two datasources defined on the
server which
are pointing to two different databases. one to Oracle and other to
cloudscape.
I have a simple app which has
AccountBean - CMP
TransferBean - SLS
LedgerBean - SFS

First I use datasource "orcl" i.e oracle in my deployment descriptor and
deploy my application.
The application runs fine. Then I undeploy the application, change the
deployment descriptor
to point to 2nd datasource "cloud " i.e cloudscape. After deploying this,
findAllAccounts() on
AccountBean still gets the data from the old datasource i.e oracle.
Why does this happen even if there is no reference to the old dataSource
inside my app any more?

There is another problem...
For LedgerBean a resource-ref has been defined and on every TX, it looks up
for this,
gets the connection and makes an entry into Ledger Table. Whenever I try to
do a Tx,
it throws an exception which i am pasting below.

There is also a method (not in a Tx) in LedgerBean which shows all the
entries in ledgerTable, again by looking up for resource-ref and then
getting the connection. This always shows the correct data from the correct
DB.


java.rmi.RemoteException: EJB Exception:; nested exception is:
java.rmi.RemoteException: Exception in afterBegin:
java.rmi.RemoteException: Connection has already been created in this tx
context for pool named orcl. Illegal attempt to create connection from
another pool: cloud; nested exception is:
java.sql.SQLException: Connection has already been created in this tx
context for pool named orcl. Illegal attempt to create connection from
another pool: cloud
java.sql.SQLException: Connection has already been created in this tx
context for pool named orcl. Illegal attempt to create connection from
another pool: cloud
at weblogic.jdbc.jts.Driver.getExistingConnection(Driver.java:292)
at weblogic.jdbc.jts.Driver.connect(Driver.java:123)
at
weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java
:214)
at proton.bank.LedgerBean.afterBegin(LedgerBean.java:150)
at
proton.bank.LedgerBean_txdag7_Impl.afterBegin(LedgerBean_txdag7_Impl.java:10
5)
at
weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessionManag
er.java:366)
at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:117)
at
weblogic.ejb20.internal.StatefulEJBObject.preInvoke(StatefulEJBObject.java:1
69)
at
proton.bank.LedgerBean_txdag7_EOImpl.createEntry(LedgerBean_txdag7_EOImpl.ja
va:25)
at proton.bank.TransferBean.transfer(TransferBean.java:57)
at
proton.bank.TransferBean_wqokv9_EOImpl.transfer(TransferBean_wqokv9_EOImpl.j
ava:37)
at proton.bank.TransferBean_wqokv9_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:288)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
:93)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:257)
at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:158)
at weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:253)
at
weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
:220)
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy123.transfer(Unknown Source)
at jsp_servlet._transfer._jspService(_transfer.java:134)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:263)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2390)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1959)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

Any Explanation ?? Does this mean that every time I have to restart the
server ?
I am using WL6.1 SP2

Regards,
Rupesh


0 new messages