[jboss-user] [JNDI/Naming/Network] - $Proxy67 cannot be cast to org.jbpm.ejb.LocalCommandServiceH

AJanz do-not-reply at jboss.com
Wed Jul 30 07:05:29 EDT 2008


i am trying to execute a command. 

source code is 


  | 			Object returnValue;
  | 			try {
  | 				GetProcessDefinitionsCommand cmd = new GetProcessDefinitionsCommand();
  | 				InitialContext initialContext = new InitialContext();
  | 				Object obj =  initialContext
  | 				.lookup("ejb/CommandServiceBean");
  | 				System.out.println("Class:" + obj.getClass().getName());
  | 				LocalCommandServiceHome localCommandServiceHome = (LocalCommandServiceHome) initialContext
  | 						.lookup("ejb/CommandServiceBean");
  | 				LocalCommandService localCommandService = localCommandServiceHome.create();
  | 				returnValue = localCommandService.execute(cmd);
  | 				localCommandService.remove();
  | 			} catch (Exception e) {
  | 				e.printStackTrace();
  | 				throw new RuntimeException("couldn't execute command", e);
  | 			}
  | 	 
  |  


but i got an 

java.lang.ClassCastException: $Proxy67 cannot be cast to org.jbpm.ejb.LocalCommandServiceHome 

error when executing. 

i searched everywhere for a duplciate commandservicebean class but can't find it. 

jbpm and my application runs under the same jvm. 

please help 

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

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



More information about the jboss-user mailing list