How to capture a specific error in a log that it is being updated

Hello,

I am trying to capture the specific error “Content is not allowed in prolog” in a log that is being updated with new entries (sometimes).

The below code unfortunately grabs the first error of “Content is not allowed in prolog” and then whatever new entry exists in the log it is being captured. Plus that in random periods and without any entry the error message is being captured and sent through Email.

Could you pls let me know where is the issue? I am new to Powershell.

$file = "\Users\air\Desktop"
$cycletime = 5
$linestocheck = 30            
$startcheck = 0
$lastcheck = (Get-Date).AddMinutes(-$cycletime)
# $regex = "\<Error\>\<(.+?\s.+?)\>\s.+Content is not allowed in prolog\.$"  # store the regex
#$regex = "\<Error\>\<(.+?\s.+?)\>\s.+Content is not allowed in prolog\.\s*$"
$regex = "\s.+Content is not allowed in prolog\.\s*$"
While ($true) {
     $startcheck = Get-Date                          
     $writetime = Get-ItemProperty  $file | Select-Object LastWriteTime | Get-Date
     if ($writetime -gt $lastcheck) {
         # no need to check the log if it hasn't been written to
         $latestmatch = (Get-Date).AddMinutes(-(3*$cycletime))               
         Get-Content -Path $file -Tail $linestocheck |
             ForEach-Object {
                 if ($_ -match $regex) {
                     $errordate = [datetime]$Matches[1]
                     if ($errordate -gt $latestmatch) {
                         $latestmatch = $errordate
                     }
                 }
             }
         # if the most recent error happened since the last check, report it
         if ($latestmatch -gt $lastcheck) {
               $smtp = new-object Net.Mail.SmtpClient("....")
    $objMailMessage = New-Object System.Net.Mail.MailMessage
    $objMailMessage.From = "support@iis.com"
    $objMailMessage.To.Add("nale@iis.com")
    #$objMailMessage.Subject = "Error message: 'Content is not allowed in prolog'"
    $objMailMessage.Subject = "Error message: 'TEST TEST TEST - OUTLOOK EMAIL'"
    #$objMailMessage.Body = "In Startup log I captured the following error message: 'Content is not allowed in prolog'. Pls check it asap"
    $smtp.send($objMailMessage)
         }
         "Write-Host 'Sending email'"
         $lastcheck = $startcheck                    
                                                     
         Start-Sleep -Seconds ($cycletime * 60)
     }
}

I am also attaching the log:

ERROR CODE     : 03214
LEVEL          : 2
ERROR #        : UO5IY49BBICI
TIMESTAMP      : 2020-09-09 12:28:02
MESSAGE        : Failed to move resource "641026" of type "1" to resource in and outside information system.txt" of type "/Project/Default/ICDocumentation". Conflict resolution mode is "30".
TOKEN          : 2432673;42653;100002084;44.200.4.188
PARAMS         : [641026, 1, in and outside information system.txt, /Project/Default/ICDocumentation/]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:83)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:437)
	at com.service.common.ErrorHandler.readAndThrowResourceException(ErrorHandler.java:200)
	at com..service.repository.resource.ResourceManager.handleException(ResourceManager.java:10165)
	at com.service.repository.resource.ResourceManager.moveTree(ResourceManager.java:4894)
	at com.service.repository.RepositoryServiceManager.moveTree(RepositoryServiceManager.java:4495)
	at com.service.repository.RepositoryServiceBean.moveTree(RepositoryServiceBean.java:1842)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.EJSContainer.invokeProceed(EJSContainer.java:5347)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:652)
	at com.ibm.ws.cdi.ejb.impl.InterceptorChain.proceed(InterceptorChain.java:120)
	at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.invokeInterceptors(EJBCDIInterceptorWrapper.java:140)
	at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.aroundInvoke(EJBCDIInterceptorWrapper.java:56)
	at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:201)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:632)
	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
	at com.ibm.ws.cdi.ejb.impl.WeldSessionBeanInterceptorWrapper.aroundInvoke(WeldSessionBeanInterceptorWrapper.java:58)
	at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:201)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:632)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInterceptor(InvocationContextImpl.java:306)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvoke(InvocationContextImpl.java:273)
	at com.ibm.ejs.container.EJSContainer.invoke(EJSContainer.java:5239)
	at com.service.repository.EJSLocal0SLRepositoryService_ecc6036f.moveTree(EJSLocal0SLRepositoryService_ecc6036f.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com..service.framework.DelegateInvocationHandler.invoke(DelegateInvocationHandler.java:94)
	at com.sun.proxy.$Proxy77.moveTree(Unknown Source)
	at com.sdk.repository.RepositoryServiceHandler.renameAssociatedResource(RepositoryServiceHandler.java:840)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com..sdk.SDKInvocationHandler.invoke(SDKInvocationHandler.java:139)
	at com.sun.proxy.$Proxy164.renameAssociatedResource(Unknown Source)
	at com..sdk.repository.RepositoryService.renameAssociatedResource(RepositoryService.java:1150)
	at com..apps.service.object.ObjectServiceBatchUpdateAction.handleResourceNaming(ObjectServiceBatchUpdateAction.java:198)
	at com..apps.service.object.ObjectServiceBatchUpdateAction.process(ObjectServiceBatchUpdateAction.java:107)
	at com..apps.service.AbstractServiceManager.processLifecycleAction(AbstractServiceManager.java:140)
	at com.apps.service.object.ObjectServiceManager.update(ObjectServiceManager.java:267)
	at com.apps.service.object.ObjectServiceBean.update(ObjectServiceBean.java:92)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.EJSContainer.invokeProceed(EJSContainer.java:5347)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:652)
	at com.ibm.ws.cdi.ejb.impl.InterceptorChain.proceed(InterceptorChain.java:120)
	at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.invokeInterceptors(EJBCDIInterceptorWrapper.java:140)
	at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.aroundInvoke(EJBCDIInterceptorWrapper.java:56)
	at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:201)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:632)
	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
	at com.ibm.ws.cdi.ejb.impl.WeldSessionBeanInterceptorWrapper.aroundInvoke(WeldSessionBeanInterceptorWrapper.java:58)
	at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:201)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:632)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInterceptor(InvocationContextImpl.java:306)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvoke(InvocationContextImpl.java:273)
	at com.ibm.ejs.container.EJSContainer.invoke(EJSContainer.java:5239)
	at apps.service.object.EJSLocal0SLObjectService_36f5930f.update(EJSLocal0SLObjectService_36f5930f.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at .apps.service.util.DelegateInvocationHandler.invoke(DelegateInvocationHandler.java:87)
	at com.sun.proxy.$Proxy176.update(Unknown Source)
	at com.apps.service.object.ObjectService.update(ObjectService.java:249)
	at apps.common.propertyForm.PropertyFormAction.handleUpdate(PropertyFormAction.java:326)
	at com.apps.sosa.SosaPropertyFormAction.handleUpdate(SosaPropertyFormAction.java:774)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com..apps.common.AbstractAction.synchronizedHandler(AbstractAction.java:552)
	at com.apps.common.BaseAction.dispatchAction(BaseAction.java:196)
	at com..apps.common.propertyForm.PropertyFormAction.dispatchAction(PropertyFormAction.java:153)
	at com.apps.sosa.SosaPropertyFormAction.dispatchAction(SosaPropertyFormAction.java:185)
	at com.apps.common.BaseAction.performAction(BaseAction.java:105)
	at com..apps.common.AbstractAction.execute(AbstractAction.java:248)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	at com..apps.common.util.OPRequestProcessor.process(OPRequestProcessor.java:241)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1235)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:143)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:96)
	at comapps.common.util.CharEncodeFilter.doFilter(CharEncodeFilter.java:48)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com..apps.common.utiCompressionFilter.java:67)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.apps.common.util.BrowserCacheSwitcher.doFilter(BrowserCacheSwitcher.java:71)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com..apps.common.tools.xss.SecurityHeaderFilter.doFilter(SecurityHeaderFilter.java:96)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.apps.common.tools.xss.BaseXSSFilter.doFilter(BaseXSSFilter.java:152)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at components.filter.RespViewRequestFilter.doFilter(RespViewRequestFilter.java:82)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.ibm.components.apps.AppFilter.doFilter(AppFilter.java:64)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:969)
	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1109)
	at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82)
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:963)
	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:382)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:289)
	at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1187)
	at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:694)
	at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1833)
	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)
-- nested by --
EXCEPTION      : com.service.repository.RepositoryServiceException
ERROR CODE     : OP-03214
LEVEL          : 2
ERROR #        : UO5IY49BBICI
TIMESTAMP      : 2020-09-09 12:28:02
MESSAGE        : Failed to move resource "641026" of type "1" to resource " in and outside information system.txt" of type "/Project/Default/ICDocumentation/". Conflict resolution mode is "30".
TOKEN          : 2432673;42653;100002084;44.200.4.188
PARAMS         : [641026, 1, KRI_Ratio in and outside information system.txt, /_op_sox/Project/Default/
	at .repository.RepositoryServiceManager.moveTree(RepositoryServiceManager.java:4522)
	at com.service.repository.RepositoryServiceBean.moveTree(RepositoryServiceBean.java:1842)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.EJSContainer.invokeProceed(EJSContainer.java:5347)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:652)
	at com.ibm.ws.cdi.ejb.impl.InterceptorChain.proceed(InterceptorChain.java:120)
	at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.invokeInterceptors(EJBCDIInterceptorWrapper.java:140)
	at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.aroundInvoke(EJBCDIInterceptorWrapper.java:56)
	at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:201)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:632)
	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
	at com.ibm.ws.cdi.ejb.impl.WeldSessionBeanInterceptorWrapper.aroundInvoke(WeldSessionBeanInterceptorWrapper.java:58)
	at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:201)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:632)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInterceptor(InvocationContextImpl.java:306)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvoke(InvocationContextImpl.java:273)
	at com.ibm.ejs.container.EJSContainer.invoke(EJSContainer.java:5239)
	at com.service.repository.EJSLocal0SLRepositoryService_ecc6036f.moveTree(EJSLocal0SLRepositoryService_ecc6036f.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com..service.framework.DelegateInvocationHandler.invoke(DelegateInvocationHandler.java:94)
	at com.sun.proxy.$Proxy77.moveTree(Unknown Source)
	at com..sdk.repository.RepositoryServiceHandler.renameAssociatedResource(RepositoryServiceHandler.java:840)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.sdk.SDKInvocationHandler.invoke(SDKInvocationHandler.java:139)
	at com.sun.proxy.$Proxy164.renameAssociatedResource(Unknown Source)
	at com.sdk.repository.RepositoryService.renameAssociatedResource(RepositoryService.java:1150)
	at com.apps.service.object.ObjectServiceBatchUpdateAction.handleResourceNaming(ObjectServiceBatchUpdateAction.java:198)
	at com.apps.service.object.ObjectServiceBatchUpdateAction.process(ObjectServiceBatchUpdateAction.java:107)
	at com.AbstractServiceManager.processLifecycleAction(AbstractServiceManager.java:140)
	at com.apps.service.object.ObjectServiceManager.update(ObjectServiceManager.java:267)
	at com..apps.service.object.ObjectServiceBean.update(ObjectServiceBean.java:92)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.EJSContainer.invokeProceed(EJSContainer.java:5347)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:652)
	at com.ibm.ws.cdi.ejb.impl.InterceptorChain.proceed(InterceptorChain.java:120)
	at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.invokeInterceptors(EJBCDIInterceptorWrapper.java:140)
	at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.aroundInvoke(EJBCDIInterceptorWrapper.java:56)
	at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:201)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:632)
	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
	at com.ibm.ws.cdi.ejb.impl.WeldSessionBeanInterceptorWrapper.aroundInvoke(WeldSessionBeanInterceptorWrapper.java:58)
	at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:201)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:632)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInterceptor(InvocationContextImpl.java:306)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvoke(InvocationContextImpl.java:273)
	at com.ibm.ejs.container.EJSContainer.invoke(EJSContainer.java:5239)
	at com.apps.service.object.EJSLocal0SLObjectService_36f5930f.update(EJSLocal0SLObjectService_36f5930f.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.apps.service.util.DelegateInvocationHandler.invoke(DelegateInvocationHandler.java:87)
	at com.sun.proxy.$Proxy176.update(Unknown Source)
	at com..apps.service.object.ObjectService.update(ObjectService.java:249)
	at com..apps.common.propertyForm.PropertyFormAction.handleUpdate(PropertyFormAction.java:326)
	at com.apps.sosa.SosaPropertyFormAction.handleUpdate(SosaPropertyFormAction.java:774)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com..apps.common.AbstractAction.synchronizedHandler(AbstractAction.java:552)
	at coapps.common.BaseAction.dispatchAction(BaseAction.java:196)
	at com..apps.common.propertyForm.PropertyFormAction.dispatchAction(PropertyFormAction.java:153)
	at com.apps.sosa.SosaPropertyFormAction.dispatchAction(SosaPropertyFormAction.java:185)
	at com.apps.common.BaseAction.performAction(BaseAction.java:105)
	at com..apps.common.AbstractAction.execute(AbstractAction.java:248)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	at com.apps.common.util.OPRequestProcessor.process(OPRequestProcessor.java:241)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1235)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:143)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:96)
	at com..apps.common.util.CharEncodeFilter.doFilter(CharEncodeFilter.java:48)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at comapps.common.util.CompressionFilter.doFilterCompressionFilter.java:67)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com..apps.common.util.BrowserCacheSwitcher.doFilter(BrowserCacheSwitcher.java:71)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com..apps.common.tools.xss.SecurityHeaderFilter.doFilter(SecurityHeaderFilter.java:96)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.apps.common.tools.xss.BaseXSSFilter.doFilter(BaseXSSFilter.java:152)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.ibm..components.filter.RespViewRequestFilter.doFilter(RespViewRequestFilter.java:82)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.ibm..components.apps.AppFilter.doFilter(AppFilter.java:64)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:969)
	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1109)
	at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82)
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:963)
	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:382)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:289)
	at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1187)
	at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:694)
	at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1833)
	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)
-- nested by --
2020-09-09 12:28:02
CODE       : OP-03214
LEVEL      : 2
NAME       : com.sdk.ServiceException
ERROR #    : UO5IY49BBICI
TOKEN ID   : 2432673
USER       : 100002084
IP         : 44.200.4.188
HOST       : xpe1-p07841.wwg00m.rootdom.net
PARAMETERS : [641026, 1, KRI_Ratio in and outside information system.txt.
	at com.sdk.repository.RepositoryServiceHandler.renameAssociatedResource(RepositoryServiceHandler.java:866)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.sdk.SDKInvocationHandler.invoke(SDKInvocationHandler.java:139)
	at com.sun.proxy.$Proxy164.renameAssociatedResource(Unknown Source)
	at com..sdk.repository.RepositoryService.renameAssociatedResource(RepositoryService.java:1150)
	at com..apps.service.object.ObjectServiceBatchUpdateAction.handleResourceNaming(ObjectServiceBatchUpdateAction.java:198)
	at com.apps.service.object.ObjectServiceBatchUpdateAction.process(ObjectServiceBatchUpdateAction.java:107)
	at com.apps.service.AbstractServiceManager.processLifecycleAction(AbstractServiceManager.java:140)
	at com.apps.service.object.ObjectServiceManager.update(ObjectServiceManager.java:267)
	at com.apps.service.object.ObjectServiceBean.update(ObjectServiceBean.java:92)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.EJSContainer.invokeProceed(EJSContainer.java:5347)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:652)
	at com.ibm.ws.cdi.ejb.impl.InterceptorChain.proceed(InterceptorChain.java:120)
	at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.invokeInterceptors(EJBCDIInterceptorWrapper.java:140)
	at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.aroundInvoke(EJBCDIInterceptorWrapper.java:56)
	at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:201)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:632)
	at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
	at com.ibm.ws.cdi.ejb.impl.WeldSessionBeanInterceptorWrapper.aroundInvoke(WeldSessionBeanInterceptorWrapper.java:58)
	at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:201)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:632)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInterceptor(InvocationContextImpl.java:306)
	at com.ibm.ejs.container.interceptors.InvocationContextImpl.doAroundInvoke(InvocationContextImpl.java:273)
	at com.ibm.ejs.container.EJSContainer.invoke(EJSContainer.java:5239)
	at com.service.object.EJSLocal0SLObjectService_36f5930f.update(EJSLocal0SLObjectService_36f5930f.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at comapps.service.util.DelegateInvocationHandler.invoke(DelegateInvocationHandler.java:87)
	at com.sun.proxy.$Proxy176.update(Unknown Source)
	at com.apps.service.object.ObjectService.update(ObjectService.java:249)
	at com.apps.common.propertyForm.PropertyFormAction.handleUpdate(PropertyFormAction.java:326)
	at com.apps.sosa.SosaPropertyFormAction.handleUpdate(SosaPropertyFormAction.java:774)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
	at java.lang.reflect.Method.invoke(Method.java:508)
	at com..apps.common.AbstractAction.synchronizedHandler(AbstractAction.java:552)
	at com..apps.common.BaseAction.dispatchAction(BaseAction.java:196)
	at com..apps.common.propertyForm.PropertyFormAction.dispatchAction(PropertyFormAction.java:153)
	at com.apps.sosa.SosaPropertyFormAction.dispatchAction(SosaPropertyFormAction.java:185)
	at com..apps.common.BaseAction.performAction(BaseAction.java:105)
	at com..apps.common.AbstractAction.execute(AbstractAction.java:248)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	at com..apps.common.util.OPRequestProcessor.process(OPRequestProcessor.java:241)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1235)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:143)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:96)
	at com.apps.common.util.CharEncodeFilter.doFilter(CharEncodeFilter.java:48)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.apps.common.util.CompressionFilter.doFiltesCompressionFilter.java:67)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com..apps.common.util.BrowserCacheSwitcher.doFilter(BrowserCacheSwitcher.java:71)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com..apps.common.tools.xss.SecurityHeaderFilter.doFilter(SecurityHeaderFilter.java:96)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com..apps.common.tools.xss.BaseXSSFilter.doFilter(BaseXSSFilter.java:152)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.ibm.components.filter.RespViewRequestFilter.doFilter(RespViewRequestFilter.java:82)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.ibm..components.apps.AppFilter.doFilter(AppFilter.java:64)
	at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197)
	at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90)
	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:969)
	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1109)
	at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:82)
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:963)
	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:382)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318)
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:289)
	at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1187)
	at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:694)
	at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1833)
	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)
2021-04-19 12:28:02
CODE       : OP-03214
LEVEL      : 2
NAME       : com..sdk.ServiceException
ERROR #    : UO5IY49BBICI
TOKEN ID   : 2432673
USER       : 100002084
IP         : 44.200.4.188
HOST       : xpe1-p07841.wwg00m.rootdom.net
PARAMETERS : [641026, 1, KRI_Ratio in and outside information system.txt, /.
	at com..sdk.repository.RepositoryServiceHandler.renameAssociatedResource(RepositoryServiceHandler.java:866)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2020-09-09 12:28:02,909
ERROR RepositoryServiceHandler on sm007999
Application Error!
[WebContainer : 8](LoggingHelper.java:110)

org.xml.sax.SAXParseException: Content is not allowed in prolog.
       java.sql.SQLException: ORA-20555: -3214||641026|1|511344|1|4
       ORA-06512: at "OP_HIER_COPY_MOVE_MGR", line 1404
       ORA-06512: at ".OP_HIER_COPY_MOVE_MGR", line 1764
       ORA-06512: at ".OP_HIER_COPY_MOVE_MGR", line 1744
       ORA-06512: at line 1

	   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
	   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
	   at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
	   at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)

Amartolos,
Welcome to the forums.

Is this the real complete logfile or did you edit it? It seems to be structured in sections but they seem to be inconsistent. Some of them have a timestamp and some don’t. Some of them end with “-- nested by --” and some don’t.
Your search pattern occurs only once in the file, isn’t it?
And you may sanitize your log file from sensitive information next time :wink: ( Allianz France, /_op_sox/Project/Default/ICDocumentation/KRI's/Allianz/H5/Allianz France)

There are some different strategies you can use. You can remove or purge the log file when you parsed it for errors. This way you don’t have to care about old entries in the log file.
If you don’t want this you would need to save the status where you finished parsing last time. That’s more effort.

Regardless of that: I’d rather use the task scheduler to run this script periodically instead of using an infinite loop. I consider this as more robust.

1 Like

Hi Olaf, thank you for your info. You are right, it is not the complete logfile, I have edited it. Do you see any mistake in the actual code? Do I need to change anything?
I don’t want to remove the log file every time the script is accessing it, cause I need the history of it.

Well, obviously you should. As the script does not do what you expect it to, right? :wink:

I do see some things I’d do differently. :wink: I like to work according to the KISS principle.

Since you’re obviously only interested in the fact that there is a new error logged I’d use a much simpler approach. You can simply count the occurences of the error message and compare it to the count of the last iteration to detect a new log entry.

$LogFilePath = 'Complete Log File Path'
$Pattern = 'Content is not allowed in prolog'
$cycletime = 5

$LogEntryCount = (Select-String -Path $LogFilePath -Pattern $Pattern -SimpleMatch -AllMatches).count
While ($true) {
    $CurrentLogEntryCount = (Select-String -Path $LogFilePath -Pattern $Pattern -SimpleMatch -AllMatches).count
    if ($CurrentLogEntryCount -gt $LogEntryCount) {
        'Send MailMessage'
        $LogEntryCount = $CurrentLogEntryCount
    }
    Start-Sleep -Seconds ($cycletime * 60)
}

Hi Olaf,
thank you very much for your answer. I tried your way and I actually put a “Write-Host…” command in order to check whether it will send an Email, but it didn’t. It seems that it doesn’t grab the error.

Please do not post pictures of code or error messages. They are not helpful. Instead post the text and format it as code.

If you put quotes around your cmdlets you turn them into plain text. Remove the double quotes around Write-Host.

As long as you are testing the code and you don’t need to test the sending of the emails you can use the code just as I posted it. Instead of sending an email you would see the text “Send MailMessage” on the console.

You could set up a shorter time period for $cycletime and edit the log file manually or trigger an error and watch the console window for output.

Hi Olaf,
thank you very much for your prompt reply and your comments. I am actually checking the Email server cause it seems that there is an issue, so my previous comments might not be valid.
I will get back to you.

Thank you

That’s why I recommended to test those functions separately. :wink:

Is there actually a particular reason why you’re not using Send-MailMessage?

Indeed, we faced some issues with our Exchange server, so your code is working fine. Thank you very much. Simplicity is the key…
No, there isn’t any particular for not using Send-MailMessage, and I actually tried it yesterday when our Exchange server was down.

Thank you very much again!

1 Like

Cool. :+1:t4:

Thanks for letting us know.