java - IllegalArgumentException: Invalid ejb jar: it contains zero ejb -


i've seem plenty of questions regarding issue , still couldn't fixed, i'm aware exception thrown when 1 tries deploy ejb module without classes annotated @stateless, @stateful, @messagedriven or @singleton. isn't case, have several classes annotated this:

@stateless @remote(testserviceinterface.class) public class testservice extends testsuperclass implements testserviceinterface<test>, serializable{ } 

and here interface:

public interface testserviceinterface<t> extends anotherinterface<t>{ } 

all of interfaces located in project, have jar added ejb module lib.

when try deploy following exception:

1. valid ejb jar requires @ least 1 session, entity (1.x/2.x style), or message-driven bean.  2. ejb3+ entity beans (@entity) pojos , please package them library jar.  3. if jar file contains valid ejbs annotated ejb component level annotations (@stateless, @stateful, @messagedriven, @singleton), please check server.log see whether annotations processed properly.     @ com.sun.enterprise.deployment.util.ejbbundlevalidator.accept(ejbbundlevalidator.java:76)     @ com.sun.enterprise.deployment.util.applicationvalidator.accept(applicationvalidator.java:128)     @ com.sun.enterprise.deployment.ejbbundledescriptor.visit(ejbbundledescriptor.java:730)     @ com.sun.enterprise.deployment.application.visit(application.java:1765)     @ com.sun.enterprise.deployment.archivist.applicationfactory.openarchive(applicationfactory.java:195)     @ org.glassfish.javaee.core.deployment.dolprovider.load(dolprovider.java:185)     @ org.glassfish.javaee.core.deployment.dolprovider.load(dolprovider.java:94)     @ com.sun.enterprise.v3.server.applicationlifecycle.loaddeployer(applicationlifecycle.java:827)     @ com.sun.enterprise.v3.server.applicationlifecycle.setupcontainerinfos(applicationlifecycle.java:769)     @ com.sun.enterprise.v3.server.applicationlifecycle.deploy(applicationlifecycle.java:368)     @ com.sun.enterprise.v3.server.applicationlifecycle.deploy(applicationlifecycle.java:240)     @ org.glassfish.deployment.admin.deploycommand.execute(deploycommand.java:389)     @ com.sun.enterprise.v3.admin.commandrunnerimpl$1.execute(commandrunnerimpl.java:348)     @ com.sun.enterprise.v3.admin.commandrunnerimpl.docommand(commandrunnerimpl.java:363)     @ com.sun.enterprise.v3.admin.commandrunnerimpl.docommand(commandrunnerimpl.java:1085)     @ com.sun.enterprise.v3.admin.commandrunnerimpl.access$1200(commandrunnerimpl.java:95)     @ com.sun.enterprise.v3.admin.commandrunnerimpl$executioncontext.execute(commandrunnerimpl.java:1291)     @ com.sun.enterprise.v3.admin.commandrunnerimpl$executioncontext.execute(commandrunnerimpl.java:1259)     @ com.sun.enterprise.v3.admin.adminadapter.docommand(adminadapter.java:461)     @ com.sun.enterprise.v3.admin.adminadapter.service(adminadapter.java:212)     @ com.sun.grizzly.tcp.http11.grizzlyadapter.service(grizzlyadapter.java:179)     @ com.sun.enterprise.v3.server.hk2dispatcher.dispath(hk2dispatcher.java:117)     @ com.sun.enterprise.v3.services.impl.containermapper$hk2dispatchercallable.call(containermapper.java:354)     @ com.sun.enterprise.v3.services.impl.containermapper.service(containermapper.java:195)     @ com.sun.grizzly.http.processortask.invokeadapter(processortask.java:860)     @ com.sun.grizzly.http.processortask.doprocess(processortask.java:757)     @ com.sun.grizzly.http.processortask.process(processortask.java:1056)     @ com.sun.grizzly.http.defaultprotocolfilter.execute(defaultprotocolfilter.java:229)     @ com.sun.grizzly.defaultprotocolchain.executeprotocolfilter(defaultprotocolchain.java:137)     @ com.sun.grizzly.defaultprotocolchain.execute(defaultprotocolchain.java:104)     @ com.sun.grizzly.defaultprotocolchain.execute(defaultprotocolchain.java:90)     @ com.sun.grizzly.http.httpprotocolchain.execute(httpprotocolchain.java:79)     @ com.sun.grizzly.protocolchaincontexttask.docall(protocolchaincontexttask.java:54)     @ com.sun.grizzly.selectionkeycontexttask.call(selectionkeycontexttask.java:59)     @ com.sun.grizzly.contexttask.run(contexttask.java:71)     @ com.sun.grizzly.util.abstractthreadpool$worker.dowork(abstractthreadpool.java:532)     @ com.sun.grizzly.util.abstractthreadpool$worker.run(abstractthreadpool.java:513)     @ java.lang.thread.run(thread.java:745). 

update:

it prints line before throwing exception:

[#|2015-06-25t08:43:22.256-0300|warning|glassfish3.1.2|global|_threadid=126;_threadname=thread-2;|error in annotation processing: java.lang.noclassdeffounderror: com/packagename/testserviceinterface|#] 

update 2

it seems netbeans somehow being able deploy it! if try deploy directly on glassfish admin page or via command line("asadmin deploy") exception.

i'm missing something, appreciated.

it seems reason testsuperclass not extended remote ejb, had remove extends testsuperclass.

instead of this:

@stateless @remote(testserviceinterface.class) public class testservice extends testsuperclass implements testserviceinterface<test>, serializable{ } 

i declade class this:

@stateless @remote(testserviceinterface.class) public class testservice implements testserviceinterface<test>, serializable{ } 

now it's not throwing exception anymore.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -