File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling an ejb from jsp

 
magesh sripathy
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic