Hi,
 
Here is my case :
 
I have one method on a bean that is accessing a CMR collection on an entity.
That method declares Never as tx attribute and basically does :
 
method()
{
    Collection c = somebean.getAttributes();
    c.add(...);
}
 
the problem is with the Never tx attribute.
 
getAttributes() returns an instance of RelationSet. When I call add on that object
that calls the createRelationLinks method on the related cmrField which calls
invokeAddRelation on itself.
 
That creates an Invocation that will goes in the interceptor chain. That invocation
does not have the method attribute set, therefore when the TxInterceptor catch
that Invocation and get its tx attribute it gets TX_SUPPORT, that means that
no transaction is associated with that call, so tx object is null.
 
 After that, the JDBCStoreManager catch the Invocation and at line 213
uses the transaction object : int status = tx.getStatus();
 
 And of course raises a NullPointerException.
 
 It seems that either the add() should have an associated method with
a different transaction attribute or the jdbcstoremanager should verify
that the tx object is not null before making use of it.
 
regards
 
Julien
 

Reply via email to