Deployment exception because operation cannot be performed until the WebLogic server is restarted
Problem:
I tried to create a datasource on Oracle WebLogic 12.1.3, but encountered the following error on the WebLogic Admin Console:
The full error stack in AdminServer.log:
####<Sep 26, 2019 10:25:07 AM MDT> <Error> <Console> <soahost1> <AdminServer> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <2f60d060-b092-4c27-b969-de8684116755-0001bb39> <1569515107237> <BEA-240003> <Administration Console encountered the following error: weblogic.management.DeploymentException: [Deployer:149189]An attempt was made to execute the "activate" operation on an application named "myDS" that is not currently available. The application may have been created after non-dynamic configuration changes were activated. If so, the operation cannot be performed until the server is restarted so that the application will be available.
at weblogic.deploy.internal.targetserver.DeploymentManager.assertDeploymentMBeanIsNonNull(DeploymentManager.java:1341)
at weblogic.deploy.internal.targetserver.DeploymentManager.findDeploymentMBean(DeploymentManager.java:1382)
at weblogic.deploy.internal.targetserver.DeploymentManager.createOperation(DeploymentManager.java:1072)
at weblogic.deploy.internal.targetserver.DeploymentManager.createOperations(DeploymentManager.java:1428)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleUpdateDeploymentContext(DeploymentManager.java:164)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.updateDeploymentContext(DeploymentServiceDispatcher.java:168)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doUpdateDeploymentContextCallback(DeploymentReceiverCallbackDeliverer.java:147)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.updateDeploymentContext(DeploymentReceiverCallbackDeliverer.java:28)
at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.callDeploymentReceivers(ReceivedPrepare.java:203)
at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.handlePrepare(ReceivedPrepare.java:112)
at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.receivedPrepare(ReceivedPrepare.java:52)
at weblogic.deploy.service.internal.targetserver.TargetRequestImpl.run(TargetRequestImpl.java:211)
at weblogic.deploy.service.internal.transport.CommonMessageReceiver$1.run(CommonMessageReceiver.java:457)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
>
Analysis:
After inspecting the log file AdminServer.log, I have the following snippet preceding the error above:
####<Sep 26, 2019 10:25:06 AM MDT> <Info> <Deployer> <soahost1> <AdminServer> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <2f60d060-b092-4c27-b969-de8684116755-0001bb39> <1569515106221> <BEA-149038> <Initiating task for myDS : [Deployer:149026]activate application myDS on soa_cluster..>
####<Sep 26, 2019 10:25:07 AM MDT> <Warning> <Deployer> <soahost1> <AdminServer> <[ACTIVE] ExecuteThread: '18' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <2f60d060-b092-4c27-b969-de8684116755-0001bb3a> <1569515107232> <BEA-149004> <Failures were detected while initiating activate task for application "myDS".>
The error appeared to be an activation issue on "soa_cluster".
Solution:
1. Create the datasource but do not target it to anything.
2. Save and activate changes.
3. Go back and target the datasource to “soa_cluster”.
4. Save and activate changes.