AnsweredAssumed Answered

Populate DB with own users / groups / memberships

Question asked by hazel8 on Jun 8, 2011
Latest reply on Jun 13, 2011 by frederikheremans1
Hello
I would like to use activiti-explorer as frontend for our process and populate the DB with our own users and groups. I made that by adding our users / groups to the sql-script h2.data.sql (script source see below). Users, groups and memberships are added to the DB without problems,
but when I try to log in using a new created user, I get the following error message (see below).

Can you tell me whats going wrong?
Is there a database model available with detailed information about Activiti tables and fields?

Many thanks in advance for your help.

H. Hitz

DB-Script (h2.data.sql):

insert into ACT_ID_GROUP values ('admin',       1, 'System administrator', 'security-role');
insert into ACT_ID_GROUP values ('user',        1, 'User', 'security-role');
insert into ACT_ID_GROUP values ('manager',     1, 'Manager', 'security-role');
insert into ACT_ID_GROUP values ('management',  1, 'Management',  'assignment');
insert into ACT_ID_GROUP values ('accountancy', 1, 'Accountancy', 'assignment');
insert into ACT_ID_GROUP values ('engineering', 1, 'Engineering', 'assignment');
insert into ACT_ID_GROUP values ('sales',       1, 'Sales', 'assignment');
/* begin added HH 3-5-2011 */
insert into ACT_ID_GROUP values ('mfadmin',     1, 'MedFolio Admin', 'assignment');
insert into ACT_ID_GROUP values ('zlabadmin',   1, 'ZLab Admin', 'assignment');
insert into ACT_ID_GROUP values ('hlabadmin',   1, 'HLab Admin', 'assignment');
insert into ACT_ID_GROUP values ('patadmin',    1, 'Pat Admin', 'assignment');
/* end added HH 3-5-2011 */

insert into ACT_ID_USER values ('kermit', 1, 'Kermit', 'the Frog', 'kermit@localhost', 'kermit', '');
insert into ACT_ID_MEMBERSHIP values ('kermit', 'admin');
insert into ACT_ID_MEMBERSHIP values ('kermit', 'manager');
insert into ACT_ID_MEMBERSHIP values ('kermit', 'management');
insert into ACT_ID_MEMBERSHIP values ('kermit', 'accountancy');
insert into ACT_ID_MEMBERSHIP values ('kermit', 'engineering');
insert into ACT_ID_MEMBERSHIP values ('kermit', 'sales');

insert into ACT_ID_USER values ('fozzie', 1, 'Fozzie', 'Bear', 'fozzie@localhost', 'fozzie', '');
insert into ACT_ID_MEMBERSHIP values ('fozzie', 'user');
insert into ACT_ID_MEMBERSHIP values ('fozzie', 'accountancy');

insert into ACT_ID_USER values ('gonzo', 1, 'Gonzo', 'the Great', 'gonzo@localhost', 'gonzo', '');
insert into ACT_ID_MEMBERSHIP values ('gonzo', 'manager');
insert into ACT_ID_MEMBERSHIP values ('gonzo', 'management');
insert into ACT_ID_MEMBERSHIP values ('gonzo', 'accountancy');
insert into ACT_ID_MEMBERSHIP values ('gonzo', 'sales');

/* begin added HH 3-5-2011 */
insert into ACT_ID_USER values ('kesara', 1, 'Kesara', 'Chheang', 'kesara@localhost', 'kesara', '');
insert into ACT_ID_MEMBERSHIP values ('kesara', 'mfadmin');

insert into ACT_ID_USER values ('monn', 1, 'Antoinette', 'Monn', 'monn@localhost', 'monn', '');
insert into ACT_ID_MEMBERSHIP values ('monn', 'hlabadmin');

insert into ACT_ID_USER values ('nesic', 1, 'Pera', 'Nesic', 'nesic@localhost', 'nesic', '');
insert into ACT_ID_MEMBERSHIP values ('nesic', 'zlabadmin');

insert into ACT_ID_USER values ('spuler', 1, 'Monika', 'Spuler', 'spuler@localhost', 'spuler', '');
insert into ACT_ID_MEMBERSHIP values ('spuler', 'patadmin');
/* end added HH 3-5-2011 */

update ACT_GE_PROPERTY
set VALUE_ = '10'
where NAME_ = 'next.dbid';

insert into ACT_CY_CONN_CONFIG values ('1',
            'org.activiti.cycle.impl.connector.fs.FileSystemConnector',
            'Eclipse Workspace (File System)',
            'Workspace',
            'kermit', '',
            '<map><entry><string>basePath</string><string>C:\activiti-5.4\workspace\activiti-cycle-examples</string></entry></map>');
insert into ACT_CY_CONN_CONFIG values ('2',
            'org.activiti.cycle.impl.connector.signavio.SignavioConnector',
            'Activiti Modeler',
            'Activiti',
            'kermit', '',
            '<map>
               <entry><string>signavioBaseUrl</string><string>http://localhost:12780/activiti-modeler/</string></entry>
               <entry><string>loginRequired</string><boolean>false</boolean></entry>
            </map>');

insert into ACT_CY_CONN_CONFIG values ('3',
            'org.activiti.cycle.impl.connector.fs.FileSystemConnector',
            'Eclipse Workspace (File System)',
            'Workspace',
            'fozzie', '',
            '<map><entry><string>basePath</string><string>C:\activiti-5.4\workspace\activiti-cycle-examples</string></entry></map>');
insert into ACT_CY_CONN_CONFIG values ('4',
            'org.activiti.cycle.impl.connector.signavio.SignavioConnector',
            'Activiti Modeler',
            'Activiti',
            'fozzie', '',
            '<map>
               <entry><string>signavioBaseUrl</string><string>http://localhost:12780/activiti-modeler/</string></entry>
               <entry><string>loginRequired</string><boolean>false</boolean></entry>
            </map>');

insert into ACT_CY_CONN_CONFIG values ('5',
            'org.activiti.cycle.impl.connector.fs.FileSystemConnector',
            'Eclipse Workspace (File System)',
            'Workspace',
            'gonzo', '',
            '<map><entry><string>basePath</string><string>C:\activiti-5.4\workspace\activiti-cycle-examples</string></entry></map>');
insert into ACT_CY_CONN_CONFIG values ('6',
            'org.activiti.cycle.impl.connector.signavio.SignavioConnector',
            'Activiti Modeler',
            'Activiti',
            'gonzo', '',
            '<map>
               <entry><string>signavioBaseUrl</string><string>http://localhost:12780/activiti-modeler/</string></entry>
               <entry><string>loginRequired</string><boolean>false</boolean></entry>
            </map>');            

/* begin added HH 8-5-2011 */
insert into ACT_CY_CONN_CONFIG values ('7',
            'org.activiti.cycle.impl.connector.fs.FileSystemConnector',
            'Eclipse Workspace (File System)',
            'Workspace',
            'monn', '',
            '<map><entry><string>basePath</string><string>C:\activiti-5.4\workspace\activiti-cycle-examples</string></entry></map>');
insert into ACT_CY_CONN_CONFIG values ('8',
            'org.activiti.cycle.impl.connector.signavio.SignavioConnector',
            'Activiti Modeler',
            'Activiti',
            'monn', '',
            '<map>
               <entry><string>signavioBaseUrl</string><string>http://localhost:12780/activiti-modeler/</string></entry>
               <entry><string>loginRequired</string><boolean>false</boolean></entry>
            </map>');

/* end added HH 8-5-2011 */

insert  into  ACT_CY_CONFIG values ('1',
                           'processSolutionTemplates',
                           'default',
                           '<processSolutionTemplate>
                              <vFolder type="Management" name="Management" connectorId="Workspace" referencedNodeId="/" />
                              <vFolder type="Processes" name="Processes" connectorId="Activiti" referencedNodeId="/root-directory" />
                              <vFolder type="Requirements" name="Requirements" connectorId="Workspace" referencedNodeId="/" />
                              <vFolder type="Implementation" name="Implementation" connectorId="Workspace" referencedNodeId="/" />
                           </processSolutionTemplate>');   

insert    into ACT_CY_PROCESS_SOLUTION values ('ps1',
                                  'Easy Bugfiling Process',
                                  'IN_SPECIFICATION');
                                 
insert into ACT_CY_V_FOLDER values('ps1Management',
                           'Management',
                           'Workspace',
                           '/EasyBugFilingProcess/Management',
                           'ps1',
                           'Management');
insert into ACT_CY_V_FOLDER values('ps1Requirements',
                           'Requirements',
                           'Workspace',
                           '/EasyBugFilingProcess/Requirements',
                           'ps1',
                           'Requirements');
insert into ACT_CY_V_FOLDER values('ps1Implementation',
                           'Implementation',
                           'Workspace',
                           '/EasyBugFilingProcess/Implementation',
                           'ps1',
                           'Implementation');

                                 



Error Message when logging into activiti-explorer:

HTTP Status 500

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.extensions.surf.exception.UserFactoryException: Unable to retrieve user from repository
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:659)
   org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
   org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
   org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
   org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
   org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
root cause

org.springframework.extensions.surf.exception.UserFactoryException: Unable to retrieve user from repository
   org.activiti.surf.ActivitiUserFactory.loadUser(ActivitiUserFactory.java:253)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:176)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:99)
   org.springframework.extensions.surf.RequestContextUtil.initialiseUser(RequestContextUtil.java:202)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:175)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:130)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.populateRequestContext(AbstractWebFrameworkView.java:274)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:136)
   org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
   org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
   org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
   org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
   org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
   org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
   org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
   org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
root cause

org.springframework.extensions.surf.exception.UserFactoryException: Unable to create user - failed to retrieve user info:
   org.activiti.surf.ActivitiUserFactory.loadUser(ActivitiUserFactory.java:204)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:176)
   org.springframework.extensions.surf.support.AbstractUserFactory.initialiseUser(AbstractUserFactory.java:99)
   org.springframework.extensions.surf.RequestContextUtil.initialiseUser(RequestContextUtil.java:202)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:175)
   org.springframework.extensions.surf.RequestContextUtil.populateRequestContext(RequestContextUtil.java:130)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.populateRequestContext(AbstractWebFrameworkView.java:274)
   org.springframework.extensions.surf.mvc.AbstractWebFrameworkView.renderMergedOutputModel(AbstractWebFrameworkView.java:136)
   org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
   org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
   org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
   org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
   org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:195)
   org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:159)
   org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)
   org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)
   org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:417)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.11 logs.

Outcomes