0

I have followed the sample code from the StockValueAlertExample. So I setup the process in code (and not through the Application-Lab UI)

There is a connection between my webapp (liberty profile) and the workload scheduler service.

For some reason there a two agents :

BN_CLOUD (where BN is the tenant) BN_CLOUD_1

BN_CLOUD has a red sign BN_CLOUD_1 has a green sign

After changing the agent to (BN_CLOUD_1) in the process step (by using the Application-Lab ui) and running the process, I got the following error:

= Status Message: AWKJJE004E Runtime Error "com.eoffice.scheduling.DummyTask".

Is there a interface that must be implemented ? I assumed running java meant implementing a static void main

Could I have provided a wrong jarpath when I setup the JavaStep ?

RandalAnders
  • 1,431
  • 9
  • 16
mpjjonker
  • 917
  • 1
  • 6
  • 28
  • Should I follow the steps here ? http://www-01.ibm.com/support/knowledgecenter/SSGSPN_9.3.0/com.ibm.tivoli.itws.doc_9.3/common/src_dgx/awsdxcreatingjavajobjar.htm – mpjjonker Nov 05 '15 at 06:56
  • I am playing with jarpath, specifying: /app/wlp/usr/servers//apps/.war/WEB-INF/classes/ results in AWKJJE005E Cannot access required folders. This is the location where the class is, should the class be in an actual jar ? – mpjjonker Nov 05 '15 at 07:01

1 Answers1

1

About the agent name, a new instance should only have the xx_CLOUD agent. If there are 2 agents (BN_CLOUD and BN_CLOUD_1 in your case) that means that there was an internal issue in the service instance provisioning. The operations team is working to identify and remove the issue. Moving your steps on BN_CLOUD_1 is correct as temporary workaround.

About your runtime error, this is because you are trying to run your java class on the CLOUD agent, that is not able to run your jar. This step can be used installing an agent on your own machine and providing your jar locally.

The standard patter to run Java code from the Workload Scheduler service on Bluemix, is to implement a REST API on Liberty runtime that runs your Java code, and then use a REST step in Workload Scheduler service to call that REST API.

You can check the new Java Workload Scheduler Web Starter boilerplate as an example of Java code called by the Workload Scheduler service via REST API. In the boilerplate the code running on Liberty runtime defines also the Workload Scheduler process, but if you prefer you can use the Workload Scheduler UI to create the process manually.

Franco Mossotto
  • 578
  • 3
  • 19
  • Hi Franco, we have the REST API route working, but we hoped NOT to expose the REST Endpoint and add the extra HTTP transport layer. But sticking to the standard has also value, so I guess we will stay with the API call. – mpjjonker Nov 11 '15 at 21:09