EAR deployment results in "zero ejb"

489 views
Skip to first unread message

tjoppietjop

unread,
Oct 31, 2017, 7:23:31 AM10/31/17
to Payara Forum
I am working in Eclipse EE Neon, created an EJB project with a TimerBean (@Stateless) en added an EAR project. The EAR project has the TimerBean int its deployment assembly.
Then I am running the exported EAR-file on my Raspberry Pi (Model B Rev 2) with Payara Micro like this

java -jar ./payara-micro-4.1.2.173.jar --deploy ./EAR.ear

Unfortunately this result in the following ...

[2017-10-31T11:50:31.835+0100] [] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1509447031835] [levelValue: 1000] Exception while deploying the app [EAR                                                                    ]

[2017-10-31T11:50:31.842+0100] [] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1509447031842] [levelValue: 1000] [[
 
Exception during lifecycle processing
java
.lang.IllegalArgumentException: Invalid ejb jar [EAR]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were                                                                     processed properly.
        at org
.glassfish.ejb.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:147)
        at org
.glassfish.ejb.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:112)
        at com
.sun.enterprise.deployment.BundleDescriptor.visit(BundleDescriptor.java:627)
        at org
.glassfish.ejb.deployment.descriptor.EjbBundleDescriptorImpl.visit(EjbBundleDescriptorImpl.java:767)
        at com
.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:121)
        at com
.sun.enterprise.deployment.BundleDescriptor.visit(BundleDescriptor.java:627)
        at com
.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:236)
        at org
.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:189)
        at org
.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:223)
        at org
.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:91)
        at com
.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:882)
        at com
.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:822)
        at com
.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:379)
        at com
.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:220)
        at org
.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:488)
        at com
.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:544)
        at com
.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:540)
        at java
.security.AccessController.doPrivileged(Native Method)
        at javax
.security.auth.Subject.doAs(Subject.java:360)
        at com
.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:539)
        at com
.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:570)
        at com
.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:562)
        at java
.security.AccessController.doPrivileged(Native Method)
        at javax
.security.auth.Subject.doAs(Subject.java:360)
        at com
.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:561)
        at com
.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1469)
        at com
.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:111)
        at com
.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1851)
        at com
.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1727)
        at com
.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:134)
        at fish
.payara.micro.impl.PayaraMicroImpl.deployAll(PayaraMicroImpl.java:1396)
        at fish
.payara.micro.impl.PayaraMicroImpl.bootStrap(PayaraMicroImpl.java:993)
        at fish
.payara.micro.impl.PayaraMicroImpl.main(PayaraMicroImpl.java:186)
        at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java
.lang.reflect.Method.invoke(Method.java:498)
        at fish
.payara.micro.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
        at fish
.payara.micro.boot.loader.Launcher.launch(Launcher.java:107)
        at fish
.payara.micro.boot.loader.Launcher.launch(Launcher.java:70)
        at fish
.payara.micro.boot.PayaraMicroLauncher.main(PayaraMicroLauncher.java:79)
        at fish
.payara.micro.PayaraMicro.main(PayaraMicro.java:361)
]]

[2017-10-31T11:50:32.015+0100] [] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1509447032015] [levelValue: 1000] [[
 
Exception while deploying the app [EAR] : Invalid ejb jar [EAR]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were                                                                     processed properly.]]

Werid thing is ... when I export the project with the TimerBean as a .jar the TimerBean is started as should, no problems at all.
(The timer starts periodically printing the deisgnated output to the console)


Ondrej Mihályi

unread,
Oct 31, 2017, 7:35:33 AM10/31/17
to tjoppietjop, Payara Forum
This is better to raise as an issue on github because it's potentially a bug. Also attach a sample project to reproduce the issue.

Ondro

--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/a3d82155-4297-47bf-81cc-87589f5b5172%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rafael Guerra

unread,
Jan 11, 2018, 8:06:11 PM1/11/18
to Payara Forum
Hi, did you find the solution for this problem. I'm stuck at it. Can you help me?

Steve Millidge (Payara)

unread,
Jan 12, 2018, 4:25:17 AM1/12/18
to Rafael Guerra, Payara Forum

It would be good to get a very simple maven project that reproduces the issue. Do you have one?

--
You received this message because you are subscribed to the Google Groups "Payara Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to payara-forum...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/payara-forum/c18eeb35-547a-4cc7-8108-f8b90a6a7093%40googlegroups.com.

Rafael Guerra

unread,
Jan 12, 2018, 10:40:46 AM1/12/18
to Steve Millidge (Payara), Payara Forum

On Fri, Jan 12, 2018 at 1:21 PM Rafael Guerra <fae...@gmail.com> wrote:
Yes, I made one here. 
--
Rafael Guerra
Master in Software Engineering - Software Architecture
DePaul University


--
Rafael Guerra
Master in Software Engineering - Software Architecture
DePaul University

Ondro Mihályi

unread,
Jan 15, 2018, 6:14:58 PM1/15/18
to Payara Forum
Thanks, Rafael.

I've created an issue in the github issue tracker so that it's easier to document the investigation and fix: https://github.com/payara/Payara/issues/2273

Ondro

On Friday, January 12, 2018 at 4:40:46 PM UTC+1, Rafael Guerra wrote:
Reply all
Reply to author
Forward
0 new messages