• 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

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic