[JBoss jBPM] - ProcessClassloader question
by sarishjain
Please bear with me if this is a duplicate post.
I need a way to disable use of processclassloader for process execution
Or any alternative approach to solve the below issue.
The issue as i see it is that Processclassloader is assigned as the classloader in Thread executing the process and it simply fails with a throwable if the class looked for is not there in database. The calling code does not get a chance to recover from the exception(caller of that code is probably expecting ClassNotFoundException).
I have run into a few issues because of above in JBPM 3.2.6SP1, The stacktrace always ends in NullpointerException in FileDefinition.getBytesFromDb.
This is the error i got today... I am trying to invoke an EJB within actionhandler which has long(native) as input. When container is trying to serialize for the method call,the processclassloader is not able to locate the required class and fails with stack as below.
Appreciate quick help on this one!!
Thanks,
Sarish
Stack Trace
| 12:43:44,023 ERROR [GraphElement] action threw exception: couldn't get value for file 'classes/long.class'
| org.jbpm.JbpmException: couldn't get value for file 'classes/long.class'
| at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:196)
| at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:116)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at org.jboss.ejb3.common.lang.SerializableMethod.getClassFromName(SerializableMethod.java:307)
| at org.jboss.ejb3.common.lang.SerializableMethod.toMethod(SerializableMethod.java:239)
| at org.jboss.ejb3.common.lang.SerializableMethod.toMethod(SerializableMethod.java:220)
| at org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.invoke(ProxyInvocationHandlerBase.java:236)
| at org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:101)
| at $Proxy249.getPermissionBySystemId(Unknown Source)
| at com.apple.ist.ps2.server.process.rules.RuleService.getEvents(RuleService.java:226)
| at com.apple.ist.ps2.server.process.jbpm.handler.DetermineEventsHandler.execute(DetermineEventsHandler.java:22)
| at org.jbpm.graph.def.Action.execute(Action.java:125)
| 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:197)
| at org.jbpm.graph.def.Action_$$_javassist_75.execute(Action_$$_javassist_75.java)
| at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:281)
| at org.jbpm.graph.def.Node.execute(Node.java:412)
| 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:197)
| at org.jbpm.graph.def.Node_$$_javassist_61.execute(Node_$$_javassist_61.java)
| at org.jbpm.job.ExecuteNodeJob.execute(ExecuteNodeJob.java:35)
| 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:197)
| at org.jbpm.job.Job_$$_javassist_66.execute(Job_$$_javassist_66.java)
| at org.jbpm.ejb.impl.ExecuteJobCommand.executeJob(ExecuteJobCommand.java:72)
| at org.jbpm.ejb.impl.ExecuteJobCommand.execute(ExecuteJobCommand.java:52)
| at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:110)
| 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.jboss.invocation.Invocation.performCall(Invocation.java:386)
| at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:228)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
| at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
| at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
| at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
| at org.jboss.ejb.Container.invoke(Container.java:1029)
| at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:436)
| at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
| at $Proxy238.execute(Unknown Source)
| at org.jbpm.ejb.impl.CommandListenerBean.onMessage(CommandListenerBean.java:119)
| 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.jboss.invocation.Invocation.performCall(Invocation.java:386)
| at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:513)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
| at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:115)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.RunAsSecurityInterceptor.process(RunAsSecurityInterceptor.java:133)
| at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:103)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
| at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:415)
| at org.jboss.ejb.Container.invoke(Container.java:1029)
| 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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169)
| at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118)
| at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209)
| at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195)
| at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
| at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(MessageEndpointInterceptor.java:249)
| at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(MessageEndpointInterceptor.java:128)
| at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
| at $Proxy246.onMessage(Unknown Source)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:178)
| at org.jboss.jms.client.container.ClientConsumer.callOnMessageStatic(ClientConsumer.java:160)
| at org.jboss.jms.client.container.SessionAspect.handleRun(SessionAspect.java:831)
| at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleRun_8818949.invoke(SessionAspect_z_handleRun_8818949.java)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
| at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
| at org.jboss.jms.client.delegate.ClientSessionDelegate.run(ClientSessionDelegate.java)
| at org.jboss.jms.client.JBossSession.run(JBossSession.java:199)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:234)
| at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:213)
| at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
| at java.lang.Thread.run(Thread.java:613)
| Caused by: java.lang.NullPointerException
| at org.jbpm.file.def.FileDefinition.getBytesFromDb(FileDefinition.java:213)
| at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:193)
| ... 114 more
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230609#4230609
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230609
16 years, 11 months
[JBoss jBPM] - Timer for mail node or task node??
by Sujatha
Hi
I want an email as specified by the mail node to repeat every 24 hours until the task has been completed. The structure is
start
mail node - which sends an email that task is assinged to a person
task node - which required the person to approve or deny
Here I want the mail node to repeat sending the email to the person until the task node is actioned.
Where do i Configure the timer - is it task node or email node? If i configure in email node it does not work as it automatically transitions to the task node..If i specify in task node it works but it uses a standard text format fromt the jbpm.mail.templates.xml file (task-assign template)..
What i ideally want is the same email content in email node to be repeated until the task is actioned? Could anybody help me on this please??????
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230452#4230452
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230452
16 years, 11 months