Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebLogic Application does not have any Components in it

We are upgrading a J2EE application (JSP & EJB 2.0) from WebLogic Service 8.1 to 12c(12.2.1.1.0). We are building an exploded EAR to a directory in the domain directory. We use the admin console to deploy the application but it fails with weblogic.management.DeploymentException: Application <appname> does not have any Components in it.

The following appears in the logs:

####<Sep 26, 2016, 6:16:08,62 PM EDT> <Error> <Deployer> <CVG-000216B-010> <BaseServer> <[STANDBY] ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <9b2f9073-e2d2-4c02-915c-4e5de240621e-00000012> <1474928168062> <[severity-value: 8] [rid: 0] [partition-id: 0] [partition-name: DOMAIN] > <BEA-149265> <Failure occurred in the execution of deployment request with ID "25758041366812" for task "0" on [partition-name: DOMAIN]. Error is: "weblogic.management.DeploymentException: Application [MyApp] does not have any Components in it."
weblogic.management.DeploymentException: Application [MyApp] does not have any Components in it.
    at weblogic.jdbc.module.JDBCDeployment.createModule(JDBCDeployment.java:40)
    at weblogic.jdbc.module.JDBCDeployment.<init>(JDBCDeployment.java:25)
    at weblogic.jdbc.module.JDBCDeploymentFactory.createDeployment(JDBCDeploymentFactory.java:79)
    at weblogic.application.internal.DeploymentManagerImpl.createDeployment(DeploymentManagerImpl.java:186)
    at weblogic.application.internal.DeploymentManagerImpl.access$700(DeploymentManagerImpl.java:52)
    at weblogic.application.internal.DeploymentManagerImpl$DeploymentCreatorImpl.createDeployment(DeploymentManagerImpl.java:583)
    at weblogic.deploy.internal.targetserver.BasicDeployment.createDeployment(BasicDeployment.java:231)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:223)
    at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:103)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:241)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:794)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1340)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:267)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:177)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:186)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:14)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:47)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:666)
    at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
    at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
    at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
    at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
    at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:640)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:406)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)
> 

The app does install (State="Installed"), but it cannot be started. If we delete it and reinstall it, no errors occur and its state is "Active" and we can test the application. However, when the server restarts, the above exception appears in the logs and the app is in a "ADMIN" state. It cannot be started, so we then delete it and reinstall again it via the admin console and it runs allowing us to test it.

The application does have J2EE components in it, at least the web app, as that is what we are testing. Once we delete the application and re-install it from the admin console, we see the web app, all the EJBs and the EJB Modules in the "Modules and Components" section of the Deployment Summary page.

We looked into the WebLogic code and found where the error is being generated. It appears there are no component MBeans being generated for the application. This is from the weblogic.jdbc.module.JDBCDeployment class:

private static Module createModule(AppDeploymentMBean mbean) throws DeploymentException {
    ComponentMBean[] c = mbean.getAppMBean().getComponents();
    if ((c == null) || (c.length == 0)) {
        throw new DeploymentException("Application " + ApplicationVersionUtils.getDisplayName(mbean) + " does not have any Components in it.");
    }
    --[snipped]--

What do we have to do to deploy an exploded EAR so that WebLogic 12c recognizes the components when the application is initially loaded?

Thanks in advance for any help or insight you might have.

like image 419
SCote Avatar asked Oct 04 '16 17:10

SCote


1 Answers

Thanks to the recommendation of Emmanuel Collin, this issue was resolved by renaming a data source which had the same name as the application.

  1. Delete application
  2. Delete offending data source
  3. Recreate data source with new name
  4. Re-install application

The application installs without error and is available once the server comes up.

like image 59
SCote Avatar answered Oct 27 '22 18:10

SCote