Overview
The Smart Service, Import Login Audit, will read your login audit file(s) and populate a database with information about logins. This is provided mainly as an example (source code provided) as you may need to modify the smart service to make it work with your environment.
Hi Eduardo Fuentes
Hope your doing Well! Observed the below issues with the plug-in.1. When we pass the date as rule input to smart service but unfortunately if the log file is not exist on that date, the smart service is throwing the java.lang.NullPointerException. Is there any chance to handle in java code?.2. The second one is which mentioned by spandanat
Can you please help out on this.Thanks!!
Can you provide me with the actual error from the logs so I can see what line throws this?
Today also, observed same issue ..
logs error:
2019-11-07 00:58:54.843 INFO [commons-pool-EvictionTimer] com.appiancorp.a2.vpn.VPNTunnelNameService.lookupAllHostAddr VPN dns lookup result 10.3.69.0 java.io.FileNotFoundException: /usr/local/appian/ae/logs/login-audit.csv.2019-11-06 (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileInputStream.<init>(FileInputStream.java:93) at com.appiancorp.loginparser.ImportLoginInformation.processLogins(ImportLoginInformation.java:97) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:87) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131) at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125) at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55) at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71) at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100) at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:35) at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:78) at java.io.InputStreamReader.<init>(InputStreamReader.java:72) at com.appiancorp.loginparser.ImportLoginInformation.writeLogins(ImportLoginInformation.java:110) at com.appiancorp.loginparser.ImportLoginInformation.processLogins(ImportLoginInformation.java:101) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:87) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131) at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125) at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55) at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71) at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100) at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:35) at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 2019-11-07 01:00:03,454 [Appian Work Item - 183550 - execution01 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=268475705, classname=com.appiancorp.loginparser.ImportLoginInformation com.appiancorp.suiteapi.process.exceptions.SmartServiceException: java.lang.NullPointerException at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:90) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131) at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125) at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25) at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83) at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55) at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71) at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100) at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:35) at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84) at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:78) at java.io.InputStreamReader.<init>(InputStreamReader.java:72) at com.appiancorp.loginparser.ImportLoginInformation.writeLogins(ImportLoginInformation.java:110) at com.appiancorp.loginparser.ImportLoginInformation.processLogins(ImportLoginInformation.java:101) at com.appiancorp.loginparser.ImportLoginInformation.run(ImportLoginInformation.java:87) ... 16 moreThe file updated timePM has run at 1:00 Am GMT 7th Nov 2019 with above log error.After i restart at 5:05 Am GMT it got executed without error.Please help on this