activiti-webapp-rest / deployment / NullPointerException
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2011 05:03 AM
hello,
To get more familiar with activiti I downloaded the sources of activiti 5.4.
As a starting point I chose to use the activiti-webapp-rest.
My Idea was to get the default installation running and make some changes then.
I started the webapp from inside Eclipse using tomcat 6.0.32.
When I enter the url http://localhost:8080/webapp-rest/
it shows the index.jsp correctly.
Entering http://localhost:8080/webapp-rest/service/index
I'm asked for username and password. I'm using kermit,kermit.
doAuthenticate (ActivitiBasicHttpAuthenticatorFactory) is called
config.getEngine() returns "default"
this call returns null, because there is no ProcessEngine registered by the name "default".
I wouldn't be surprised if I got something wrong here.
I'd appreciate your help on this.
If anybody can recommend a better way to get used to activiti, in order to successfully set up
and integrate a bpm suite, I'd be happy to hear about it.
greetings
hlux
To get more familiar with activiti I downloaded the sources of activiti 5.4.
As a starting point I chose to use the activiti-webapp-rest.
My Idea was to get the default installation running and make some changes then.
I started the webapp from inside Eclipse using tomcat 6.0.32.
When I enter the url http://localhost:8080/webapp-rest/
it shows the index.jsp correctly.
Entering http://localhost:8080/webapp-rest/service/index
I'm asked for username and password. I'm using kermit,kermit.
doAuthenticate (ActivitiBasicHttpAuthenticatorFactory) is called
public boolean doAuthenticate(String username, String password) { return ProcessEngines.getProcessEngine(config.getEngine()).getIdentityService().checkPassword(username, password); }
config.getEngine() returns "default"
public static ProcessEngine getProcessEngine(String processEngineName) { if (!isInitialized) { init(); } return processEngines.get(processEngineName); }
this call returns null, because there is no ProcessEngine registered by the name "default".
I wouldn't be surprised if I got something wrong here.
I'd appreciate your help on this.
If anybody can recommend a better way to get used to activiti, in order to successfully set up
and integrate a bpm suite, I'd be happy to hear about it.
greetings
hlux
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2011 11:46 AM
I think you have to add a activit.cfg.xml file to make this work. That is normally done automatically by the installer.
Joachim
Joachim
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2011 03:58 AM
Jup, Joachim is right. You should add a configuration file to your webapp's classpath, just the way the demo-setup does it.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2011 05:48 AM
Thank you for your replies.
Adding the activiti.cfg.xml to the classpath was what I had to do.
I'm not sure what I was thinking.
For some reason I was convinced that the activiti-webapp-rest was initialising a
ProcessEngine via the Config class in the spring-context.
So how does the activiti-webapp-rest get the ProcessEngine in the demo setup?
All I found in the build.xml was, that the activiti.cfg.xml is copied to the activiti-engine-examples.
I'm afraid that I'm still missing a huge bit of the overall concept.
greetings
Adding the activiti.cfg.xml to the classpath was what I had to do.
I'm not sure what I was thinking.
For some reason I was convinced that the activiti-webapp-rest was initialising a
ProcessEngine via the Config class in the spring-context.
So how does the activiti-webapp-rest get the ProcessEngine in the demo setup?
All I found in the build.xml was, that the activiti.cfg.xml is copied to the activiti-engine-examples.
I'm afraid that I'm still missing a huge bit of the overall concept.
greetings
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2011 07:48 AM
There is a jar-file copied (activiti.cfg.xml) with activiti.cfg.xml in it in web-inf/lib in rest-webapp. When rest-webapp is initialized, all process-engine config files on classpath are initialized.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2011 08:03 AM
Thanks again, that explains it

