File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Class Cast Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Class Cast Exception" Watch "Class Cast Exception" New topic

Class Cast Exception

vinoth subramaniam
Ranch Hand

Joined: Jul 05, 2008
Posts: 47
Hi all,
I am a new to EJB. I am usind JBOSS 4.0.2, Xdoclet 1.2.3 and JDK 1.6 and EJB 2. When i tried to invoke the Stateless session bean. I am getting the ClassCastException error. Here is the Error.
Can you please help me to solve this issue..!

1. What are the configurations need to be done in JBOSS AS to use EJB?
2. Is there any problem with the versions of JBOSS, JDK, and Xdoclet. If so, what it is?

Error in the console

vinoth subramaniam
Ranch Hand

Joined: Jul 05, 2008
Posts: 47
I searched in the saloon and found this Thread.
Saying that
As the ClassCastException is occuring during narrow there is a high probability that the war file is referencing a different version of the jar file containing Home and Remote interfaces. Please compile and create the client jar [jar containing Home and Remote to be specified in the classpath of web application] again with the latest source code [and compile with the same Java version as that of the jar file for EJB application] and redeploy the war file.
. How to do this exactly. I run the Xdoclet once again.But still i am getting the same error again and again. Please help me to out.
I agree. Here's the link:
subject: Class Cast Exception
It's not a secret anymore!