WebLogic Application does not have any Components in it(转)

WebLogic Application does not have any Components in it

转https://stackoverflow.com/questions/39858757/weblogic-application-does-not-have-any-components-in-it

Ask Question

4

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.

java java-ee weblogic weblogic12c

shareimprove this question

asked Oct 4 ’16 at 17:51

《WebLogic Application does not have any Components in it(转)》

SCote

154211

Did you upgrade all deployment descriptors from 8.1 to 12.2.1.1.0 ? –Emmanuel Collin Oct 4 ’16 at 19:42

Yes, we used weblogic.DDConverter to update everything; application.xml and all the ejb descriptors (e.g ejb-jar.xml) including the weblogic-specific files like weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml. –SCote Oct 4 ’16 at 21:06 

2

Do you have any jdbc datasource whose name is identical to your application or to a module ? If yes, change it and redeploy your application. –Emmanuel Collin Oct 5 ’16 at 6:50

add a comment

1 Answer

activeoldestvotes

4

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

Delete application

Delete offending data source

Recreate data source with new name

Re-install application

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

shareimprove this answer

answered Oct 5 ’16 at 14:17

《WebLogic Application does not have any Components in it(转)》

SCote

154211

I was facing the same issue and while I’m not a 100 percent positive that this solved my problem nonetheless my problem is gone. My data source’s name was bank and used jdbc/bank as my JNDI name (now I use jdbc/bankDS). Tried using bank just the JNDI name but I was still getting the error sometimes. Another thing I’ve started doing after I got cryptic errors was stopping WebLogic with “stop scripts” instead of just killing the server with Ctrl+C. –Kohányi Róbert Aug 24 ’18 at 16:35 

add a comment

    原文作者:t792072899
    原文地址: https://www.jianshu.com/p/3256d0c277be?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞