Hi, all!
I didn't find any thread with this issue! So, if someone has answered this question, please excuse-me and point me to the right place!
Here is the question?
how to call a service method already wrapped in transaction from another one?
The situation:
The class MovementStockManger has this method
public void processMovementStock(MovementStock movementStock) throws WithoutItemToProcessException;.
And the class MovementSaleManger has this method
public void processMovementSale(MovementSale movementSale) throws WithoutItemToProcessException;.
So, inside the last one I do this call:
But I'm getting strange errors in the view:Code:. . MovementStock movementStock = new MovementStock (); // set required fields movementStock .setMovementSaleID(movementSale.getMovementSaleID()); movementStockManger.processMovementStock(movementStock); . . saveMovementSale (movementSale);
Code:java.lang.NullPointerException at org.appfuse.service.impl.MovementSaleManagerImpl.processMovementSale(MovementSaleManagerImpl.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
Any idea how to solve this issue?
Gilberto


Reply With Quote