  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | - Problem accessing CommandServiceBean from external c | - Problem accessing CommandServiceBean from external c 2007-08-11 - By karstendausb
Back Hello,
I am encountering problems accessing jbpm 3.2.1. on jboss, and I don't understand what is going wrong.
I am using the following sample code:
| Properties props = new Properties(); | props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces .NamingContextFactory"); | props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client"); | props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099"); | props.setProperty("j2ee.clientName", "jboss-client-test"); | | InitialContext initialContext = new InitialContext(props); | Object homeref = initialContext.lookup("ejb/CommandServiceBean"); | | RemoteCommandServiceHome remoteCommandServiceHome = (RemoteCommandServiceHome) avax.rmi.PortableRemoteObject.narrow(homeref, RemoteCommandServiceHome.class); | | RemoteCommandService remoteCommandService= remoteCommandServiceHome.create( ); |
Trying the sample command
| VariablesCommand vc=new VariablesCommand(); | Object result=remoteCommandService.execute(vc); | seems to work well, at least the server logs
| ==> jboss-4 (See http://oss-4.ora-code.com).0.4.GA/server/default/log/server.log <== | 2007-08-11 22:03:39,389 DEBUG [org.jbpm.ejb.impl.CommandServiceBean] handing over the command execution to the command service | 2007-08-11 22:03:39,390 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[tx, message, scheduler, logging, persistence, authentication]' | 2007-08-11 22:03:39,390 DEBUG [org.jbpm.JbpmContext] creating org.jbpm .JbpmContext@(protected) | 2007-08-11 22:03:39,390 DEBUG [org.jbpm.ejb.impl.CommandServiceBean] executing org.jbpm.command.VariablesCommand@(protected) | 2007-08-11 22:03:39,390 DEBUG [org.jbpm.JbpmContext] closing JbpmContext |
But when I try to use any other Command which utilizes AbstractGetObjectBaseCommand , like GetProcessDefinitionsCommand for example:
| GetProcessDefinitionsCommand vc=new GetProcessDefinitionsCommand(); | Object result=remoteCommandService.execute(vc); |
an exception is thrown which includes the following segment:
| Caused by: java.io.InvalidClassException: org.jbpm.command .AbstractGetObjectBaseCommand; local class incompatible: stream classdesc serialVersionUID = 4676683671013111655, local class serialVersionUID = -7037309091658557544 |
The full stacktrace is shown below (nothing in the logs on server side). I doublechecked that both (client and server) use the same jbpm-jpdl-version (3 .2.1). The server is a Jboss 4.0.4 GA with an unmodified jbpm-ear.
Anybody seen this behaviour before? I am not an ejb nor an rmi expert, so I don 't understand where the problem is. There are many entries in the forum concerning classcastexceptions, but this topic does not seem to be covered?
Thanks in advance,
Karsten
Here is the full stacktrace:
| java.rmi.MarshalException: MarshalException; nested exception is: | org.jboss.invocation.JBossLazyUnmarshallingException: getArguments failed | at org.jboss.ejb.Container.invoke(Container.java:1004) | at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:585) | at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher .java:155) | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) | at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) | at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker .java:264) | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) | at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke (JRMPInvoker.java:819) | at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java :420) | at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) | at java.lang.reflect.Method.invoke(Method.java:585) | at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294) | at sun.rmi.transport.Transport$1.run(Transport.java:153) | at java.security.AccessController.doPrivileged(Native Method) | at sun.rmi.transport.Transport.serviceCall(Transport.java:149) | at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466) | at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport .java:707) | at java.lang.Thread.run(Thread.java:595) | Caused by: org.jboss.invocation.JBossLazyUnmarshallingException: getArguments failed | at org.jboss.invocation.MarshalledInvocation.getArguments (MarshalledInvocation.java:513) | at org.jboss.ejb.Container.invoke(Container.java:918) | ... 20 more | Caused by: java.io.InvalidClassException: org.jbpm.command .AbstractGetObjectBaseCommand; local class incompatible: stream classdesc serialVersionUID = 4676683671013111655, local class serialVersionUID = -7037309091658557544 | at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546) | at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552) | at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) | at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552) | at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) | at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java :1699) | at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) | at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634) | at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) | at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) | at org.jboss.invocation.MarshalledValue.get(MarshalledValue.java:91) | at org.jboss.invocation.MarshalledInvocation.getArguments (MarshalledInvocation.java:509) | ... 21 more |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic &p=4073326#4073326
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode =reply&p=4073326 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|
 |