• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Using a regular bean in a statefull Session bean

 
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Websphere 5.1

I added the bean project to the bean path and Project Referances in Project Properties for the Session bean.

I have a regular bean class (None-ejb), and I want to use it in a Session bean. But in the create I get an error "java.lang.NoClassDefFoundError: EZTaxJavaJNI.EZTaxJNI" when I call create().

public class JNIFacadeBean implements javax.ejb.SessionBean {
private EZTaxJNI ezJNI;

public void ejbCreate() throws javax.ejb.CreateException {
ezJNI = new EZTaxJNI();
}

//other stuff...


}
 
author & internet detective
Posts: 42160
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to add the references as java jar dependencies. Those are used at runtime, while the build path is used at compile time.
 
M Burke
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That worked, thanks Jeanne
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic