[jboss-user] [JBoss Messaging] - java.lang.ClassCastException

svr.vin do-not-reply at jboss.com
Thu Dec 4 02:51:13 EST 2008


Hi

  i am using the JBoss-4.2.3.GA, JB-Messaing-1.4.0.GA and JDK 1.6.0_07 for my project.
   
   At the runtime the following error message is coming

  | java.lang.ClassCastException: org.jnp.interfaces.MarshalledValuePair cannot be cast to javax.jms.QueueConnectionFactory 
  |  	


the code is below, the error showing at the lookup line (last line) .


  | 	
  |  Hashtable params = new Hashtable();
  |   	params.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
  | 	params.put(Context.PROVIDER_URL, "localhost:1199");
  | 	params.put(Context.URL_PKG_PREFIXES, "org.jnp.naming:org.jnp.interfaces");
  |     	Context context = new InitialContext(params);
  |     	QueueConnectionFactory fac = (QueueConnectionFactory)context.lookup("ConnectionFactory");	
  | 
  | 

    Is there any changes required for JBossMQ to JBoss Messaging in the code.

    thanks in adv.



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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194226



More information about the jboss-user mailing list