cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daan Hoogland <>
Subject [QUESTION][DB] transaction rollback occurs late
Date Thu, 08 May 2014 08:51:34 GMT
H all,

consider the folowing please

A network is created and used

                       privateNetwork =
_networkMgr.createGuestNetwork(ntwkOffFinal.getId(), networkName,
displayText, gateway, cidr, uriString, null, owner, null, pNtwk,
ACLType.Account, null, vpcId, null, null, true, null);
            s_logger.debug("Created private network " + privateNetwork);

the next line[3987] in the logic is (there is an else block in between):
        PrivateIpVO privateIp =
startIp, vpcId);

the sequence logs as follows:

log succes return of npe
log the roll back
log an npe on the object just returned and logged

2014-04-30 21:38:37,417 DEBUG [c.c.n.NetworkServiceImpl]
(catalina-exec-17:ctx-d1365378 ctx-664fada1 ctx-e0adfbee) Created
private network Ntwk[cf4d60e1-9d4a-46de-85bc-910a6ea44024|Guest|5]
2014-04-30 21:38:37,433 DEBUG [c.c.u.d.T.Transaction]
(catalina-exec-17:ctx-d1365378 ctx-664fada1 ctx-e0adfbee) Rolling back
the transaction: Time = 209 Name = catalina-exec-17; called by
2014-04-30 21:38:37,452 ERROR [c.c.a.ApiServer]
(catalina-exec-17:ctx-d1365378 ctx-664fada1 ctx-e0adfbee) unhandled
exception executing api command: [Ljava.lang.String;@1925edc3

it can of course be the _privateIpDao but I am trusting spring and the
class strucutre here. there is no logic between the two lines. so
privateNetwork must be the null involved in the npe. It has just been
logged and *after that* rolled back.
So in parallel to the network object being successfully returned the
transaction is being rolled back. What evil genius has been at work
here??? Or how stupid am I?

I am sure similar issues must have been discussed earlier. any
pointers? How can/Should I make sure an object returned is indeed


View raw message