• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Deploying to Glassfish

 
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am struggling to deploy a SLSB on Glassfish.Everytime I export the EAR to Glassfish's autodeploy folder I get the error below.None of the errors make sense to me.First off,it says that there are zero-ejbs in the EAR.Which is wrong,I have an SLSB(althought it's interfaces are in a client-jar) .Also,I can see that the ejb-jar.xml has an entry for the ejb-client-jar.Secondly it tells me that ejb/Item could not be found.I don't know how this can be because the SLSB project has a reference to my Entity project(visible under the build path->projects tab in Eclipse).Also my entity project has the package ejb and it has a persistence.xml stating the fully qualified class-names of my entities.Something that I find odd is that if I select the EAR and show the JavaEE modules I can see my entity project but the option to add the entity project to the lib of the EAR is not available...Please advise...

Below is the stack trace....


[#|2010-02-11T08:09:06.515+0200|INFO|glassfishv3.0|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=30;_ThreadName=Thread-1;|[AutoDeploy] Selecting file D:\Program Files\Glassfish\glassfish\domains\domain1\autodeploy\EJBActionBazaarEAR.ear for autodeployment.|#]

[#|2010-02-11T08:09:07.437+0200|SEVERE|glassfishv3.0|global|_ThreadID=30;_ThreadName=Thread-1;|Class [ ejb/Item ] not found. Error while loading [ class ejb.ItemManager ]|#]

[#|2010-02-11T08:09:07.437+0200|WARNING|glassfishv3.0|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=30;_ThreadName=Thread-1;|Error in annotation processing: java.lang.NoClassDefFoundError: ejb/Item|#]

[#|2010-02-11T08:09:07.437+0200|SEVERE|glassfishv3.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=30;_ThreadName=Thread-1;|Exception while deploying the app
java.lang.IllegalArgumentException: Invalid ejb jar [EJBActionBazaar.jar]: 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 com.sun.enterprise.deployment.util.EjbBundleValidator.accept(EjbBundleValidator.java:72)
at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:124)
at com.sun.enterprise.deployment.EjbBundleDescriptor.visit(EjbBundleDescriptor.java:722)
at com.sun.enterprise.deployment.Application.visit(Application.java:1744)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:774)
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:253)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:222)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:145)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:78)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:612)
at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:554)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:262)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:141)
at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:573)
at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:459)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:391)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:376)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:195)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
|#]
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please, UseAMeaningfulSubjectLine
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tried deleting and recreating the glassfish domain.Still not working..
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
***SOLVED****

I didn't have a sun-ejb-jar....
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Duran,

I am getting the exact error. can you tell me what you mean by you not having a sun-ejb-jar?
 
reply
    Bookmark Topic Watch Topic
  • New Topic