My Oracle Support Banner

WebLogic Server (WLS) Work Manager Rejects Scheduled Work During Server Startup (Doc ID 1076330.1)

Last updated on AUGUST 22, 2022

Applies to:

Oracle WebLogic Server - Version 9.2 to 10.3
Information in this document applies to any platform.


Job scheduling requests from an application at the initialization of the application were canceled. This exception was thrown:

You can encounter this problem at WebLogic Server (WLS) startup if an application tries to schedule jobs using the CommonJ Workmanager API at its initialization.

Detailed Scenario:
Customer has ALBPM processes that contain Global Automatic Activities. These Global Automatic Activities listen to JMS queues for messages. In ALBPM 6.x implementation, the engine implements this type of Global Automatic Activity by scheduling a work item with the Work Manager (default or custom). The Work Manager runs the work item in one of its threads. The work item, when executed, dynamically creates a JMS queue consumer that represents a Global Automatic Activity. The issue is that customer noticed no consumers on some queues after server start up.

Troubleshooting Finding:
Testing result shows that there might be problems in Work Manager. The following is more details about the testing done.

Observed different behavior in Work Manager depending on the runtime stages of WLS. When WLS is starting up, Work Manager requires credential to schedule and run a work item. After the server is completely up, Work Manager does not require credential. The following three scenarios provide more detailed description.

The first step in scheduling a work item with Work Manager is to do a JNDI lookup for the Work Manager. You can either supply credential when creating an initial context or use anonymous initial context.

  1. Credential is supplied when creating initial context. Scheduling work item with Work Manager is always successful and the work item is executed immediately. This is true for when the server is starting up and for after the server is completely started up.
  2. Credential is not supplied (anonymous) when creating initial context and WLS is completely started up. Work Manager works as expected.
  3. Credential is not supplied (anonymous) when creating initial context and WLS is starting up (running start up classes for example). Scheduling work with Work Manager can be either rejected or accepted. Most of the times, the first try is rejected and subsequent tries are accepted by the Work Manager. However, even if it is accepted, the work item is not executed by the Work Manager. No error messages are displayed. By looking at ALBPM engine code, you see it is using anonymous initial context to schedule work with Work Manager when WLS is starting up. It also has a 4-minute retry window. So if the server startup time is less than 4 minutes, scheduling work with Work Manager will work even though the initial context is anonymous. However, in customer's case, their WLS start up time is well beyond 4 minutes, therefore scheduling work will fail.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.