• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Bundle lib in ejb jar doesn't deploy

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi people, I've reading java ranch about 3 months and this is my first post. Great forum
I'm working with netbeans 6.9, glassfish 3 and JEE6. I have a scenario with a very limited upload bandwidth server and a JEE application, So every time I need to change the application for little changes is a nightmare upload the whole EAR file.

I created a java class library named Interfaces and I created remote interfaces for stateless session beans and moved it to the java class lib. And include this lib on the EJBs and WAR,

So actualiy I have;

1) One war for the web project
2) Three EJB with one stateless session bean
3) One java class library with the remote interface of the stateless session beans

If I build and pack the EJBs I could see interfaces.jar file into the ejb's jar files, but if I try to deploy any ejb or the war I got an error similar to this.

WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/nabenik/garbage/Bean2Remote
SEVERE: Exception while deploying the app
java.lang.IllegalArgumentException: Invalid ejb jar [EJB2]: it contains zero ejb.

I copied the interfaces.jar in $GLASSFISH_HOME/glassfish/domains/domain1/lib. If I restart the server I'm able to deploy the .jar files

I also try to call methods in external utilitarian libs and I got the same issue, if I don't copy them on the domain1/lib folder, I cannot deploy the EJB although the EJB includes .jar external libraries.

It's strange because I also have a project with this scheme running JEE5 and glassfish 2. All works fine.

Thanks for your time guys.

Ranch Hand
Posts: 198
Oracle Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check with your interfaces.jar file if it contains all the files and correct struture.
It doubt its not created properly or something is missing in the jar file.

If the jar file is proper, it should get deployed properly.
Don't MAKE me come back there with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic