Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ClassCastException While executing Stateless Session Bean  RSS feed

 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Am new to EJB and executing the sample stateless session bean example through servlet.

But I am getting java.lang.ClassCastException

I am using Jboss 5.0.1 Application server with JDK 1.6

My servlet code.





The error message i am getting.




Please help me where am i wrong..

Thanks in advance




 
R K Singh
Ranch Hand
Posts: 5390
1
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>> Object object = ctx.lookup("java:comp/env");

Provide JNDI name that you have provided in descriptor say ejb/SignOnHome
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!