10-24-2014 04:58 AM
Servlet.service() for servlet [Vaadin Application] in context with path [/Vaadin] threw exception [java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at com.example.vaadin.VaadinApplication.init(VaadinApplication.java:42)
at com.vaadin.Application.start(Application.java:551)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.startApplication(AbstractApplicationServlet.java:1219)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:484)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
<?xml version="1.0" encoding="UTF-8" ?>
<definitions id="definitions"
targetNamespace="http://activiti.org/bpmn20"
xmlns:activiti="http://activiti.org/bpmn"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL">
<process id="catchSignal">
<signal id="ClickEvent" name="event" />
<intermediateCatchEvent id="catchSignalEvent" name="OnAlert">
<!– signal event definition –>
<signalEventDefinition signalRef="alertSignal" />
</intermediateCatchEvent>
</process>
</definitions>
package com.example.vaadin;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.activiti.engine.task.Task;
import org.activiti.engine.HistoryService;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.delegate.event.ActivitiEvent;
import org.activiti.engine.delegate.event.ActivitiEventListener;
import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.repository.Deployment;
import org.activiti.engine.runtime.Execution;
import org.activiti.engine.runtime.ProcessInstance;
import org.apache.commons.logging.Log;
import com.vaadin.Application;
import com.vaadin.ui.*;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
/**
* Main application class.
*/
public class VaadinApplication extends Application implements ActivitiEventListener{
RuntimeService runtimeService = null;
@Override
public void init(){
//Meine ProcessEngine.
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
//The workflow will have to be concretised in the *.bpmn20.xml - file.
RepositoryService repositoryService = processEngine.getRepositoryService();
RuntimeService runtimeService = processEngine.getRuntimeService();
runtimeService.addEventListener(this);
repositoryService.createDeployment()
.addClasspathResource("bpmn/EventTest.bpmn20.xml")
.deploy();
Window mainWindow = new Window("Vaadin Application");
Button but = new Button("Event");
but.addListener(new ClickListener(){
@Override
public void buttonClick(ClickEvent event) {
}
});
mainWindow.addComponent(but);
setMainWindow(mainWindow);
}
@Override
public boolean isFailOnException() {
// TODO Auto-generated method stub
return false;
}
@Override
public void onEvent(ActivitiEvent ae) {
// TODO Auto-generated method stub
}
}
10-27-2014 07:03 AM
11-03-2014 03:42 AM
11-07-2014 10:04 AM
11-10-2014 06:44 AM
11-12-2014 12:13 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.