Defect #804
closed
Error in connector or in script is swallow
Added by Ondřej Kopr about 7 years ago.
Updated over 5 years ago.
Description
When call method in new transaction from transformation script and this method throw error is this error swallow and in logs is no mention about error.
Please check this behavior also in connector (for example in scripted)
When call method with throw error in transformation script get this error:
2017-11-01 12:57:56.925 ERROR 29778 --- [nio-8080-exec-2] e.b.i.c.s.e.AbstractScriptEvaluator : Exception [null value in entry: message=null]. Script code: [throwE], name: [throw exception], category: [TRANSFORM_TO]
2017-11-01 12:57:56.926 ERROR 29778 --- [nio-8080-exec-2] e.b.i.c.m.s.i.DefaultGroovyScriptService : Exception [null value in entry: message=null]
2017-11-01 12:57:56.933 DEBUG 29778 --- [nio-8080-exec-2] .m.m.a.ExceptionHandlerExceptionResolver : Resolving exception from handler [public org.springframework.http.ResponseEntity<?> eu.bcvsolutions.idm.core.rest.impl.IdmIdentityController.put(java.lang.String,eu.bcvsolutions.idm.core.api.dto.IdmIdentityDto)]: eu.bcvsolutions.idm.core.api.exception.ResultCodeException: Script has some errors: [null value in entry: message=null]
2017-11-01 12:57:56.939 DEBUG 29778 --- [nio-8080-exec-2] .m.m.a.ExceptionHandlerExceptionResolver : Invoking @ExceptionHandler method: org.springframework.http.ResponseEntity<eu.bcvsolutions.idm.core.api.dto.ResultModels> eu.bcvsolutions.idm.core.exception.ExceptionControllerAdvice.handle(eu.bcvsolutions.idm.core.api.exception.ResultCodeException)
2017-11-01 12:57:56.952 WARN 29778 --- [nio-8080-exec-2] e.b.i.c.e.ExceptionControllerAdvice : [274e9546-1134-438f-b5db-fff54c36b9e8]
eu.bcvsolutions.idm.core.api.exception.ResultCodeException: Script has some errors: [null value in entry: message=null]
at eu.bcvsolutions.idm.core.model.service.impl.DefaultGroovyScriptService.evaluate(DefaultGroovyScriptService.java:90)
In a provisioning archive isn't any error or success result.
Method:
@Override
@Transactional(propagation = Propagation.REQUIRES_NEW)
public void testThrowError() throws Exception {
throw new Exception();
}
- Is duplicate of Defect #514: Transaction - noRollbackOn added
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
After debug I found that error in scripts is at least reported to user (websocket) and isnt swallowed. Similar error in connector may occur only in virtual systems, but not in other connectors.
- Tracker changed from Task to Defect
- Category changed from 20 to Provisioning
Also available in: Atom
PDF