cancel
Showing results for 
Search instead for 
Did you mean: 

Common error - com.vaadin.event.ListenerMethod - why?

kethur
Champ in-the-making
Champ in-the-making
I am unable to attach my XML file(or any file for that matter to this post)  that i am trying to deploy.  But, the below error is very common i encountered many times.  It does not tell you what the problem is.  No clue whatsoever.  So, hopefully Activiti guys will be handling errors better. 

I basically could deploy my zip file (contains a bpmn.xml and a form file).  when i click on myinstances > click on my process it gives me the below error in the console and i can not see the process diagram in my explorer.  In a successful scenario i should be able to see what stage the current workflow is in. 

could someone help what this error actually means (or related to) so, it can avoid lot of my headaches? 

Many thanks,.

12-Oct-2012 17:42:57 org.activiti.engine.impl.bpmn.deployer.BpmnDeployer deploy
INFO: Processing resource documentReview.form
12-Oct-2012 17:43:28 com.vaadin.Application terminalError
SEVERE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NullPointerException
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
        at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
        at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)
        at com.vaadin.ui.AbstractField.fireValueChange(AbstractField.java:891)
        at com.vaadin.ui.AbstractField.setValue(AbstractField.java:529)
        at com.vaadin.ui.AbstractSelect.setValue(AbstractSelect.java:666)
        at com.vaadin.ui.AbstractSelect.changeVariables(AbstractSelect.java:475)
        at com.vaadin.ui.Table.changeVariables(Table.java:2038)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1299)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1219)
        at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735)
        at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
        at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
        at org.activiti.explorer.ui.custom.UserProfileLink.initUserLink(UserProfileLink.java:93)
        at org.activiti.explorer.ui.custom.UserProfileLink.<init>(UserProfileLink.java:61)
        at org.activiti.explorer.ui.management.process.ProcessInstanceDetailPanel.getTaskAssigneeComponent(ProcessInstanceDetailPanel.java:270)
        at org.activiti.explorer.ui.management.process.ProcessInstanceDetailPanel.addTaskItem(ProcessInstanceDetailPanel.java:262)
        at org.activiti.explorer.ui.management.process.ProcessInstanceDetailPanel.addTasks(ProcessInstanceDetailPanel.java:230)
        at org.activiti.explorer.ui.management.process.ProcessInstanceDetailPanel.init(ProcessInstanceDetailPanel.java:112)
        at org.activiti.explorer.ui.management.process.ProcessInstanceDetailPanel.<init>(ProcessInstanceDetailPanel.java:98)
        at org.activiti.explorer.ui.process.ProcessInstancePage$1.valueChange(ProcessInstancePage.java:60)
        at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
        … 25 more
10 REPLIES 10

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
It does not tell you what the problem is. No clue whatsoever.

It DOES tell you what the cause is, a NPE. The source of activiti is open, so you could have a look what is om the lie that throws the NPE.

joe1
Champ in-the-making
Champ in-the-making
Hello,

I get the same symptom and error.

The line of code is:

91  protected void initUserLink(final String userId) {
92    User user = userCache.findUser(userId);
93    Button userButton = new Button(user.getFirstName() + " " + user.getLastName());

I have verified that there is a FirstName and LastName for all my users in the database, and they are all linked to a valid group.

It seems like the userCache is returning a null user under certain conditions.

Here is the steps I performed to get to this error:
- downloaded activiti-5.10
- started the demo ant task.
- wrote mini java class that looks a lot like DemoDataGenerator, but adds new Users and Groups relevant to my business process.
- built a BPMN 2.0 diagram that assigns each task to a newly defined group.
- deployed the BPMN bar to the web app.
- signed into webapp under the new user account.
- started an instance of the new BPMN workflow
- "claimed" the task via Web App
- Attempted to transfer user in the "People" section.  From this point on, the web app throws all kind of stack traces, but the above is the most common.

Interesting point:
If I do the same steps as above, but instead of writing a java app to populate the users and groups -> I update the h2.data.sql file in the activiti-5.10->setup->build->demo with users and groups, and then restart the H2 server, then everything works fine.

I compare the db tables after each approach, and I just can't find a difference.

Is there any known issues with the userCache not properly set in ExplorerApp.get().getUserCache() or perhaps getting out of sync after using the identidyService to add users / groups?


As an aside:
While I am tempted to just stick with the h2.data.sql, there is an issue where it is easier to set the user picture via Java rather than the h2.data.sql.  I also have found that the web app will throw exceptions if you try to transfer to a user without a user picture (NPE in the stacktrace suggesting parts of the code require a picture to be present .. not null).

joe1
Champ in-the-making
Champ in-the-making
As soon as I hit the "submit" button on the previous post I realized I should simply try restarting the webapp (ant demo.stop and demo.start) after using the identityService

Upon doing this, my issue went away.

This kinda confirms the theory that after using the identityService to add users and groups, it possible the webapp user cache becomes out of sync and can not retrieve those new users.  This results in the stack trace located above.

joe1
Champ in-the-making
Champ in-the-making
Let me know if you think an issue should be raised in Jira for:
- userCache not updating after using identityService.
- webapp exceptions thrown when work assigned to a user without a picture.

and extreme nit pick:
- Eclipse Plugin: Properties -> Main config -> "Candidate groups (comma separated:" is missing an end parenthesis.

I did a quick scan of JIRA and did not find these issues documented.

frederikherema1
Star Contributor
Star Contributor
Create JIRA's for all of these, please…

logic3
Champ in-the-making
Champ in-the-making
Hi,

I have a similar issue but not sure what cause the error. I have deployed a simple process to my activiti explorer but get the following error when try to start the process from the explorer such as hitting the start process button.

any help would be greatly appreciated

thanks

Exception
com.vaadin.event.ListenerMethod$MethodException
Cause: com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NullPointerException
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)
at com.vaadin.ui.Button.fireClick(Button.java:539)
at com.vaadin.ui.Button.changeVariables(Button.java:206)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1299)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1219)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.NullPointerException
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1193)
at org.activiti.explorer.ui.form.FormPropertiesForm.access$000(FormPropertiesForm.java:45)
at org.activiti.explorer.ui.form.FormPropertiesForm$1.buttonClick(FormPropertiesForm.java:139)
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:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
… 22 more
Caused by: java.lang.NullPointerException
at org.aniketos.runtime.AniketosClientDelegation.execute(AniketosClientDelegation.java:82)
at org.activiti.engine.impl.delegate.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:34)
at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
at org.activiti.engine.impl.bpmn.behavior.ServiceTaskJavaDelegateActivityBehavior.execute(ServiceTaskJavaDelegateActivityBehavior.java:49)
at org.activiti.engine.impl.bpmn.behavior.ServiceTaskJavaDelegateActivityBehavior.execute(ServiceTaskJavaDelegateActivityBehavior.java:40)
at org.activiti.engine.impl.bpmn.helper.ClassDelegate.execute(ClassDelegate.java:112)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:48)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:45)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:44)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(AtomicOperationTransitionNotifyListenerTake.java:61)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(AtomicOperationTransitionDestroyScope.java:111)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerEnd.java:36)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(ExecutionEntity.java:326)
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:92)
at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:49)
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
at org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStartInitial.eventNotificationsCompleted(AtomicOperationProcessStartInitial.java:44)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
at org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStart.eventNotificationsCompleted(AtomicOperationProcessStart.java:44)
at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:52)
at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:76)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:481)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.start(ExecutionEntity.java:280)
at org.activiti.engine.impl.cmd.SubmitStartFormCmd.execute(SubmitStartFormCmd.java:80)
at org.activiti.engine.impl.cmd.SubmitStartFormCmd.execute(SubmitStartFormCmd.java:35)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.FormServiceImpl.submitStartFormData(FormServiceImpl.java:60)
at org.activiti.explorer.ui.process.ProcessDefinitionDetailPanel$1.handleFormSubmit(ProcessDefinitionDetailPanel.java:141)
at org.activiti.explorer.ui.form.FormPropertiesEventListener.componentEvent(FormPropertiesEventListener.java:39)
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:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
… 31 more

joe1
Champ in-the-making
Champ in-the-making
In my evaluation of Activiti over the past 2 weeks, all I can say is that I saw that Stack Trace numerous times - and I had trouble figure the root cause in the code.   That being said, when I clicked on more buttons on the process steps, like "Part of Process" or attempting to view the active process for a particular user, I typically found stack traces that were more meaningful to me. It just seems that this stack trace is usually in combination of something else bad that is happening. (Which ultimately leads to this trace which involves firing off Events on null data.)

Maybe a core developer will have better advice Smiley Happy  Mine is to just keep clicking and hope for a better stack trace.

There are also a number of people that have reported an exception trace on:
at org.activiti.explorer.ui.form.FormPropertiesForm.access$000(FormPropertiesForm.java:45)
at org.activiti.explorer.ui.form.FormPropertiesForm$1.buttonClick(FormPropertiesForm.java:139)

on the forums here, and even some with advice on what to fix.  Take a look.

FormPropertiesForm.java shows:
..
45 public class FormPropertiesForm extends VerticalLayout {
..
..
..
138 Map<String, String> formProperties = formPropertiesComponent.getFormPropertyValues();
139 fireEvent(new FormPropertiesEvent(FormPropertiesForm.this, FormPropertiesEvent.TYPE_SUBMIT, formProperties));
..

From here, it seems that a null event is sent into vaadin and it chokes.

frederikherema1
Star Contributor
Star Contributor
@logic3: Caused by: java.lang.NullPointerException
   at org.aniketos.runtime.AniketosClientDelegation.execute(AniketosClientDelegation.java:82)

Your own class is throwing a null pointer, which bubbles up to the vaadin-client.

@joe: the root cause is always the first exception in the exception tree, so not sure why you're having a hard time, figuring out what caused the exception. Also, the activiti source-code is available, so even errors in our code, you can inspect…