on 09-27-2018 11:55 AM
When I try to start the TaskEngine via DefaultTaskService I get the following exception in Hybris 6.7:
Exception in thread "Task-master-poll" de.hybris.platform.servicelayer.exceptions.SystemException: Cannot execute Task Polling Thread with HybrisWebClassLoader in class loader hierarchy. Current context classloader is: de.hybris.tomcat.HybrisWebappLoader$HybrisWebappClassLoader
at de.hybris.platform.task.impl.DefaultTaskService$Poll.assertNoHybrisWebAppClassLoader(DefaultTaskService.java:907)
at de.hybris.platform.task.impl.DefaultTaskService$Poll.run(DefaultTaskService.java:874)
at de.hybris.platform.core.AbstractTenant$5.run(AbstractTenant.java:2460)
at java.lang.Thread.run(Thread.java:748)
at de.hybris.platform.core.threadregistry.RegistrableThread.internalRun(RegistrableThread.java:144)
at de.hybris.platform.core.threadregistry.RegistrableThread.run(RegistrableThread.java:134)
With this jsp script:
<%
final TaskService taskService = Registry.getApplicationContext().getBean("taskService", TaskService.class);
TaskEngine engine = taskService.getEngine();
boolean running = engine.isRunning();
if(!running)
{
engine.start();
out.write("Enabled");
}
%>
Hi Hidde,
You could try to execute it from a beanshell script:
spring.getBean("taskService").getEngine().start()
Regards,
Luke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Hybris tries to drop a hint to you that you'd better not doing such a thing from a jsp page :-) I'd propose to move this logic to some custom service method to avoid its usage in the web part.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.