Unable to run new process in control tower

I am now unable to run a new process in control tower. Any new process produces error similar to below. This error came from a simple process as this one…

I think it may be similar / same as this https://forum-2-new.workfusion.com/t/error-cannot-be-cast-to-org-webharvest-runtime-variables-variable/60973

My version of Express is 2.3.1

Processes upload earlier then the first occurrence of this error seem to run as expected.

org.webharvest.exception.PluginException: [urn:uuid:B2B67A4580EAA398CD156397872930031] robotics-flow executePlugin exception: [nodeId=http://127.0.0.1:15411] java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to org.webharvest.runtime.variables.Variable at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RoboticsFlowPlugin.executePlugin(RoboticsFlowPlugin.java:121) at org.webharvest.runtime.processors.WebHarvestPlugin.execute(WebHarvestPlugin.java:125) at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127) at org.webharvest.runtime.Scraper.execute(Scraper.java:169) at org.webharvest.runtime.Scraper.execute(Scraper.java:182) at com.freedomoss.crowdcontrol.webharvest.executor.LocalWebharvestTaskExecutor.executeWebHarvestTask(LocalWebharvestTaskExecutor.java:173) at com.freedomoss.crowdcontrol.webharvest.executor.LocalWebharvestTaskExecutor.executeWebHarvestTask(LocalWebharvestTaskExecutor.java:116) at com.workfusion.service.machine.BotRecordExecutionService.process(BotRecordExecutionService.java:171) at com.workfusion.service.machine.BotRecordExecutionService.process(BotRecordExecutionService.java:142) at com.workfusion.service.machine.BotRecordExecutionService.lambda$processSubmissionWithAllocationLogger$3(BotRecordExecutionService.java:112) at com.workfusion.utils.thread.ThreadMonitoringUtils.executeWithAllocatedMemoryCallback(ThreadMonitoringUtils.java:17) at com.workfusion.service.machine.BotRecordExecutionService.processSubmissionWithAllocationLogger(BotRecordExecutionService.java:112) at com.workfusion.service.machine.BotRecordExecutionService.lambda$processRecord$0(BotRecordExecutionService.java:95) at com.workfusion.utils.thread.NamedThreadTemplate.executeWithNamedThread(NamedThreadTemplate.java:10) at com.workfusion.service.machine.BotRecordExecutionService.processRecord(BotRecordExecutionService.java:95) at com.workfusion.service.machine.thread.RecordProcessThread.run(RecordProcessThread.java:28) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.webharvest.exception.PluginException: java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to org.webharvest.runtime.variables.Variable at com.freedomoss.crowdcontrol.webharvest.plugin.recorder.RecorderPlugin.executePlugin(RecorderPlugin.java:98) at org.webharvest.runtime.processors.WebHarvestPlugin.execute(WebHarvestPlugin.java:125) at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127) at org.webharvest.runtime.processors.BodyProcessor.execute(BodyProcessor.java:27) at org.webharvest.runtime.processors.WebHarvestPlugin.executeBody(WebHarvestPlugin.java:246) at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RoboticsFlowPlugin.executePlugin(RoboticsFlowPlugin.java:110) ... 18 more Caused by: java.lang.ClassCastException: org.slf4j.impl.Log4jLoggerAdapter cannot be cast to org.webharvest.runtime.variables.Variable at org.webharvest.runtime.ScraperContext.getVar(ScraperContext.java:74) at org.webharvest.runtime.ScraperContext.getVar(ScraperContext.java:70) at com.freedomoss.crowdcontrol.webharvest.plugin.recorder.RecorderPlaybackProcess.updateVariables(RecorderPlaybackProcess.java:103) at com.freedomoss.crowdcontrol.webharvest.plugin.recorder.RecorderPlaybackProcess.start(RecorderPlaybackProcess.java:76) at com.freedomoss.crowdcontrol.webharvest.plugin.recorder.RecorderPlugin.play(RecorderPlugin.java:122) at com.freedomoss.crowdcontrol.webharvest.plugin.recorder.RecorderPlugin.executePlugin(RecorderPlugin.java:93)

@Craigw it must happen because of the name of the variable - log. It is one of the reserved words for Control Tower.
You need to rename the variable, for example, to log_file.

You can see the list of reserved works here:
https://kb.workfusion.com/display/RPAe/Recorder+Variables#RecorderVariables-ListofReservedWords

@ashapkina - That didn’t seem to work. See below

I even started from scratch with a new recording with proper variable name and brand new business process in Control Tower.

org.webharvest.exception.PluginException: [urn:uuid:B2B67A4580EAA398CD156398203377856] robotics-flow executePlugin exception: [nodeId=http://127.0.0.1:15411] com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=FileCreateAction.ftl,id=1,name=Optional[FileCreateAction],parent=-1,arguments=ActionArguments[path=[${log_file}],delay=[0],timeoutMs=[10000],xsi:type=[recorder:FileCreateAction, recorder:FileCreateAction],pollingInterval=[300],active=[true],createFolder=[false],encoding=[UTF-8],resolution=[OVERWRITE],content=[start of process >${file_name}],awaitTimeout=[5000]]] at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RoboticsFlowPlugin.executePlugin(RoboticsFlowPlugin.java:121) at org.webharvest.runtime.processors.WebHarvestPlugin.execute(WebHarvestPlugin.java:125) at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127) at org.webharvest.runtime.Scraper.execute(Scraper.java:169) at org.webharvest.runtime.Scraper.execute(Scraper.java:182) at com.freedomoss.crowdcontrol.webharvest.executor.LocalWebharvestTaskExecutor.executeWebHarvestTask(LocalWebharvestTaskExecutor.java:173) at com.freedomoss.crowdcontrol.webharvest.executor.LocalWebharvestTaskExecutor.executeWebHarvestTask(LocalWebharvestTaskExecutor.java:116) at com.workfusion.service.machine.BotRecordExecutionService.process(BotRecordExecutionService.java:171) at com.workfusion.service.machine.BotRecordExecutionService.process(BotRecordExecutionService.java:142) at com.workfusion.service.machine.BotRecordExecutionService.lambda$processSubmissionWithAllocationLogger$3(BotRecordExecutionService.java:112) at com.workfusion.utils.thread.ThreadMonitoringUtils.executeWithAllocatedMemoryCallback(ThreadMonitoringUtils.java:17) at com.workfusion.service.machine.BotRecordExecutionService.processSubmissionWithAllocationLogger(BotRecordExecutionService.java:112) at com.workfusion.service.machine.BotRecordExecutionService.lambda$processRecord$0(BotRecordExecutionService.java:95) at com.workfusion.utils.thread.NamedThreadTemplate.executeWithNamedThread(NamedThreadTemplate.java:10) at com.workfusion.service.machine.BotRecordExecutionService.processRecord(BotRecordExecutionService.java:95) at com.workfusion.service.machine.thread.RecordProcessThread.run(RecordProcessThread.java:28) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.webharvest.exception.PluginException: com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=FileCreateAction.ftl,id=1,name=Optional[FileCreateAction],parent=-1,arguments=ActionArguments[path=[${log_file}],delay=[0],timeoutMs=[10000],xsi:type=[recorder:FileCreateAction, recorder:FileCreateAction],pollingInterval=[300],active=[true],createFolder=[false],encoding=[UTF-8],resolution=[OVERWRITE],content=[start of process >${file_name}],awaitTimeout=[5000]]] at com.freedomoss.crowdcontrol.webharvest.plugin.recorder.RecorderPlugin.executePlugin(RecorderPlugin.java:98) at org.webharvest.runtime.processors.WebHarvestPlugin.execute(WebHarvestPlugin.java:125) at org.webharvest.runtime.processors.BaseProcessor.run(BaseProcessor.java:127) at org.webharvest.runtime.processors.BodyProcessor.execute(BodyProcessor.java:27) at org.webharvest.runtime.processors.WebHarvestPlugin.executeBody(WebHarvestPlugin.java:246) at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RoboticsFlowPlugin.executePlugin(RoboticsFlowPlugin.java:110) ... 18 more Caused by: com.workfusion.studio.rpa.recorder.playback.PlaybackException: Error executing TemplateAction[templateName=FileCreateAction.ftl,id=1,name=Optional[FileCreateAction],parent=-1,arguments=ActionArguments[path=[${log_file}],delay=[0],timeoutMs=[10000],xsi:type=[recorder:FileCreateAction, recorder:FileCreateAction],pollingInterval=[300],active=[true],createFolder=[false],encoding=[UTF-8],resolution=[OVERWRITE],content=[start of process >${file_name}],awaitTimeout=[5000]]] at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:54) at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:28) at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.execute(TemplateAction.java:15) at com.workfusion.studio.rpa.recorder.playback.player.ActionPlayer.next(ActionPlayer.java:81) at com.freedomoss.crowdcontrol.webharvest.plugin.recorder.RecorderPlaybackProcess.start(RecorderPlaybackProcess.java:93) at com.freedomoss.crowdcontrol.webharvest.plugin.recorder.RecorderPlugin.play(RecorderPlugin.java:122) at com.freedomoss.crowdcontrol.webharvest.plugin.recorder.RecorderPlugin.executePlugin(RecorderPlugin.java:93) ... 23 more Caused by: org.openqa.selenium.WebDriverException: Unable to delete file: c:\RPA\rpa.txt Command duration or timeout: 0 milliseconds Build info: version: '9.3.1.0', revision: 'ef4b445edf', time: '2019-05-29T11:53:16.301Z' System info: host: 'TAGRPA1', ip: '10.2.10.20', os.name: 'Windows NT (unknown)', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121' Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper Capabilities [{capabilityNodeId=http://127.0.0.1:15411, extra.start.in.private=false, extra.executor.id={run.name=Test New Proc Process, task.uuid=0a6204b3-924f-4031-9f43-552ce634a076, task.name=Test New Proc, context.path=/workfusion, host.name=http://localhost:15280, run.author.email=craigw@taggart-intl.com, run.uuid=0a6204b3-924f-4031-9f43-552ce634a076, run.author.fullname=Craig Wooldridge}, CLOSE_ALL_WINDOWS=false, browserName=universal, maximize.on.startup=true, javascriptEnabled=true, extra.capabilities.context={"browserType":"universal","startInPrivate":false,"blockImages":false,"nodeId":"http://127.0.0.1:15411","maximizeOnStartup":true,"customCapabilities":{"extra.start.in.private":false,"SEARCH_ALL_WINDOWS":true,"CLOSE_ALL_WINDOWS":false},"executorId":{"host.name":"http://localhost:15280","context.path":"/workfusion","task.uuid":"0a6204b3-924f-4031-9f43-552ce634a076","run.name":"Test New Proc Process","run.uuid":"0a6204b3-924f-4031-9f43-552ce634a076","run.author.fullname":"Craig Wooldridge","run.author.email":"craigw@taggart-intl.com","task.name":"Test New Proc"}}, platformName=WINDOWS, SEARCH_ALL_WINDOWS=true, platform=WINDOWS}] Session ID: 25c9b542-a7ff-4ad4-bb09-a99d49239081 at sun.reflect.GeneratedConstructorAccessor827.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168) at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:41) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:82) at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:45) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:741) at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:677) at com.workfusion.rpa.helpers.Resource.createFileOverwrite(Resource.java:75) at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:237) at Script2_genScript_24.run(Script2_genScript_24.groovy:8) at com.workfusion.studio.rpa.recorder.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:48) at com.workfusion.studio.rpa.recorder.playback.player.PlaybackContext.executeScript(PlaybackContext.java:108) at com.workfusion.studio.rpa.recorder.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:33) at com.workfusion.studio.rpa.recorder.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46) ... 29 more Caused by: java.io.IOException: Unable to delete file: c:\RPA\rpa.txt at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2381) at com.workfusion.desktop.driver.resource.ResourceActionStrategy$1.create(ResourceActionStrategy.java:18) at com.workfusion.desktop.driver.resource.Resource.create(Resource.java:50) at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:104) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:326) at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrap.invoke(StaticMetaMethodSite.java:133) at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:91) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:144) at Script1.run(Script1.groovy:2) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:444) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:482) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:453) at com.workfusion.autoit.driver.script.GroovyExecutor.execute(GroovyExecutor.java:45) at com.workfusion.autoit.driver.AutoItDriver.executeScriptInternal(AutoItDriver.java:235) at com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:190) at com.workfusion.universal.driver.UniversalDriver.executeScript(UniversalDriver.java:151) at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:54) at org.openqa.selenium.remote.server.handler.WebDriverHandler.handle(WebDriverHandler.java:41) at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:134) at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:206) at org.openqa.selenium.remote.server.InMemorySession.execute(InMemorySession.java:98) at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0(WebDriverServlet.java:231) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) ... 3 more

This is a different error. Looks like you cannot delete files from disk C.
Try using another location to create the file. Will it work in this case?

Hi @Craigw did it work with another location?

Yes - that was the case. Sorry just now getting to update this.

Craig

1 Like

hi, i tried to access that link and don’t have permissions, how to request permission?

Not Permitted

You are not permitted to perform this operation.