• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Jboss EJB deployment issue

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a simple J2ee application. Take a look at this image for the code structure:

Now, as you can see from it, ArRc_core becomes ArRc_core.jar. It has some common api that the EJB uses. At build time, I do not have any issues. But when I deploy the ear on JBoss 4.2.2 it shows up this exception:

and My Session Bean is not getting deployed.

I tried everything. changing class-path in manifest.mf, copying ArRc_core.jar to /server/default/lib etc.. but nothing works.

Please let me know how I can include this dependent jar with the ejb jar.
Here is my jboss.xml:

This is my ejb-jar.xml:


<enterprise-beans>
<session>
<display-name>BookingManagerBean</display-name>
<ejb-name>BookingManagerBean</ejb-name>
<home>com.dcu.arrc.ejb.BookingManagerHome</home>
<remote>com.dcu.arrc.ejb.BookingManager</remote>
<ejb-class>com.dcu.arrc.ejb.BookingManagerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>

<ejb-client-jar>ArRc_ejbClient.jar</ejb-client-jar>

I am a Jboss rookie and need this very urgently. Please help!
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you deploying the EJB as part of an ear file or is it just an ejb jar file?
 
John P Shananan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
it is part of an ear
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Create a folder named "lib" directly at the root of the ear and place your common-api jar inside that lib folder. The jar will then be made available to your entire application (which includes the EJB)
 
John P Shananan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried this already. I infact included this in application.xml:
<library-directory>lib</library-directory>

I noticed something here. I get this error when i declare my bean like this:
public Booking addBooking(Booking booking) {
return null;
}

public Booking getBooking(String bookingID) {
return null;
}

and I don't face any issue when i declare the same methods like this:

public String addBooking(String booking) {
Booking b = new Booking()
}

public String getBooking(String bookingID) {
return null;
}

when Booking is a return type/param - it throws me a NoClassDefFoundError at deployment, but when the same Booking is a part of business method, it doesn't complain!!!

Btw, my Booking class implements Serializable.
I am totally clueless now.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At this point, you will have to post the entire exception stacktrace. Where is the Booking class located(in which jar)? And do you have the jar file(s), which might be required by the Booking class, in the classpath? I mean your Booking class might be referring (either extending or importing or any other means) to some other class which might not be available in the classpath.
 
So it takes a day for light to pass through this glass? So this was yesterday's tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic