[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-user
Subject: [JBoss-user] PortableRemoteObject.narrow(PortableRemoteObject.java:293) and ClassCastException
From: Stuart Barlow <sbarlow () peopledoc ! com>
Date: 2003-03-31 9:04:37
[Download RAW message or body]
Yes its this one again. I have a simple SessionBean in jBoss
3.0.6 and a simple client. I have used xdoclet to generate
the EJB code. I read in an earlier mail that ClassCastException
is thrown from PortableRemoteObject for a number of reasons
not just a casting error. Is this true? What other problems
can cause this?
SERVER START
class has this...
* @ejb.bean name="mull/HummingbirdFusionAdaptorIntf"
* description="SessionBean interface to Mull server"
* jndi-name="com/hc/mull/HummingbirdFusionAdaptorEJB"
* type="Stateless"
each exposed method has this...
* @ejb.interface-method view-type="remote"
this is the xdoclet generated home class...
public interface HummingbirdFusionAdaptorIntfHome
extends javax.ejb.EJBHome
{
public static final String
COMP_NAME="java:comp/env/ejb/mull/HummingbirdFusionAdaptorIntf";
public static final String JNDI_NAME="com/hc/mull/HummingbirdFusionAdaptorEJB";
public com.peopledoc.dmintegration.module.HummingbirdFusionAdaptorIntf create()
throws javax.ejb.CreateException,java.rmi.RemoteException;
}
SERVER END
CLIENT CODE START
java.util.Hashtable contextProps = new java.util.Hashtable();
contextProps.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
contextProps.put(javax.naming.Context.PROVIDER_URL,
"jnp://localhost:1099/");
contextProps.put(javax.naming.Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
contextProps.put("jnp.socketFactory",
"org.jnp.interfaces.TimedSocketFactory");
contextProps.put("jnp.timeout", "0");
contextProps.put("jnp.sotimeou", "0");
javax.naming.Context lContext = new InitialContext(contextProps);
HummingbirdFusionAdaptorIntfHome lHome =
(HummingbirdFusionAdaptorIntfHome)
PortableRemoteObject.narrow(
lContext.lookup(HummingbirdFusionAdaptorIntfHome.JNDI_NAME),
HummingbirdFusionAdaptorIntfHome.class);
CLIENT CODE END
Thanks for any pointers.
Ta.
Stuart.
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic