Activiti
  1. Activiti
  2. ACT-71

Activiti Modeler doesn't work if not installed by demo setup

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.alpha4
    • Fix Version/s: 5.0.beta2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Steps:

      • Download: activiti-5.0.alpha4.zip and unzip to "D:\Protected\Process\Activiti"
      • Cd "D:\Protected\Process\Activiti\setup"
      • ant demo.setup
      • 404 Error occurs
      • Catalina-Log

      INFO: Server startup in 13086 ms
      02.08.2010 18:14:38 org.apache.catalina.startup.HostConfig deployWAR
      INFO: Deploying web application archive activiti-modeler.war
      02.08.2010 18:14:56 org.apache.catalina.core.StandardContext start
      SCHWERWIEGEND: Error listenerStart
      02.08.2010 18:14:56 org.apache.catalina.core.StandardContext start
      SCHWERWIEGEND: Context [/activiti-modeler] startup failed due to previous errors

      The error message is

      02.08.2010 18:14:38 org.apache.catalina.startup.HostConfig deployWAR
      INFO: Deploying web application archive activiti-modeler.war
      java.lang.IllegalStateException: No match found
      at java.util.regex.Matcher.group(Matcher.java:468)
      at java.util.regex.Matcher.group(Matcher.java:428)
      at com.signavio.platform.core.impl.FsPlatformPropertiesImpl.<init>(FsPla
      tformPropertiesImpl.java:87)
      at com.signavio.platform.core.impl.FsPlatformInstanceImpl.bootInstance(F
      sPlatformInstanceImpl.java:61)
      at com.signavio.platform.core.Platform.bootInstance(Platform.java:77)
      at com.signavio.platform.listeners.EntryPoint.contextInitialized(EntryPo
      int.java:61)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
      t.java:3972)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
      467)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
      .java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
      1)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)

      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)

      at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740
      )
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500
      )
      at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
      :303)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
      eSupport.java:119)
      at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBas
      e.java:1337)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
      rocessChildren(ContainerBase.java:1601)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
      rocessChildren(ContainerBase.java:1610)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
      un(ContainerBase.java:1590)
      at java.lang.Thread.run(Thread.java:619)
      2010-08-02 18:14:56,656 FATAL (LoggedRuntimeException.java:39) - Platform boot f
      ailed!
      com.signavio.platform.exceptions.InitializationException: Platform boot failed!
      at com.signavio.platform.core.Platform.bootInstance(Platform.java:81)
      at com.signavio.platform.listeners.EntryPoint.contextInitialized(EntryPo
      int.java:61)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
      t.java:3972)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
      467)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
      .java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
      1)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)

      at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)

      at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740
      )
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500
      )
      at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1345)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
      :303)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
      eSupport.java:119)
      at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBas
      e.java:1337)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
      rocessChildren(ContainerBase.java:1601)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
      rocessChildren(ContainerBase.java:1610)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
      un(ContainerBase.java:1590)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalStateException: No match found
      at java.util.regex.Matcher.group(Matcher.java:468)
      at java.util.regex.Matcher.group(Matcher.java:428)
      at com.signavio.platform.core.impl.FsPlatformPropertiesImpl.<init>(FsPla
      tformPropertiesImpl.java:87)
      at com.signavio.platform.core.impl.FsPlatformInstanceImpl.bootInstance(F
      sPlatformInstanceImpl.java:61)
      at com.signavio.platform.core.Platform.bootInstance(Platform.java:77)
      ... 17 more
      02.08.2010 18:14:56 org.apache.catalina.core.StandardContext start
      SCHWERWIEGEND: Error listenerStart
      02.08.2010 18:14:56 org.apache.catalina.core.StandardContext start
      SCHWERWIEGEND: Context [/activiti-modeler] startup failed due to previous errors

        Activity

        Hide
        Tom Baeyens added a comment -

        Joram, can you check if we should delegate this to Signavio?

        Show
        Tom Baeyens added a comment - Joram, can you check if we should delegate this to Signavio?
        Hide
        Joram Barrez added a comment -

        The issue is not Signavio related, but something that I introduced:

        When the Modeler boots, it looks for a 'model-folder' in which the processes are stored.
        In the past, I tried to look this folder up with '../../../activiti-model-repository' (or something like that),
        but that doesnt seem to work.

        So what happens now, is that when the demo is unzipped, the current path is matched with a regular expression. It then looks for something 'activiti-5.*'.

        This means that, if you unzip the distribution as-is, there is no problem. However, when you unzip it to another folder nam (say 'MyActivitiTryout'), the regular expression fails and the Modeler doesnt boot.

        Show
        Joram Barrez added a comment - The issue is not Signavio related, but something that I introduced: When the Modeler boots, it looks for a 'model-folder' in which the processes are stored. In the past, I tried to look this folder up with '../../../activiti-model-repository' (or something like that), but that doesnt seem to work. So what happens now, is that when the demo is unzipped, the current path is matched with a regular expression. It then looks for something 'activiti-5.*'. This means that, if you unzip the distribution as-is, there is no problem. However, when you unzip it to another folder nam (say 'MyActivitiTryout'), the regular expression fails and the Modeler doesnt boot.
        Hide
        Joram Barrez added a comment -

        By the way, this is the code that is the culprit:

        (file in Signavio = FsPlatformPropertiesImpl)

        private final String rootDirectoryPath;
        private static final Pattern REPO_DIR_PATTERN = Pattern.compile(".activiti./apps/");
        private static final String REPO_DIR = "activiti-model-repository/";

        public FsPlatformPropertiesImpl(ServletContext context) {
        serverName = context.getInitParameter("server");
        platformUri = context.getContextPath() + "/p";
        explorerUri = context.getInitParameter("explorer");
        editorUri = context.getInitParameter("editor");
        libsUri = context.getInitParameter("libs");
        supportedBrowserEditor = context.getInitParameter("supportedBrowserEditor");

        isTestSystem = Boolean.parseBoolean(context.getInitParameter("isTestSystem"));

        String tempRootDirectoryPath = context.getInitParameter("fileSystemRootDirectory");

        // Default : absolute repo path is given
        if (tempRootDirectoryPath != null) {

        if (tempRootDirectoryPath.endsWith(File.separator))

        { rootDirectoryPath = tempRootDirectoryPath.substring(0, tempRootDirectoryPath.length()-1); }

        else

        { rootDirectoryPath = tempRootDirectoryPath; }

        } else

        { // Alternative: a regexp that matches the current directory, // to which a given param is added String currentPath = context.getRealPath("/").replace("\\", "/"); Matcher matcher = REPO_DIR_PATTERN.matcher(currentPath); matcher.find(); rootDirectoryPath = matcher.group() + REPO_DIR; }

        }

        Show
        Joram Barrez added a comment - By the way, this is the code that is the culprit: (file in Signavio = FsPlatformPropertiesImpl) private final String rootDirectoryPath; private static final Pattern REPO_DIR_PATTERN = Pattern.compile(". activiti. /apps/"); private static final String REPO_DIR = "activiti-model-repository/"; public FsPlatformPropertiesImpl(ServletContext context) { serverName = context.getInitParameter("server"); platformUri = context.getContextPath() + "/p"; explorerUri = context.getInitParameter("explorer"); editorUri = context.getInitParameter("editor"); libsUri = context.getInitParameter("libs"); supportedBrowserEditor = context.getInitParameter("supportedBrowserEditor"); isTestSystem = Boolean.parseBoolean(context.getInitParameter("isTestSystem")); String tempRootDirectoryPath = context.getInitParameter("fileSystemRootDirectory"); // Default : absolute repo path is given if (tempRootDirectoryPath != null) { if (tempRootDirectoryPath.endsWith(File.separator)) { rootDirectoryPath = tempRootDirectoryPath.substring(0, tempRootDirectoryPath.length()-1); } else { rootDirectoryPath = tempRootDirectoryPath; } } else { // Alternative: a regexp that matches the current directory, // to which a given param is added String currentPath = context.getRealPath("/").replace("\\", "/"); Matcher matcher = REPO_DIR_PATTERN.matcher(currentPath); matcher.find(); rootDirectoryPath = matcher.group() + REPO_DIR; } }
        Hide
        Tom Baeyens added a comment -

        So what is your proposal on how we should deal with this? How urgent would you rank this?

        Show
        Tom Baeyens added a comment - So what is your proposal on how we should deal with this? How urgent would you rank this?
        Hide
        Andreas Kuckartz added a comment -

        See also ACT-143 (I am not sure if there is a connection).

        Show
        Andreas Kuckartz added a comment - See also ACT-143 (I am not sure if there is a connection).
        Hide
        Joram Barrez added a comment -

        Currently, The Modeler is unable to work with relative paths (eg ../../model-repo), so I implemented a workaround that updates the modeler war during the demo setup.

        I also documented how to change the model repository when you want to run it on other containers, hosts and repository locations.

        Show
        Joram Barrez added a comment - Currently, The Modeler is unable to work with relative paths (eg ../../model-repo), so I implemented a workaround that updates the modeler war during the demo setup. I also documented how to change the model repository when you want to run it on other containers, hosts and repository locations.

          People

          • Assignee:
            Joram Barrez
            Reporter:
            Agim Emruli
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: