That snippet shows that the call is executing, but failing (returning an HTTP 500 error). That means it's throwing an exception, so it either can't find/initiate your class, or your class is throwing an error.Double-check that your ClassName variable doesn't have any typos, and that it's actually in the app's classpath. Then, turn on debug logging on your class and go hunting for exception messages in the logs. If the person that wrote the class didn't actually use proper logging and exception handling, then I give you permission to slap them silly, even if you're the one who wrote it.
I am not sure what you mean for the "Turn on debug logging on your class"
private static final Log LOGGER = LogFactory.getLog(MyCustomTask.class);public void execute() { if (LOGGER.isDebugEnabled()) { LOGGER.debug("I'm doing stuff!"); } /* ... */}
First, that is not my code, I am doing upgrade to make it work.
Second, not matter which way we enable debug, it wouldn't show the log. As I said, the class couldn't be load.
Third, the root cause of the issue is TeamSite blocks to load the class if it thinks the permission is wrong. If you can provide more information about how TeamSite uses the permission to control the workflow, that will be helpful.
I understand now, you mean use a logger to generate logs. Our applicaiton already injected a log service into the external task using Spring, which is based on Log4J, similar to your code. But the logger doesn't work.
see how it instantiates the oject
Class.forName(cstask.getVariable("ClassName")).getMethod("execute", CSClient.class, CSTask.class, Hashtable.class).invoke(csclient, cstask, params);
((CSURLExternalTask) applicationContext.getBean(cstask.getVariable("TaskBeanId"))).execute(csclient, cstask, params);