-
1. Re: ClassCastException thrown when looking up a remote home
harsh_pandit Feb 10, 2004 1:11 AM (in response to zolmed75)hi
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();
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL,"127.0.0.1");
props.put (Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
Context ctx = new InititalContext(props);
I hope its working.
and also check that u must set classpaht properly. -
2. Re: ClassCastException thrown when looking up a remote home
bauschulte Feb 11, 2004 3:01 PM (in response to zolmed75)Hi,
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 -
3. Re: ClassCastException thrown when looking up a remote home
zolmed75 Feb 13, 2004 7:31 PM (in response to zolmed75)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. -
4. Re: ClassCastException thrown when looking up a remote home
darranl Feb 16, 2004 4:24 AM (in response to zolmed75)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? -
5. Re: ClassCastException thrown when looking up a remote home
zolmed75 Feb 17, 2004 6:19 PM (in response to zolmed75)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...