TaskUtils$LoggingErrorHandler.handleError() - Unexpected error occurred in scheduled task - spring

I got an error TaskUtils$LoggingErrorHandler.handleError() - Unexpected error occurred in scheduled task with the following task by using Spring #Scheduled (version 5.3.14)
#Scheduled(cron = "${delete.tmpdir.cron.expression}")
public void deleteTempFiles() {
LOGGER.info("==> cron(deleteTempFiles) is executing time={}", new Date());
LOGGER.debug("test1");
LOGGER.debug("java.io.tmpdir: {}", System.getProperty("java.io.tmpdir"));
LOGGER.debug("test2");
File tmpFolder = new File(System.getProperty("java.io.tmpdir"));
if (tmpFolder != null && tmpFolder.exists()) {
LOGGER.debug("tmpFolder: {}, isFile:{}, isDirectory:{}", tmpFolder, tmpFolder.isFile(), tmpFolder.isDirectory());
} else {
LOGGER.warn("tmpFolder is null or not exists");
}
try {
LOGGER.debug("listFiles a");
File[] list = tmpFolder.listFiles(new XYZFileFilter());
LOGGER.debug("listFiles b");
if (list != null) {
for (File file : list) {
if (file.isFile()) {
LOGGER.debug("deleteTempFiles1 {}", file.getAbsolutePath());
boolean ret = file.delete();
LOGGER.debug("deleteTempFiles2 {} : {}", file.getAbsolutePath(), ret);
}
}
}
LOGGER.debug("listFiles z");
} catch (Exception e) {
LOGGER.warn("Exception: {}", e.getMessage());
}
LOGGER.info("<== cron(deleteTempFiles) is executing time={}", new Date());
}
/**
* File "xyz_*" > 1d
* */
class XYZFileFilter implements FilenameFilter {
private static Logger LOGGER = LoggerFactory.getLogger(XYZFileFilter.class);
public boolean accept(File dir, String name) {
LOGGER.debug("accept {}", name);
try {
if (name !=null && name.startsWith("xyz_")) {
Calendar calendar = Calendar.getInstance();
calendar.add(Calendar.DATE, -1);
File file = new File(dir, name);
if (file.isFile() && calendar.getTimeInMillis() > file.lastModified()) { // file >= 1d
return true;
}
}
return false;
} catch (Exception e) {
return false;
}
}
}
logs
[INFO ] 2022-01-10 23:40:00,008 TestCronImpl.deleteTempFiles() - ==> cron(deleteTempFiles) is executing time=2022-01-10T23:40:00.008+0100
[DEBUG] 2022-01-10 23:40:00,008 TestCronImpl.deleteTempFiles() - test1
[DEBUG] 2022-01-10 23:40:00,008 TestCronImpl.deleteTempFiles() - java.io.tmpdir: C:\Users\XXX\AppData\Local\Temp\
[DEBUG] 2022-01-10 23:40:00,009 TestCronImpl.deleteTempFiles() - test2
[DEBUG] 2022-01-10 23:40:00,009 TestCronImpl.deleteTempFiles() - tmpFolder: C:\Users\XXX\AppData\Local\Temp, isFile:false, isDirectory:true
[DEBUG] 2022-01-10 23:40:00,009 TestCronImpl.deleteTempFiles() - listFiles a
[ERROR] 2022-01-10 23:40:00,010 TaskUtils$LoggingErrorHandler.handleError() - Unexpected error occurred in scheduled task
when i comment 'try catch' bloc, this task is termined correctly ...
i don't why? and how can i fix it?
thanks

Related

GraphQL.ExecutionError: Error trying to resolve

Summary:
My GraphQL ExecuteAsync returns a result that contains. According to the stackTrace provided below, the system cannot resolve my custom type remitsGeneralSearch. The remitsGeneralSearch resolver can return a type called ClaimPaymentOrCheckSearchGraphType which is a UnionGraphType.
StackTrace:
["GraphQL.ExecutionError: Error trying to resolve remitsGeneralSearch.\n ---> System.InvalidOperationException: Unexpected type: \n at GraphQL.Execution.ExecutionStrategy.BuildExecutionNode(ExecutionNode parent, IGraphType graphType, Field field, FieldType fieldDefinition, String[] path)\n at GraphQL.Execution.ExecutionStrategy.SetSubFieldNodes(ExecutionContext context, ObjectExecutionNode parent, Dictionary`2 fields)\n at GraphQL.Execution.ExecutionStrategy.SetSubFieldNodes(ExecutionContext context, ObjectExecutionNode parent)\n at GraphQL.Execution.ExecutionStrategy.ExecuteNodeAsync(ExecutionContext context, ExecutionNode node)\n --- End of inner exception stack trace ---"]4008305)
GraphQL Version: 2.4.0
FrameWork: .Net
OS: MacOS Catalina
Links Referenced: https://github.com/graphql-dotnet/graphql-dotnet/issues/964
CODE SNIPPETS:
RESOLVER:
FieldAsync<ClaimPaymentOrCheckSearchGraphType>(
"remitsGeneralSearch",
resolve: async context =>
{
var securityFilter = await GetUserRemitFilters(context);
var range = context.GetRange();
var sortFields = context.GetArgument<List<SortField>>("sort") ?? Enumerable.Empty<SortField>();
var whereClaimPayment = context.GetArgument<ClaimPaymentSearchFilter>("whereClaimPayment");
Connection<ClaimPaymentSearchRow> claimPaymentSearchRowResult;
try
{
using (LogContext.PushProperty("where", whereClaimPayment, true))
{
//claimPaymentSearchRowResult = await DMAQueryService.GetRemitReadersAsync(context);
var whereArguments = context.Arguments["whereClaimPayment"] as Dictionary<string, object>;
claimPaymentSearchRowResult = await DMAQueryService.GetRemitReadersAsync(
range,
whereClaimPayment,
whereArguments,
sortFields,
securityFilter,
context.CancellationToken
);
}
}
catch (Exception e)
{
_logger.LogInformation("Exception occurred {e}", e);
throw e;
}
var userRemitFilters = context.UserContext as Services.DMA.UserRemitFilters;
if (claimPaymentSearchRowResult.EdgeCount > 0)
{
return claimPaymentSearchRowResult;
}
var _whereCheckSearch = context.GetArgument<CheckSearchFilter>("whereCheck");
try
{
Connection<CheckSearchRow> checkSearchRowResult;
using (LogContext.PushProperty("whereCheck", _whereCheckSearch, true))
{
checkSearchRowResult = await DMAQueryService.GetCheckReadersAsync(context);
return checkSearchRowResult;
}
}
catch (Exception e)
{
throw e;
}
},arguments: queryArguments
);
}
catch (Exception e)
{
throw e;
}
Custom GraphType:
[Transient]
public class ClaimPaymentOrCheckSearchGraphType : UnionGraphType
{
private readonly ILogger<ClaimPaymentOrCheckSearchGraphType> _logger;
public ClaimPaymentOrCheckSearchGraphType(
ILogger<ClaimPaymentOrCheckSearchGraphType> logger,
ConnectionGraphType<ClaimPaymentSearchGraphType> claimPaymentSearchGraphType,
ConnectionGraphType<CheckSearchGraphType> checkSearchGraphType
)
{
_logger = logger;
Type<ConnectionGraphType<ClaimPaymentSearchGraphType>>();
Type<ConnectionGraphType<CheckSearchGraphType>>();
ResolveType = obj =>
{
try
{
if (obj is Connection<ClaimPaymentSearchRow>)
{
return claimPaymentSearchGraphType;
}
if (obj is Connection<CheckSearchRow>)
{
return checkSearchGraphType;
}
throw new ArgumentOutOfRangeException($"Could not resolve graph type for {obj.GetType().Name}");
}
catch (Exception e)
{
_logger.LogInformation("ClaimPaymentOrCheckSearchGraphType Exception {e}: ", e);
throw e;
}
};
}
}
Link to answer found here: https://github.com/graphql-dotnet/graphql-dotnet/issues/2674Try replacing this:
Type<ConnectionGraphType<ClaimPaymentSearchGraphType>>();
Type<ConnectionGraphType<CheckSearchGraphType>>();
with this:
AddPossibleType(claimPaymentSearchGraphType);
AddPossibleType(checkSearchGraphType);
I'm thinking that if you're registering these types as transients, then the copy that gets registered to the schema initialization code is a different copy that gets returned from ResolveType. Because of that, its fields' ResolvedType properties was never set, and so null is passed into BuildExecutionNode for the graphType instead of a resolved type.
If the ResolveType method could return a type rather than an instance, there wouldn't be an issue, but unfortunately that's not the way it works. Or you could register the type as a singleton.

How to apply compatplaylist to HwCertTestCollection

For HLK testing automation I would like to apply the compatplaylist on my test list.
Generell automation instruction, but no info how to apply a playlist.
One option is to modify the master test list based on the compatplaylist - both are xml based (with the help of Export-HwCertTestCollectionToXml and import-hwcerttestcollectionfromxml),
But maybe somebody already has a solution or knows an offical support for it.
Try this:-
public static PlaylistManager ApplyPlaylist(Project projectname, string playlistpath)
{
PlaylistManager pl_manager = null;
try
{
pl_manager = new PlaylistManager(projectname);
if (pl_manager == null)
Console.WriteLine("Cannot make playlist manager for the project:- {0}", projectname.Name.ToString());
if(pl_manager.IsPlaylistLoaded() == true)
{
Console.WriteLine("Playlist loaded.. unloading ");
pl_manager.UnloadPlaylist();
if (pl_manager.IsPlaylistLoaded() == false)
Console.WriteLine("Unloaded successfully");
}
else
{
if (File.Exists(playlistpath))
{
pl_manager.LoadPlaylist(playlistpath);
if (pl_manager.IsPlaylistLoaded() == false)
Console.WriteLine("Error in applying playlist:- {0}", playlistpath);
else
Console.WriteLine("Loaded playlist:- {0}", playlistpath);
}
else
{
Console.WriteLine("ERROR!Playlist file {0} not found!", playlistpath);
return pl_manager;
}
}
}
catch(Exception e)
{
Console.WriteLine("Exception:-{0}", e.ToString());
}
return pl_manager;
}

Xamarin(PCL) - Signal R - System.InvalidOperationExceptionConnection started reconnecting before invocation result was received

I am getting System.InvalidOperationExceptionConnection started reconnecting before invocation result was received exception sometimes with Signal R chat, i am using Signal R client in PCL of Xamarin Project
Here is Chat service class-
public class ChatService : IChatService
{
private IHubProxy _hubProxy;
private HubConnection _hubConnection;
private readonly IMobileServiceClient _mobileClient;
private readonly IInsightsService _insightsService;
private readonly IChatMessageRepository _chatRepository;
public ChatService(IMobileServiceClient mobileClient, IInsightsService insightsService, IChatMessageRepository chatRepository)
{
_insightsService = insightsService;
_mobileClient = mobileClient;
_chatRepository = chatRepository;
}
public event EventHandler<ChatMessage> MessageReceived;
public async Task Connect(bool dismissCurrentConnection = false)
{
try
{
if (!CrossConnectivity.Current.IsConnected)
{
return;
}
// Always create a new connection to avoid SignalR close event delays
if (_hubConnection != null)
{
if (!dismissCurrentConnection)
{
return;
}
_hubConnection.StateChanged -= OnConnectionStateChangedHandler;
_hubConnection.Reconnected -= OnReconnectedHandler;
// DON´T call connection.Dispose() or it may block for 20 seconds
_hubConnection = null;
_hubProxy = null;
}
_hubConnection = new HubConnection(Identifiers.Environment.ChatUrl);
// connection.TransportConnectTimeout = TimeSpan.FromSeconds(5);
_hubConnection.TraceWriter = new DebugTextWriter("SignalR");
_hubConnection.TraceLevel = TraceLevels.All;
_hubConnection.StateChanged += OnConnectionStateChangedHandler;
_hubConnection.Reconnected += OnReconnectedHandler;
if (_mobileClient.CurrentUser == null)
throw new Exception("MobileClient.CurrentUser null. You have to login to Azure Mobile Service first.");
_hubConnection.Headers[HttpHeaders.XZumoAuth] = _mobileClient.CurrentUser.MobileServiceAuthenticationToken;
_hubProxy = _hubConnection.CreateHubProxy(Identifiers.ChatHubName);
_hubProxy.On<ChatMessage>("addMessage", message =>
{
MessageReceived?.Invoke(this, message);
});
if (_hubConnection.State == ConnectionState.Disconnected)
{
await _hubConnection.Start();
}
}
catch (Exception ex)
{
_insightsService.ReportException(ex);
}
}
private async void OnConnectionStateChangedHandler(StateChange change)
{
if (_mobileClient?.CurrentUser != null && change.NewState == ConnectionState.Disconnected && CrossConnectivity.Current.IsConnected)
{
// SignalR doesn´t do anything after disconnected state, so we need to manually reconnect
await Connect(true);
}
}
private void OnReconnectedHandler()
{
Debug.WriteLine("[SignalR] SignalR Reconnected to Hub: {0}", Identifiers.ChatHubName);
}
public async Task SendMessage(ChatMessage message)
{
try
{
if (_hubConnection.State == ConnectionState.Disconnected)
{
await Connect(true);
}
await _hubProxy.Invoke("Send", message);
}
catch (Exception ex)
{
try
{
await _chatRepository.InsertAsync(message);
}
catch (Exception ex2)
{
_insightsService.ReportException(ex);
_insightsService.ReportException(ex2);
throw ex;
}
}
}
public async Task JoinChatRoom(string chatRoomId)
{
try
{
if (_hubConnection.State == ConnectionState.Disconnected)
{
await Connect(true);
}
await _hubProxy.Invoke("JoinChatRoom", chatRoomId);
}
catch (Exception ex)
{
_insightsService.ReportException(ex);
}
}
public async Task LeaveChatRoom(string chatRoomId)
{
try
{
if (_hubConnection.State == ConnectionState.Disconnected)
{
await Connect(true);
}
await _hubProxy.Invoke("LeaveChatRoom", chatRoomId);
}
catch (Exception ex)
{
_insightsService.ReportException(ex);
}
}
public void Disconnect()
{
try
{
if (_hubConnection != null && _hubConnection.State != ConnectionState.Disconnected)
_hubConnection.Stop();
}
catch (Exception ex)
{
_insightsService.ReportException(ex);
}
}
}
How can i prevent and catch this exception? this is not always though

Resource Filtering with own plugin

Currently i develop my own plugin which will do resource filtering with loading of a an other file which influence the resource filtering.
I have the following code in my plugin (execute) method:
public void execute() throws MojoExecutionException {
if (StringUtils.isEmpty(encoding) && isFilteringEnabled(getResources())) {
getLog().warn(
"File encoding has not been set, using platform encoding "
+ ReaderFactory.FILE_ENCODING
+ ", i.e. build is platform dependent!");
}
Scope scope = convertToScope(getScope());
getLog().info("Hallo welt. (" + scope + ")");
if (getResources() != null) {
for (Resource item : getResources()) {
getLog().info(" --| Resource: " + item.getFiltering() + "|" + item.getDirectory());
}
}
try {
MavenResourcesExecution mavenResourcesExecution = new MavenResourcesExecution(
resources, outputDirectory, project, encoding, null,
nonFilteredFileExtensions, mavenSession);
ValueSource valueSource = new ValueSource() {
#Override
public Object getValue(String expression) {
getLog().info("Expression: " + expression);
return "XXX";
}
#Override
public List getFeedback() {
getLog().info("getFeedback()");
return Collections.EMPTY_LIST;
}
#Override
public void clearFeedback() {
// TODO Auto-generated method stub
getLog().info("clearFeedback()");
}
};
mavenResourcesExecution.addFilerWrapperWithEscaping(valueSource,
"\\#", "\\#", "#", false);
mavenResourcesExecution.setUseDefaultFilterWrappers(false);
mavenResourcesFiltering.filterResources(mavenResourcesExecution);
} catch (MavenFilteringException e) {
throw new MojoExecutionException(e.getMessage(), e);
}
}
But during my integration tests the filtering will not be done. In my output i can't find the output of getValue(), getFeedback() etc.
Currently the output during my integration test looks like:
[INFO] Hallo welt. ()
[INFO] --| Resource: true|src/main/resource-files
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[DEBUG] resource with targetPath null
directory src/main/resource-files
excludes []
includes []
[DEBUG] ignoreDelta true
[INFO] Copying 1 resource
[DEBUG] file thisIsTheFirst.properties has a filtered file extension
[DEBUG] filtering ..it\configurationTest\src\main\resource-files\thisIsTheFirst.properties to ...\it\configurationTest\target\classes\thisIsTheFirst.properties
But unfortunately the getValue() method is not called in this case.
So the question is: Does someone has an idea what i'm doing wrong ? (Full source is available here.
The solution is NOT to use regular expressions:
mavenResourcesExecution.addFilerWrapperWithEscaping(valueSource, "#", "#", "#", false);

OWSM custom security policy for JAX-WS, GenericFault

I tried creating custom security and policy as given here:
http://download.oracle.com/docs/cd/E15523_01/relnotes.1111/e10132/owsm.htm#CIADFGGC
when I run the service client custom assertion is executed, returning successfully.
public IResult execute(IContext context) throws WSMException {
try {
System.out.println("public execute");
IAssertionBindings bindings =
((SimpleAssertion)(this.assertion)).getBindings();
IConfig config = bindings.getConfigs().get(0);
IPropertySet propertyset = config.getPropertySets().get(0);
String valid_ips =
propertyset.getPropertyByName("valid_ips").getValue();
String ipAddr = ((IMessageContext)context).getRemoteAddr();
IResult result = new Result();
System.out.println("valid_ips "+valid_ips);
if (valid_ips != null && valid_ips.trim().length() > 0) {
String[] valid_ips_array = valid_ips.split(",");
boolean isPresent = false;
for (String valid_ip : valid_ips_array) {
if (ipAddr.equals(valid_ip.trim())) {
isPresent = true;
}
}
System.out.println("isPresent "+isPresent);
if (isPresent) {
result.setStatus(IResult.SUCCEEDED);
} else {
result.setStatus(IResult.FAILED);
result.setFault(new WSMException(WSMException.FAULT_FAILED_CHECK));
}
} else {
result.setStatus(IResult.SUCCEEDED);
}
System.out.println("result "+result);
System.out.println("public execute complete");
return result;
} catch (Exception e) {
System.out.println("Exception e");
e.printStackTrace();
throw new WSMException(WSMException.FAULT_FAILED_CHECK, e);
}
}
Console output is:
public execute valid_ips
127.0.0.1,192.168.1.1 isPresent true result Succeeded public execute
complete
but, webservice throws GenericFault .
Arguments: [void]
Fault: GenericFault : generic error
I have no clue what could be wrong, any ideas?
here is the full stack trace:
Exception in thread "main"
javax.xml.ws.soap.SOAPFaultException:
GenericFault : generic error at
com.sun.xml.internal.ws.fault.SOAP12Fault.getProtocolException(SOAP12Fault.java:210)
at
com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:119)
at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
at
com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at
com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy30.sayHello(Unknown Source)
at
creditproxy.CreditRatingSoap12HttpPortClient.main(CreditRatingSoap12HttpPortClient.java:21)
Caused by:
javax.xml.ws.soap.SOAPFaultException:
GenericFault : generic error at
weblogic.wsee.jaxws.framework.jaxrpc.TubeFactory$JAXRPCTube.processRequest(TubeFactory.java:203)
at
weblogic.wsee.jaxws.tubeline.FlowControlTube.processRequest(FlowControlTube.java:99)
at
com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604)
at
com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563)
at
com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548)
at
com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445)
at
com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:275)
at
com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:454)
at
com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:250)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:140)
at
weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:319)
at
weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:232)
at
weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:310)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at
weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:87)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at
oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at
weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at
weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Process exited with exit code 1.
I had the same problem but they have a solution on Metalink (if you not already seen it). This will fix the problem:
public IResult execute(IContext context) throws WSMException {
IResult result = new Result();
try {
oracle.wsm.common.sdk.IMessageContext.STAGE stage = ((oracle.wsm.common.sdk.IMessageContext)context).getStage();
if (stage == IMessageContext.STAGE.request) {
javax.security.auth.Subject subject = oracle.security.jps.util.SubjectUtil.getAnonymousSubject();
context.setProperty(oracle.wsm.common.sdk.IMessageContext.SECURITY_SUBJECT, subject);
IAssertionBindings bindings = ((SimpleAssertion)(this.assertion)).getBindings();
IConfig config = bindings.getConfigs().get(0);
IPropertySet propertyset = config.getPropertySets().get(0);
String valid_ips = propertyset.getPropertyByName("valid_ips").getValue();
String ipAddr = ((IMessageContext)context).getRemoteAddr();
if (valid_ips != null && valid_ips.trim().length() > 0) {
String[] valid_ips_array = valid_ips.split(",");
boolean isPresent = false;
for (String valid_ip : valid_ips_array) {
if (ipAddr.equals(valid_ip.trim())) {
isPresent = true;
}
}
if (isPresent) {
result.setStatus(IResult.SUCCEEDED);
} else {
result.setStatus(IResult.FAILED);
result.setFault(new WSMException(WSMException.FAULT_FAILED_CHECK));
}
} else {
result.setStatus(IResult.SUCCEEDED);
}
return result;
}
} catch (Exception e) {
throw new WSMException(WSMException.FAULT_FAILED_CHECK, e);
}
return result;
}
I've met the same issue. Looking deeper in the wls classes i've found that WSMMessageContext does not contain right principal in the Subject. and in fact IllegalArgumentExeception is thrown, unfortunately this real exception is wrapped wrapped and wrapped a lot of times and we may see "GenericFault : generic error" that is the last wrapped in WSMAgentHook class that performs output in console. Unfortunately I could not move forward there and seems nobody use Custom Security Assert. So nobody may help us seems
result.setFault(null);
where you are setting status to success. It uses the fault value regardless of the setting of the status.

Resources