Hello everyone,
I have an EJB3 (.par) persistence project deployed in a Jboss 4.0.5 GA.

I needs to instantiate the AnswerBean (a remote interface) from a stand alone 
java application.

My code looks like:

  | 
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
  | props.put(Context.PROVIDER_URL,"jnp://localhost:1099");
  | props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
  | 
  | Context ctx = new InitialContext(props);
  | AnswerBean factory = (AnswerBean) ctx.lookup("AnswerBeanRemote");
  | 

But when i run it... the following exception is printed:


  | java.lang.ClassCastException: org.jnp.interfaces.NamingContext cannot be 
cast to Persistencia.dao.interfaces.AnswerDAO
  | 

Please... help me with this

Thanks

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035227#4035227

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035227
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to