Can't launch a bot task in Control Tower

Hello.
I have an email reader jar that works great from command prompt or eclipse.
When I try launch this jar from bot task in RPS - this also work fine. But after publishing to Control tower, I see this error:

org.webharvest.exception.PluginException: [urn:uuid:97BCCC39BE6D772A1F156829162775036] robotics-flow executePlugin exception: [nodeId=http://127.0.0.1:15410] org.webharvest.exception.ScriptException:
Config line 6: script block
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1_genScript_78.groovy: 10: unable to resolve class org.emailspamfilter.listener.EmailListener
@ line 10, column 16.
import org.emailspamfilter.listener.EmailListener
^

Script1_genScript_78.groovy: 8: unable to resolve class org.emailspamfilter.controller.EmailSpamController
@ line 8, column 16.
import org.emailspamfilter.controller.EmailSpamController
^

Script1_genScript_78.groovy: 9: unable to resolve class org.emailspamfilter.textclassifier.EmailTextClassifier
@ line 9, column 16.
import org.emailspamfilter.textclassifier.EmailTextClassifier
^

3 errors

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: org.webharvest.exception.ScriptException:
Config line 6: script block
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1_genScript_78.groovy: 10: unable to resolve class org.emailspamfilter.listener.EmailListener
@ line 10, column 16.
import org.emailspamfilter.listener.EmailListener
^

Script1_genScript_78.groovy: 8: unable to resolve class org.emailspamfilter.controller.EmailSpamController
@ line 8, column 16.
import org.emailspamfilter.controller.EmailSpamController
^

Script1_genScript_78.groovy: 9: unable to resolve class org.emailspamfilter.textclassifier.EmailTextClassifier
@ line 9, column 16.
import org.emailspamfilter.textclassifier.EmailTextClassifier
^

3 errors

at com.freedomoss.crowdcontrol.webharvest.plugin.selenium.RobotPlugin.executePlugin(RobotPlugin.java:185)
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: org.webharvest.exception.ScriptException:
Config line 6: script block
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1_genScript_78.groovy: 10: unable to resolve class org.emailspamfilter.listener.EmailListener
@ line 10, column 16.
import org.emailspamfilter.listener.EmailListener
^

Script1_genScript_78.groovy: 8: unable to resolve class org.emailspamfilter.controller.EmailSpamController
@ line 8, column 16.
import org.emailspamfilter.controller.EmailSpamController
^

Script1_genScript_78.groovy: 9: unable to resolve class org.emailspamfilter.textclassifier.EmailTextClassifier
@ line 9, column 16.
import org.emailspamfilter.textclassifier.EmailTextClassifier
^

3 errors

at org.webharvest.runtime.scripting.GroovyScriptEngine.eval(GroovyScriptEngine.java:138)
at org.webharvest.runtime.processors.ScriptProcessor.execute(ScriptProcessor.java:74)
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.RobotPlugin.executePlugin(RobotPlugin.java:178)
… 23 more
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1_genScript_78.groovy: 10: unable to resolve class org.emailspamfilter.listener.EmailListener
@ line 10, column 16.
import org.emailspamfilter.listener.EmailListener
^

Script1_genScript_78.groovy: 8: unable to resolve class org.emailspamfilter.controller.EmailSpamController
@ line 8, column 16.
import org.emailspamfilter.controller.EmailSpamController
^

Script1_genScript_78.groovy: 9: unable to resolve class org.emailspamfilter.textclassifier.EmailTextClassifier
@ line 9, column 16.
import org.emailspamfilter.textclassifier.EmailTextClassifier
^

3 errors

at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:311)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:983)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:633)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:582)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:354)
at groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:87)
at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:323)
at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:320)
at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:318)
at org.webharvest.runtime.scripting.shell.GroovyShellCacheable.parse(GroovyShellCacheable.java:50)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:443)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:482)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:453)
at org.webharvest.runtime.scripting.GroovyScriptEngine.eval(GroovyScriptEngine.java:136)
… 28 more

My script:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://web-harvest.sourceforge.net/schema/1.0/config" scriptlang="groovy">
    <robotics-flow>
        <robot driver="universal" close-on-completion="true" start-in-private="true">
            <capability name="SEARCH_ALL_WINDOWS" value="true" />
            <script><![CDATA[
               
               import org.emailspamfilter.controller.EmailSpamController           
               import org.emailspamfilter.textclassifier.EmailTextClassifier    
               import org.emailspamfilter.listener.EmailListener 
               import com.workfusion.studio.rpa.recorder.api.internal.representation.*

               log.info EmailSpamController.main();         	                
	
 				
            ]]></script>
        </robot>
    </robotics-flow>
    <export include-original-data="true"/>
</config>

Jar added to build path.

Hi @AlexLin you might need to add the jar to tomcat on the server machine

Thank you, I resolved my problem.

1 Like

I started a business process without errors, but my bot task doesn’t work correctly. The bot task should to check new mail messages, sorting and extract information. It’s works fine from workfusion studio or eclipse, but I didn’t see working result or error log in Control Tower.