Last updated on NOVEMBER 05, 2016
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.
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.
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.
- 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.
- Credential is not supplied (anonymous) when creating initial context and WLS is completely started up. Work Manager works as expected.
- 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.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms