weblogic.application.ModuleException: Exception preparing module: EJBModule(ModelEJB.jar) No EJBs found in the ejb-jar file 'ModelEJB.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation..'

Tools: 
Studio Edition Version 11.1.1.3.0, EJB3.0, Adf faces


When I was trying to deploy the application I was having following error

<Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1285491833557' for task '5'. Error is: 'weblogic.application.ModuleException: Exception preparing module: EJBModule(ModelEJB.jar)

[EJB:011023]An error occurred while reading the deployment descriptor. The error was:

No EJBs found in the ejb-jar file 'ModelEJB.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation..'

weblogic.application.ModuleException: Exception preparing module: EJBModule(ModelEJB.jar)

[EJB:011023]An error occurred while reading the deployment descriptor. The error was:

No EJBs found in the ejb-jar file 'ModelEJB.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation..

at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:467)

at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)

at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)

at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)

at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)

Truncated. see log file for complete stacktrace
Caused By: java.io.IOException: No EJBs found in the ejb-jar file 'ModelEJB.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.

at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:219)

at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)

at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1242)

at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:395)

at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)

Truncated. see log file for complete stacktrace

>

weblogic.application.ModuleException: Exception preparing module: EJBModule(ModelEJB.jar)

[EJB:011023]An error occurred while reading the deployment descriptor. The error was:

No EJBs found in the ejb-jar file 'ModelEJB.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation..

at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:467)

at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)

at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:507)

at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)

at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)

Truncated. see log file for complete stacktrace
Caused By: java.io.IOException: No EJBs found in the ejb-jar file 'ModelEJB.jar'. Please ensure the ejb-jar contains EJB declarations via an ejb-jar.xml deployment descriptor or at least one class annotated with the @Stateless, @Stateful or @MessageDriven EJB annotation.

at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:219)

at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)

at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1242)

at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:395)

at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)

Truncated. see log file for complete stacktrace

>

[12:03:53 PM] #### Deployment incomplete. ####

[12:03:53 PM] Remote deployment failed


Solution:
In my case i solved this issue as 
simply right click on your viewController in Jdeveloper click on properties select depandancies and select Model and check build output as below. :)

Comments

  1. When I try to download an attachment I get an error msg about an unhandled exception raised in 3rd party module?

    Thx
    Brad Fallon

    ReplyDelete
  2. Thank you Adnan. It works for me.

    ReplyDelete
  3. That is correct, that solved my problem too.

    ReplyDelete

Post a Comment

Popular posts from this blog

Unable to create a server socket for listening on channel "Default[4]". The address 0:0:0:0:0:0:0:1 might be incorrect or another process is using port 8001: java.net.BindException: Address already in use: JVM_Bind.

[Deployer:149164]The domain edit lock is owned by another session in exclusive mode - hence this deployment operation cannot proceed.

Database Connection issues in Jdeveloper with MySQL Database