[JBoss jBPM] - java.lang.ClassCastException: $Proxy67 cannot be cast to or
by AJanz
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=4167578#4167578
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167578
16 years, 5 months
[JNDI/Naming/Network] - Trying to access RemoteEJBs through firewall
by HerQpapa
Hi,
I am using JBoss portal 2.6.2.GA with JBoss [Trinity] 4.2.1.GA. I have problem connecting to RemoteEJB through a firewall.
My descriptor:
| <mbean code="org.jboss.naming.NamingService"
| name="jboss:service=Naming"
| xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
| <attribute name="CallByValue">false</attribute>
| <attribute name="Port">1099</attribute>
| <attribute name="BindAddress">${jboss.bind.address}</attribute>
| <attribute name="RmiPort">1098</attribute>
| ....
| </mbean>
|
which is working fine until the communication is delegated to a random port between 26000 and 48000.
I was trying to achieve something that is possible with plain RMI where I can explicitly set the port for communication through the UnicastRemoteObject(port).
Is there any way that I can set the port for the remote EJBs explicitly? I tried to search the forums but did not find much on this subject.
Thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167567#4167567
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167567
16 years, 5 months
[JBoss jBPM] - Unable to assign more than one group to a task???
by sumit.jbpm
Hi there,
I am trying to assign 2 groups to a task, but I was not able to do that.
I referred to the jbpm-userguide document available at the following link http://docs.jboss.org/jbpm/v3/userguide/taskmanagement.html#theidentityco...
Here is the processDefinition.xml that I used:
<?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.2" name="MultipleAssignmentProcess">
| <swimlane name="CD">
| <assignment expression="group(CD)"></assignment>
| </swimlane>
| <start-state name="start">
| <transition name="" to="simpletask1"></transition>
| </start-state>
| <task-node name="simpletask1">
| <task name="simpletask1">
| <assignment expression="group(Sales) --> group(CM)"/>
| </task>
| <transition name="" to="simpletask2"></transition>
| </task-node>
| <task-node name="simpletask2">
| <task name="simpletask2" swimlane="CD">
| </task>
| <transition name="" to="end"></transition>
| </task-node>
| <end-state name="end"></end-state>
| </process-definition>
This processDefinition.xml got deployed successfully but when I am trying to execute it by creating a processInstance, it is throwing the folowing error throwing java.lang.ClassCastException: org.jbpm.identity.Group:
14:06:04,521 INFO [STDOUT] ACTION :CreateProcess
| 14:06:04,521 INFO [STDOUT] PDNAME :MultipleAssignmentProcess
| 14:06:04,521 INFO [STDOUT] PROCESSINSTANCE ID :null
| 14:06:04,521 INFO [STDOUT] TASK ID :null
| 14:06:04,536 INFO [STDOUT] wfService : com.framework.workflow.WorkflowServiceImpl@1188793
| 14:06:04,536 INFO [STDOUT] Inside WorkflowAdapter:createProcessInstance
| 14:06:04,536 INFO [STDOUT] Inside JBPMClient:createProcessInstance
| 14:06:04,536 INFO [STDOUT] JSPMContext: org.jbpm.JbpmContext@16ce64e
| 14:06:04,693 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
| 14:06:04,771 INFO [STDOUT] org.jbpm.graph.def.DelegationException: couldn't resolve assignment expression 'group(Sales) --> group(CM)'
| 14:06:04,833 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
| java.lang.ClassCastException: org.jbpm.identity.Group
| at org.jbpm.identity.assignment.ExpressionAssignmentHandler.resolveNextTerm(ExpressionAssignmentHandler.java:168)
| at org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(ExpressionAssignmentHandler.java:78)
| at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:271)
| at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:244)
| at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:198)
| at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:197)
| at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
| at org.jbpm.graph.def.Node.enter(Node.java:318)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
| at org.jbpm.graph.def.Node_$$_javassist_135.enter(Node_$$_javassist_135.java)
| at org.jbpm.graph.def.Transition.take(Transition.java:151)
| at org.jbpm.graph.def.Node.leave(Node.java:393)
| at org.jbpm.graph.node.StartState.leave(StartState.java:70)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
| at org.jbpm.graph.def.Node_$$_javassist_135.leave(Node_$$_javassist_135.java)
| at org.jbpm.graph.exe.Token.signal(Token.java:192)
| at org.jbpm.graph.exe.Token.signal(Token.java:140)
| at com.framework.workflow.jbpm.JBPMClient.createProcessInstance(JBPMClient.java:49)
| at com.framework.workflow.adapter.WorkflowAdapter.createProcessInstance(WorkflowAdapter.java:13)
| at com.framework.workflow.WorkflowServiceImpl.createProcessInstance(WorkflowServiceImpl.java:12)
| at org.apache.jsp.jsp.TestWorkflow_jsp._jspService(TestWorkflow_jsp.java:82)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:595)
And, when I define the swimlane tag like in the following processDefinition.xml:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="urn:jbpm.org:jpdl-3.2" name="MultipleAssignmentProcess">
| <swimlane name="Sales_CM">
| <assignment expression="group(Sales, CM)"></assignment>
| </swimlane>
| <swimlane name="CD_AD">
| <assignment expression="group(CD, AD)"></assignment>
| </swimlane>
| <start-state name="start">
| <transition name="" to="simpletask1"></transition>
| </start-state>
| <task-node name="simpletask1">
| <task name="simpletask1" swimlane="Sales_CM"></task>
| <transition name="" to="simpletask2"></transition>
| </task-node>
| <task-node name="simpletask2">
| <task name="simpletask2" swimlane="CD_AD">
| </task>
| <transition name="" to="end"></transition>
| </task-node>
| <end-state name="end"></end-state>
| </process-definition>
then I am getting the following error throwing org.jbpm.identity.assignment.ExpressionAssignmentException: group 'Sales, CM' couldn't be fetched from the user db:
| 15:09:50,490 INFO [STDOUT] ACTION :CreateProcess
| 15:09:50,490 INFO [STDOUT] PDNAME :MultipleAssignmentProcess
| 15:09:50,490 INFO [STDOUT] PROCESSINSTANCE ID :null
| 15:09:50,490 INFO [STDOUT] TASK ID :null
| 15:09:50,490 INFO [STDOUT] wfService : com.framework.workflow.WorkflowServiceImpl@1c7a9de
| 15:09:50,490 INFO [STDOUT] Inside WorkflowAdapter:createProcessInstance
| 15:09:50,490 INFO [STDOUT] Inside JBPMClient:createProcessInstance
| 15:09:50,490 INFO [STDOUT] JSPMContext: org.jbpm.JbpmContext@1615ef2
| 15:09:50,599 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
| 15:09:50,677 INFO [STDOUT] org.jbpm.graph.def.DelegationException: couldn't resolve assignment expression 'group(Sales, CM)'
| 15:09:50,771 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
| org.jbpm.identity.assignment.ExpressionAssignmentException: group 'Sales, CM' couldn't be fetched from the user db
| at org.jbpm.identity.assignment.ExpressionAssignmentHandler.getGroupByName(ExpressionAssignmentHandler.java:200)
| at org.jbpm.identity.assignment.ExpressionAssignmentHandler.resolveFirstTerm(ExpressionAssignmentHandler.java:152)
| at org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(ExpressionAssignmentHandler.java:75)
| at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:271)
| at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:244)
| at org.jbpm.taskmgmt.exe.TaskMgmtInstance.getInitializedSwimlaneInstance(TaskMgmtInstance.java:227)
| at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:191)
| at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:197)
| at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
| at org.jbpm.graph.def.Node.enter(Node.java:318)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
| at org.jbpm.graph.def.Node_$$_javassist_307.enter(Node_$$_javassist_307.java)
| at org.jbpm.graph.def.Transition.take(Transition.java:151)
| at org.jbpm.graph.def.Node.leave(Node.java:393)
| at org.jbpm.graph.node.StartState.leave(StartState.java:70)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
| at org.jbpm.graph.def.Node_$$_javassist_307.leave(Node_$$_javassist_307.java)
| at org.jbpm.graph.exe.Token.signal(Token.java:192)
| at org.jbpm.graph.exe.Token.signal(Token.java:140)
| at com.framework.workflow.jbpm.JBPMClient.createProcessInstance(JBPMClient.java:49)
| at com.framework.workflow.adapter.WorkflowAdapter.createProcessInstance(WorkflowAdapter.java:13)
| at com.framework.workflow.WorkflowServiceImpl.createProcessInstance(WorkflowServiceImpl.java:12)
| at org.apache.jsp.jsp.TestWorkflow_jsp._jspService(TestWorkflow_jsp.java:82)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:595)
Did any one have any idea that why during the creation of processInstance I am getting the above errors??
If yes please reply to my questions.
When I remove the following tags from the above xmls:
<assignment expression="group(Sales) --> group(CM)"/> and
| <assignment expression="group(Sales, CM)"></assignment>
|
and do the assignment using swimlanes with each swimlane having ONLY one group contained in it like:
| <swimlane name="CD">
| <assignment expression="group(CD)"></assignment>
| </swimlane>
Then I am able to execute the process successfully. No issues in this case.
NOTE: In my jbpm database I have proper entries in the jbpm_id_group table, for all the groups which I am assigning within the expression tags.
I know my question got long, but I tried to provide as much clarity as I can, inorder to get an accurate and early reply.
Please let me know if you need any other information.
Thanks in advance!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167564#4167564
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167564
16 years, 5 months
[Beginners Corner] - Problem shuting down
by obarcelona
Hi we have a problem shutting down a Jboss server. We use the following command:
shutdown -S -s : -u -p
We don't know what happens with ip beacuse we are specifing a internet ip like 80.2.3.x but always the server refuse the connection on ip 127.0.0.1
Note that there are two internet ip's on that machine and perhaps i think there are a problem with operative system configuration (nat?)
here the stack trace of the error:
Shutting down JBoss Application Server 4.2.2 [2008-07-30 10:04:17]
| Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
| at javax.naming.InitialContext.lookup(InitialContext.java:392)
| at org.jboss.Shutdown.main(Shutdown.java:214)
| Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
| ... 4 more
| Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
| ... 5 more
| Caused by: java.net.ConnectException: Connection refused: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
| at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
| at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
| at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
| at java.net.Socket.connect(Socket.java:519)
| at java.net.Socket.connect(Socket.java:469)
| at java.net.Socket.<init>(Socket.java:366)
| at java.net.Socket.<init>(Socket.java:267)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
| at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
| at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
| ... 5 more
| Shutdown JBoss Application Server 4.2.2 service [2008-07-30 10:04:19]
thanks a lot and sorry for my english :(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167563#4167563
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167563
16 years, 5 months