AnsweredAssumed Answered

Connecting to server machine w/ Activiti from a local machine

Question asked by themahc on Apr 8, 2014
Latest reply on Apr 22, 2014 by jbarrez
We are senior students in the University of Alabama's MIS program. 
We are currently working on a feasibility assessment of Activiti's features for enterprise integration for a company that we are contracted.

Our problem is that we are unable to connect to Activiti from a local machine to the server that has Activiti on it.

We have the server's IP address and are attempting to establish a jdbc connection via the information provided in the Activiti user guide.

On the server machine:
    We have successfully installed Apache Tomcat 7.0, Activiti, and PostgreSQL.
    We have Activiti connected to PostgreSQL as a standalone database and not in-memory, therefore, our data is preserved even when we close Activiti.
    We have the demo settings set to
false
and changed db.properties to

db=postgres
jdbc.driver=org.postgresql.Driver
jdbc.url=jdbc:postgresql://localhost:5432/activiti
jdbc.username=
jdbc.password=

We have the same setup on the local machine as the server machine.
We have used square brackets around the server's IP address. 

Here is our rest pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <name>Activiti - Rest</name>
  <artifactId>activiti-webapp-rest2</artifactId>
  <packaging>war</packaging>

  <parent>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-root</artifactId>
    <relativePath>../..</relativePath>
    <version>5.12</version>
  </parent>

  <build>
    <plugins>
      <plugin>
        <groupId>org.zeroturnaround</groupId>
        <artifactId>jrebel-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-rebel-xml</id>
            <phase>process-resources</phase>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!– A simple Jetty test server at http://localhost:8080/activiti-webapp-rest can be launched with the Maven goal jetty:run
      and stopped with jetty:stop –>
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <version>6.1.24</version>
        <configuration>
          <connectors>
            <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
              <port>8081</port>
              <maxIdleTime>60000</maxIdleTime>
            </connector>
          </connectors>
          <stopPort>9955</stopPort>
          <stopKey>activiti-webapp-rest</stopKey>
          <!– Redeploy every x seconds if changes are detected, 0 for no automatic redeployment –>
          <scanIntervalSeconds>0</scanIntervalSeconds>
          <!– make sure Jetty also finds the widgetset –>
          <webAppConfig>
            <contextPath>/activiti-rest</contextPath>
            <baseResource implementation="org.mortbay.resource.ResourceCollection">
              <resourcesAsCSV>src/main/webapp</resourcesAsCSV>
            </baseResource>
          </webAppConfig>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <!–This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.–>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>
                      org.zeroturnaround
                    </groupId>
                    <artifactId>
                      jrebel-maven-plugin
                    </artifactId>
                    <versionRange>
                      [1.0.7,)
                    </versionRange>
                    <goals>
                      <goal>generate</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-engine</artifactId>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-spring</artifactId>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-rest</artifactId>
    </dependency>
    <dependency>
      <groupId>com.postgresdatabase</groupId>
      <artifactId>postgres</artifactId>
    </dependency>
   <dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-context</artifactId>
  <version>spring.version</version>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-jdbc</artifactId>
  <version>spring.version</version>
</dependency>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-tx</artifactId>
  <version>spring.version</version>
</dependency>
  </dependencies>
 
</project>

Here is our explorer pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>

   <name>Activiti - Webapp - Explorer V2</name>
   <artifactId>activiti-webapp-explorer2</artifactId>
   <packaging>war</packaging>

   <parent>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-root</artifactId>
      <relativePath>../..</relativePath>
      <version>5.12</version>
   </parent>

   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
   </properties>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
               <source>1.6</source>
               <target>1.6</target>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.zeroturnaround</groupId>
            <artifactId>jrebel-maven-plugin</artifactId>
            <executions>
               <execution>
                  <id>generate-rebel-xml</id>
                  <phase>process-resources</phase>
                  <goals>
                     <goal>generate</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.2.1</version>
            <configuration>
               <descriptors>
                  <descriptor>src/main/assembly/ui-jar.xml</descriptor>
               </descriptors>
            </configuration>
         </plugin>

         <!– A simple Jetty test server at http://localhost:8080/activiti-webapp-explorer2
            can be launched with the Maven goal jetty:run and stopped with jetty:stop –>
         <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>6.1.24</version>
            <configuration>
               <stopPort>9966</stopPort>
               <stopKey>activiti-webapp-explorer2</stopKey>
               <!– Redeploy every x seconds if changes are detected, 0 for no automatic
                  redeployment –>
               <scanIntervalSeconds>0</scanIntervalSeconds>
               <!– make sure Jetty also finds the widgetset –>
               <webAppConfig>
                  <contextPath>/activiti-explorer2</contextPath>
                  <baseResource implementation="org.mortbay.resource.ResourceCollection">
                     <!– Workaround for Maven/Jetty issue http://jira.codehaus.org/browse/JETTY-680 –>
                     <!– <resources>src/main/webapp,${project.build.directory}/${project.build.finalName}</resources> –>
                     <resourcesAsCSV>src/main/webapp</resourcesAsCSV>
                  </baseResource>
               </webAppConfig>
            </configuration>
         </plugin>
      </plugins>
      <pluginManagement>
         <plugins>
            <!–This plugin's configuration is used to store Eclipse m2e settings
               only. It has no influence on the Maven build itself. –>
            <plugin>
               <groupId>org.eclipse.m2e</groupId>
               <artifactId>lifecycle-mapping</artifactId>
               <version>1.0.0</version>
               <configuration>
                  <lifecycleMappingMetadata>
                     <pluginExecutions>
                        <pluginExecution>
                           <pluginExecutionFilter>
                              <groupId>
                                 org.zeroturnaround
                              </groupId>
                              <artifactId>
                                 jrebel-maven-plugin
                              </artifactId>
                              <versionRange>
                                 [1.0.7,)
                              </versionRange>
                              <goals>
                                 <goal>generate</goal>
                              </goals>
                           </pluginExecutionFilter>
                           <action>
                              <ignore></ignore>
                           </action>
                        </pluginExecution>
                     </pluginExecutions>
                  </lifecycleMappingMetadata>
               </configuration>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>

   <profiles>
      <profile>
         <id>compile-widgetset</id>
         <build>
            <plugins>
               <!– Compile custom GWT components or widget dependencies with the GWT compiler –>
               <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>gwt-maven-plugin</artifactId>
                  <version>2.3.0</version>
                  <configuration>
                     <webappDirectory>src/main/webapp/VAADIN/widgetsets</webappDirectory>
                     <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
                     <runTarget>clean</runTarget>
                     <soyc>false</soyc>
                  </configuration>
                  <executions>
                     <execution>
                        <goals>
                        <goal>resources</goal>
                           <goal>compile</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>com.vaadin</groupId>
                  <artifactId>vaadin-maven-plugin</artifactId>
                  <version>1.0.2</version>
                  <executions>
                     <execution>
                         <phase>prepare-package</phase>
                        <goals>
                           <goal>update-widgetset</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>


   <dependencies>

      <!– Activiti –>
      <dependency>
         <groupId>org.activiti</groupId>
         <artifactId>activiti-engine</artifactId>
      </dependency>
      <dependency>
         <groupId>org.activiti</groupId>
         <artifactId>activiti-spring</artifactId>
      </dependency>
      <dependency>
         <groupId>org.activiti</groupId>
         <artifactId>activiti-explorer</artifactId>
      </dependency>
      <dependency>
         <groupId>org.activiti</groupId>
         <artifactId>activiti-modeler</artifactId>
         <exclusions>
          <exclusion>
              <groupId>xalan</groupId>
              <artifactId>xalan</artifactId>
          </exclusion>
         </exclusions>
      </dependency>
      <dependency>
         <groupId>org.activiti</groupId>
         <artifactId>activiti-diagram-rest</artifactId>
      </dependency>
      <dependency>
         <groupId>org.activiti</groupId>
         <artifactId>activiti-simple-workflow</artifactId>
      </dependency>

      <!– Database –>
      <dependency>
         <groupId>commons-dbcp</groupId>
         <artifactId>commons-dbcp</artifactId>
      </dependency>
      <dependency>
         <groupId>com.postgresdatabase</groupId>
         <artifactId>postgres</artifactId>
      </dependency>

      <!– Running example processes –>
      <dependency>
         <groupId>org.codehaus.groovy</groupId>
         <artifactId>groovy-all</artifactId>
      </dependency>

      <!– Testing –>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <scope>test</scope>
      </dependency>
      
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-servlet</artifactId>
        </dependency>
      
      <!– Vaadin addons –>
      <!– Must be defined both in activiti-explorer and activiti-webapp-explorer, as otherwise the gwt compiler won't find it –>
      <dependency>
            <groupId>org.vaadin.addons</groupId>
            <artifactId>dcharts-widget</artifactId>
            <version>0.10.0</version>
        </dependency>

   </dependencies>   
   
      <repository>
         <id>buzzmedia</id>
         <url>http://maven.thebuzzmedia.com</url> <!– ImageScalr –>
       </repository>
      <repository>
         <id>Alfresco thirdparty</id>
         <url>https://maven.alfresco.com/nexus/content/repositories/thirdparty/</url>
      </repository>
   </repositories>

</project>

We have tried Google and the user guide to help understand the problem and we have not found any answers.

Outcomes