aspose file tools*
The moose likes JBoss/WildFly and the fly likes Jboss EJB deployment issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Jboss EJB deployment issue" Watch "Jboss EJB deployment issue" New topic
Author

Jboss EJB deployment issue

John P Shananan
Greenhorn

Joined: Jan 19, 2007
Posts: 8
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!
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

Are you deploying the EJB as part of an ear file or is it just an ejb jar file?


[My Blog] [JavaRanch Journal]
John P Shananan
Greenhorn

Joined: Jan 19, 2007
Posts: 8
it is part of an ear
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

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

Joined: Jan 19, 2007
Posts: 8
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
Marshal

Joined: Jul 20, 2005
Posts: 10266
    
168

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jboss EJB deployment issue