U can use the following syntex insetad of
Context ctx = new InititalContext();
u can write following code insetad of above line
Properties props = new Properties();
Context ctx = new InititalContext(props);
I hope its working.
and also check that u must set classpaht properly.
often i get a ClassCastException when the Stubs for the
client not available or the stubs out of syn
if you have a debugger, check the result of the EJBHome object
you can make 2 steps to make the lookup for your ejb
EJBHome home = context.lookup(..)
check the homeobject in the debugger, you can see if the stubs available
Actually, I've been looking around the JBoss forum and have seen a few other people with a similar problem as I'm having. Based on some of the replies I've seen, it seems to have something to do with the new class loading architecture of JBoss 3.x, which would explain why I don't have any problems on JBoss 2.4.4.
What version of JBoss are you guys using? If you're using 3.0.7 or above, do you have any problems when lookup up remote home objects? If not, can you describe what your deployment environment is like (i.e. the classpath setting on the client, your standardjboss.xml file on the server, etc.). Thanks in advance.
Have you updated the client to use the client jars from the new version of JBoss instead of the old ones?
Also are the server and client using the same JDK version?
Both the client and server are using sdk1.4.2. What are the "client jars" you're reffering to? I thought the only thing the client needs are the remote EJB interfaces. Also, since JBoss uses dynamic proxies, I was under the impression that the only class that needs to be loaded at runtime during a lookup is the remote InvocationHandler class being used by the dynamic proxy. Is this correct or am I dreaming? Thanks in advance...