File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Bundle lib in ejb jar doesn't deploy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Bundle lib in ejb jar doesn Watch "Bundle lib in ejb jar doesn New topic

Bundle lib in ejb jar doesn't deploy

Victor Orozco

Joined: Sep 18, 2010
Posts: 1
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.

Prabhakar Reddy Bokka
Ranch Hand

Joined: Jul 26, 2005
Posts: 195

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.

I agree. Here's the link:
subject: Bundle lib in ejb jar doesn't deploy
jQuery in Action, 3rd edition