• 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

Bundle lib in ejb jar doesn't deploy

 
Greenhorn
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.
 
I've been selected to go to the moon! All thanks to this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic