• 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Bundle lib in ejb jar doesn't deploy

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic