• 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
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

calling an ejb from jsp

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have created a simple ejb and deployed it in Weblogic, using the generated .jar file.
I then created a webmodule containg a jsp and i have deployed in weblogic .
when i try to call the ejb from the jsp in the webmodule i am getting a
noclassdeffounderror.

my ejb-jar.xml

<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>sampleAccess</ejb-name>
<home>com.sampleejb.SampleejbHome</home>
<remote>com.sampleejb.Sampleejb</remote>
<ejb-class>com.sampleejb.SampleejbBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>

my weblogic-ejb-jar.xml looks like#
weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>sampleAccess</ejb-name>
<jndi-name>nickname</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>


my web-xml looks like

<web-app>
<ejb-ref>
<ejb-ref-name>ejb1</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.sampleejb.SampleejbHome</home>
<remote>com.sampleejb.Sampleejb</remote>
</ejb-ref>
</web-app>


my weblogic.xml looks like

<weblogic-web-app>
<reference-descriptor>
<resource-description>
<res-ref-name/>
<jndi-name/>
</resource-description>
<ejb-reference-description>
<ejb-ref-name>ejb1</ejb-ref-name>
<jndi-name>nickname</jndi-name>
</ejb-reference-description>
</reference-descriptor>
</weblogic-web-app>

if i include the ejb home and remote interface class in the webmodule it works fine.can you help in solving the above issue without adding the ejb interface in the webmodule....


Regards,
Magesh.s
 
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic