You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Janet Song <sp...@silicomp.com.sg> on 2003/04/17 12:05:43 UTC

Database Rollback in WLS

Hi,

I'm using EJB with OJB deployed on Weblogic Server 7.0. I have this problem:

After i do a rollback with the PersistenceBroker.abortTransaction() when the
db transaction fails, the next time i invoke the update on the same table
with the correct fields (fields for a successful DB transaction), i am not
able to proceed anymore. This is the exception that i get continuously
regardless of correct or wrong input data.

<Apr 17, 2003 5:59:06 PM SGT> <Info> <EJB> <010051> <EJB Exception during
invocation from home: com.fedex.cih.ejb.ShipmentBean_6ssy2e_HomeImpl@29642c
threw exception: org.apache.ojb.broker.TransactionNotInProgressException:
ConnectionManager is NOT in transaction
org.apache.ojb.broker.TransactionNotInProgressException: ConnectionManager
is NOT in transaction
        at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.abortTransaction(Unknow
n Source)
        at
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.abortTransaction(
Unknown Source)
        at com.fedex.cih.ejb.ShipmentBean.setMDEDetails(Unknown Source)
        at
com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl.setMDEDetails(ShipmentBean_6ssy
2e_EOImpl.java:98)
        at
com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl_WLSkel.invoke(Unknown Source)
        at
weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
        at
weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
        at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:821)
        at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
        at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
0)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
>
<Apr 17, 2003 6:02:31 PM SGT> <Info> <Management> <140009> <Configuration
changes for domain saved to the repository.>


I tried clearing the cache with the clearCache() but no change. Any help is
appreciated.

regards,

Janet



Re: Database Rollback in WLS

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Janet,

could you post a code snip where this
happend?

regards,
Armin

----- Original Message -----
From: "Janet Song" <sp...@silicomp.com.sg>
To: "OJB Developers List" <oj...@db.apache.org>;
<oj...@db.apache.org>
Sent: Thursday, April 17, 2003 12:05 PM
Subject: Database Rollback in WLS


> Hi,
>
> I'm using EJB with OJB deployed on Weblogic Server 7.0. I have this
problem:
>
> After i do a rollback with the PersistenceBroker.abortTransaction()
when the
> db transaction fails, the next time i invoke the update on the same
table
> with the correct fields (fields for a successful DB transaction), i am
not
> able to proceed anymore. This is the exception that i get continuously
> regardless of correct or wrong input data.
>
> <Apr 17, 2003 5:59:06 PM SGT> <Info> <EJB> <010051> <EJB Exception
during
> invocation from home:
com.fedex.cih.ejb.ShipmentBean_6ssy2e_HomeImpl@29642c
> threw exception:
org.apache.ojb.broker.TransactionNotInProgressException:
> ConnectionManager is NOT in transaction
> org.apache.ojb.broker.TransactionNotInProgressException:
ConnectionManager
> is NOT in transaction
>         at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.abortTransaction(Un
know
> n Source)
>         at
>
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.abortTransact
ion(
> Unknown Source)
>         at com.fedex.cih.ejb.ShipmentBean.setMDEDetails(Unknown
Source)
>         at
>
com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl.setMDEDetails(ShipmentBean_
6ssy
> 2e_EOImpl.java:98)
>         at
> com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl_WLSkel.invoke(Unknown
Source)
>         at
> weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
>         at
> weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
>         at
>
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceMa
nage
> r.java:821)
>         at
>
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:3
08)
>         at
>
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.ja
va:3
> 0)
>         at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
> >
> <Apr 17, 2003 6:02:31 PM SGT> <Info> <Management> <140009>
<Configuration
> changes for domain saved to the repository.>
>
>
> I tried clearing the cache with the clearCache() but no change. Any
help is
> appreciated.
>
> regards,
>
> Janet
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>


Re: Database Rollback in WLS

Posted by Janet Song <sp...@silicomp.com.sg>.
Thx! here goes...

      try {
        broker = getBroker();
        broker.beginTransaction();
        .....
        broker.store(testObject);
        broker.commitTransaction();
      } catch(PersistenceBrokerException pbe) {
        if(broker != null)
        {
          // rollback in case of errors
          broker.abortTransaction();
          broker.clearCache();
          broker.close();
        }
        pbe.printStackTrace();
      } catch(Exception e) {
        if(broker != null)
        {
          // rollback in case of errors
          broker.abortTransaction();
          broker.clearCache();
          broker.close();
        }
        e.printStackTrace();
      } catch (Throwable t)   {
        if(broker != null)
        {
         // rollback in case of errors
          broker.abortTransaction();
          broker.clearCache();
          broker.close();
        }
        t.printStackTrace();
      } finally {
        if(broker != null)  {
          broker.close();
        }
      }

----- Original Message ----- 
From: "Armin Waibel" <ar...@code-au-lait.de>
To: "OJB Developers List" <oj...@db.apache.org>
Sent: Thursday, April 17, 2003 18:12
Subject: Re: Database Rollback in WLS


> Hi Janet,
> 
> could you post a code snip?
> Seems like a problem with PB-tx.
> 
> regards,
> Armin
> 
> ----- Original Message -----
> From: "Janet Song" <sp...@silicomp.com.sg>
> To: "OJB Developers List" <oj...@db.apache.org>;
> <oj...@db.apache.org>
> Sent: Thursday, April 17, 2003 12:05 PM
> Subject: Database Rollback in WLS
> 
> 
> > Hi,
> >
> > I'm using EJB with OJB deployed on Weblogic Server 7.0. I have this
> problem:
> >
> > After i do a rollback with the PersistenceBroker.abortTransaction()
> when the
> > db transaction fails, the next time i invoke the update on the same
> table
> > with the correct fields (fields for a successful DB transaction), i am
> not
> > able to proceed anymore. This is the exception that i get continuously
> > regardless of correct or wrong input data.
> >
> > <Apr 17, 2003 5:59:06 PM SGT> <Info> <EJB> <010051> <EJB Exception
> during
> > invocation from home:
> com.fedex.cih.ejb.ShipmentBean_6ssy2e_HomeImpl@29642c
> > threw exception:
> org.apache.ojb.broker.TransactionNotInProgressException:
> > ConnectionManager is NOT in transaction
> > org.apache.ojb.broker.TransactionNotInProgressException:
> ConnectionManager
> > is NOT in transaction
> >         at
> >
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.abortTransaction(Un
> know
> > n Source)
> >         at
> >
> org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.abortTransact
> ion(
> > Unknown Source)
> >         at com.fedex.cih.ejb.ShipmentBean.setMDEDetails(Unknown
> Source)
> >         at
> >
> com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl.setMDEDetails(ShipmentBean_
> 6ssy
> > 2e_EOImpl.java:98)
> >         at
> > com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl_WLSkel.invoke(Unknown
> Source)
> >         at
> > weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
> >         at
> > weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
> >         at
> >
> weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceMa
> nage
> > r.java:821)
> >         at
> >
> weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:3
> 08)
> >         at
> >
> weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.ja
> va:3
> > 0)
> >         at
> weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
> >         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
> > >
> > <Apr 17, 2003 6:02:31 PM SGT> <Info> <Management> <140009>
> <Configuration
> > changes for domain saved to the repository.>
> >
> >
> > I tried clearing the cache with the clearCache() but no change. Any
> help is
> > appreciated.
> >
> > regards,
> >
> > Janet
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-dev-help@db.apache.org
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 



[PATCH] Database Sequence HOWTO

Posted by Brian McCallister <mc...@forthillcompany.com>.
howto document to be added to xdocs/ attached. 

Re: Database Rollback in WLS

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Janet,

could you post a code snip?
Seems like a problem with PB-tx.

regards,
Armin

----- Original Message -----
From: "Janet Song" <sp...@silicomp.com.sg>
To: "OJB Developers List" <oj...@db.apache.org>;
<oj...@db.apache.org>
Sent: Thursday, April 17, 2003 12:05 PM
Subject: Database Rollback in WLS


> Hi,
>
> I'm using EJB with OJB deployed on Weblogic Server 7.0. I have this
problem:
>
> After i do a rollback with the PersistenceBroker.abortTransaction()
when the
> db transaction fails, the next time i invoke the update on the same
table
> with the correct fields (fields for a successful DB transaction), i am
not
> able to proceed anymore. This is the exception that i get continuously
> regardless of correct or wrong input data.
>
> <Apr 17, 2003 5:59:06 PM SGT> <Info> <EJB> <010051> <EJB Exception
during
> invocation from home:
com.fedex.cih.ejb.ShipmentBean_6ssy2e_HomeImpl@29642c
> threw exception:
org.apache.ojb.broker.TransactionNotInProgressException:
> ConnectionManager is NOT in transaction
> org.apache.ojb.broker.TransactionNotInProgressException:
ConnectionManager
> is NOT in transaction
>         at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.abortTransaction(Un
know
> n Source)
>         at
>
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.abortTransact
ion(
> Unknown Source)
>         at com.fedex.cih.ejb.ShipmentBean.setMDEDetails(Unknown
Source)
>         at
>
com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl.setMDEDetails(ShipmentBean_
6ssy
> 2e_EOImpl.java:98)
>         at
> com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl_WLSkel.invoke(Unknown
Source)
>         at
> weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
>         at
> weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
>         at
>
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceMa
nage
> r.java:821)
>         at
>
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:3
08)
>         at
>
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.ja
va:3
> 0)
>         at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
> >
> <Apr 17, 2003 6:02:31 PM SGT> <Info> <Management> <140009>
<Configuration
> changes for domain saved to the repository.>
>
>
> I tried clearing the cache with the clearCache() but no change. Any
help is
> appreciated.
>
> regards,
>
> Janet
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>
>


Re: Database Rollback in WLS

Posted by Armin Waibel <ar...@code-au-lait.de>.
Hi Janet,

could you post a code snip?
Seems like a problem with PB-tx.

regards,
Armin


----- Original Message -----
From: "Janet Song" <sp...@silicomp.com.sg>
To: "OJB Developers List" <oj...@db.apache.org>;
<oj...@db.apache.org>
Sent: Thursday, April 17, 2003 12:05 PM
Subject: Database Rollback in WLS


> Hi,
>
> I'm using EJB with OJB deployed on Weblogic Server 7.0. I have this
problem:
>
> After i do a rollback with the PersistenceBroker.abortTransaction()
when the
> db transaction fails, the next time i invoke the update on the same
table
> with the correct fields (fields for a successful DB transaction), i am
not
> able to proceed anymore. This is the exception that i get continuously
> regardless of correct or wrong input data.
>
> <Apr 17, 2003 5:59:06 PM SGT> <Info> <EJB> <010051> <EJB Exception
during
> invocation from home:
com.fedex.cih.ejb.ShipmentBean_6ssy2e_HomeImpl@29642c
> threw exception:
org.apache.ojb.broker.TransactionNotInProgressException:
> ConnectionManager is NOT in transaction
> org.apache.ojb.broker.TransactionNotInProgressException:
ConnectionManager
> is NOT in transaction
>         at
>
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.abortTransaction(Un
know
> n Source)
>         at
>
org.apache.ojb.broker.singlevm.DelegatingPersistenceBroker.abortTransact
ion(
> Unknown Source)
>         at com.fedex.cih.ejb.ShipmentBean.setMDEDetails(Unknown
Source)
>         at
>
com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl.setMDEDetails(ShipmentBean_
6ssy
> 2e_EOImpl.java:98)
>         at
> com.fedex.cih.ejb.ShipmentBean_6ssy2e_EOImpl_WLSkel.invoke(Unknown
Source)
>         at
> weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
>         at
> weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
>         at
>
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceMa
nage
> r.java:821)
>         at
>
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:3
08)
>         at
>
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.ja
va:3
> 0)
>         at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
> >
> <Apr 17, 2003 6:02:31 PM SGT> <Info> <Management> <140009>
<Configuration
> changes for domain saved to the repository.>
>
>
> I tried clearing the cache with the clearCache() but no change. Any
help is
> appreciated.
>
> regards,
>
> Janet
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
>
>
>